Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build failure: python312Packages.pandas-stubs #329739

Closed
dotlambda opened this issue Jul 24, 2024 · 0 comments · Fixed by #329901
Closed

Build failure: python312Packages.pandas-stubs #329739

dotlambda opened this issue Jul 24, 2024 · 0 comments · Fixed by #329901
Labels

Comments

@dotlambda
Copy link
Member

dotlambda commented Jul 24, 2024

Steps To Reproduce

Steps to reproduce the behavior:

  1. build python312.pkgs.pandas-stubs

Build log

=================================== FAILURES ===================================
______________________________ test_plot_scatter _______________________________

close_figures = None

    def test_plot_scatter(close_figures) -> None:
        check(
            assert_type(IRIS_DF.plot.scatter(x="SepalLength", y="SepalWidth"), Axes),
            Axes,
        )
        check(
            assert_type(
                IRIS_DF.plot(x="SepalLength", y="SepalWidth", kind="scatter"), Axes
            ),
            Axes,
        )
        check(
            assert_type(
>               IRIS_DF.plot.scatter(x="SepalLength", y="SepalWidth", subplots=True),
                npt.NDArray[np.object_],
            ),
            np.ndarray,
        )

tests/test_plotting.py:491: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/nix/store/jqw59f8hd0n99qq6hs8pcql054m4nnw5-python3.12-pandas-2.2.2/lib/python3.12/site-packages/pandas/plotting/_core.py:1748: in scatter
    return self(kind="scatter", x=x, y=y, s=s, c=c, **kwargs)
/nix/store/jqw59f8hd0n99qq6hs8pcql054m4nnw5-python3.12-pandas-2.2.2/lib/python3.12/site-packages/pandas/plotting/_core.py:975: in __call__
    return plot_backend.plot(data, x=x, y=y, kind=kind, **kwargs)
/nix/store/jqw59f8hd0n99qq6hs8pcql054m4nnw5-python3.12-pandas-2.2.2/lib/python3.12/site-packages/pandas/plotting/_matplotlib/__init__.py:71: in plot
    plot_obj.generate()
/nix/store/jqw59f8hd0n99qq6hs8pcql054m4nnw5-python3.12-pandas-2.2.2/lib/python3.12/site-packages/pandas/plotting/_matplotlib/core.py:503: in generate
    self._make_legend()
/nix/store/jqw59f8hd0n99qq6hs8pcql054m4nnw5-python3.12-pandas-2.2.2/lib/python3.12/site-packages/pandas/plotting/_matplotlib/core.py:896: in _make_legend
    ax.legend(loc="best")
/nix/store/8w0d3p71dg4myj6srw5al38773b02gr2-python3.12-matplotlib-3.9.0/lib/python3.12/site-packages/matplotlib/axes/_axes.py:341: in legend
    handles, labels, kwargs = mlegend._parse_legend_args([self], *args, **kwargs)
/nix/store/8w0d3p71dg4myj6srw5al38773b02gr2-python3.12-matplotlib-3.9.0/lib/python3.12/site-packages/matplotlib/legend.py:1364: in _parse_legend_args
    _api.warn_external(
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

message = 'No artists with labels found to put in legend.  Note that artists whose label start with an underscore are ignored when legend() is called with no argument.'
category = None

    def warn_external(message, category=None):
        """
        `warnings.warn` wrapper that sets *stacklevel* to "outside Matplotlib".
    
        The original emitter of the warning can be obtained by patching this
        function back to `warnings.warn`, i.e. ``_api.warn_external =
        warnings.warn`` (or ``functools.partial(warnings.warn, stacklevel=2)``,
        etc.).
        """
        frame = sys._getframe()
        for stacklevel in itertools.count(1):
            if frame is None:
                # when called in embedded context may hit frame is None
                break
            if not re.match(r"\A(matplotlib|mpl_toolkits)(\Z|\.(?!tests\.))",
                            # Work around sphinx-gallery not setting __name__.
                            frame.f_globals.get("__name__", "")):
                break
            frame = frame.f_back
        # preemptively break reference cycle between locals and the frame
        del frame
>       warnings.warn(message, category, stacklevel)
E       UserWarning: No artists with labels found to put in legend.  Note that artists whose label start with an underscore are ignored when legend() is called with no argument.

/nix/store/8w0d3p71dg4myj6srw5al38773b02gr2-python3.12-matplotlib-3.9.0/lib/python3.12/site-packages/matplotlib/_api/__init__.py:381: UserWarning
=========================== short test summary info ============================
FAILED tests/test_plotting.py::test_plot_scatter - UserWarning: No artists with labels found to put in legend.  Note that arti...
=========== 1 failed, 982 passed, 7 skipped, 20 deselected in 19.88s ===========

Notify maintainers

@malob
recently edited: @fabaff

Metadata

Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.

[user@system:~]$ nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-linux"`
 - host os: `Linux 6.9.10, NixOS, 24.11 (Vicuna), 24.11pre-git`
 - multi-user?: `yes`
  - sandbox: `yes`
 - version: `nix-env (Lix, like Nix) 2.90.0`
 - channels(root): `"nixos"`
 - nixpkgs: `/nix/store/6pxw90lyfq5b52hq83d635lhdsgwjqk9-z9nih1pm3bycx3nib37ivdk0g0ds4akj-nixpkgs-src`

Add a 👍 reaction to issues you find important.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
1 participant