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

Rebuild for python311 #283

Conversation

regro-cf-autotick-bot
Copy link
Contributor

This PR has been triggered in an effort to update python311.

Notes and instructions for merging this PR:

  1. Please merge the PR only after the tests have passed.
  2. Feel free to push to the bot's branch to update this PR if needed.

Please note that if you close this PR we presume that the feedstock has been rebuilt, so if you are going to perform the rebuild yourself don't close this PR until the your rebuild has been merged.

This package has the following downstream children:

  • fenics-basix
  • gnuradio
  • heavydb-ext
  • lal
  • python-ligo-lw
    and potentially more.

If this PR was opened in error or needs to be updated please add the bot-rerun label to this PR. The bot will close this PR and schedule another one. If you do not have permissions to add this label, you can use the phrase @conda-forge-admin, please rerun bot in a PR comment to have the conda-forge-admin add it for you.

This PR was created by the regro-cf-autotick-bot. The regro-cf-autotick-bot is a service to automatically track the dependency graph, migrate packages, and propose package version updates for conda-forge. Feel free to drop us a line if there are any issues! This PR was generated by https://github.com/regro/autotick-bot/actions/runs/3325621304, please use this URL for debugging.

@conda-forge-linter
Copy link

Hi! This is the friendly automated conda-forge-linting service.

I just wanted to let you know that I linted all conda-recipes in your PR (recipe) and found it was in an excellent condition.

@h-vetinari
Copy link
Member

h-vetinari commented Oct 26, 2022

Needs at least pytest: conda-forge/pytest-feedstock#152

@h-vetinari
Copy link
Member

Um...

==================================== ERRORS ====================================
________________________ ERROR collecting test session _________________________

[...]

=========================== short test summary info ============================
ERROR  - AttributeError: 'PathDistribution' object has no attribute '_normalized_name'
ERROR  - AttributeError: 'PathDistribution' object has no attribute '_normalized_name'
2 errors in 1.41s

The error isn't even in numpy code, but it looks like it's coming from importlib:

[...]/lib/python3.11/importlib/metadata/__init__.py:472: in load
    ordered = sorted(eps, key=by_group)
        by_group   = operator.attrgetter('group')
        cls        = <class 'importlib.metadata.SelectableGroups'>
        eps        = <itertools.chain object at 0x7f19804ea5f0>
[...]/lib/python3.11/importlib/metadata/__init__.py:1013: in <genexpr>
    eps = itertools.chain.from_iterable(
        .0         = <generator object unique_everseen at 0x7f19805e9d40>
[...]/lib/python3.11/importlib/metadata/_itertools.py:16: in unique_everseen
    k = key(element)
E   AttributeError: 'PathDistribution' object has no attribute '_normalized_name'
        element    = <importlib_metadata.PathDistribution object at 0x7f19802c0450>
        iterable   = <itertools.chain object at 0x7f19804eae00>
        key        = operator.attrgetter('_normalized_name')
        seen       = set()
        seen_add   = <built-in method add of set object at 0x7f198035b060>

@h-vetinari
Copy link
Member

h-vetinari commented Oct 26, 2022

Ah, this might be due to the removal of the deprecated setup/teardown methods in pytest 7.2 (which of course snuck in before the python 3.11 migration 🤦)

Edit: not relevant for numpy, but saw it by chance on the scipy tracker, where we'll have to carry a patch.

@h-vetinari
Copy link
Member

Ah, this picks an old noarch hypothesis build...

@h-vetinari
Copy link
Member

h-vetinari commented Oct 26, 2022

OK, this depends on conda-forge/hypothesis-feedstock#750, which has a test-dependence on pandas, and the circularity is complete.

Edit: circularity being broken there; numpy hard-requires hypothesis for testing these days.

@h-vetinari
Copy link
Member

No cigar, even with the newest hypothesis...

=========================== short test summary info ============================
ERROR  - AttributeError: 'PathDistribution' object has no attribute '_normalized_name'
ERROR  - AttributeError: 'PathDistribution' object has no attribute '_normalized_name'
2 errors in 1.22s

@h-vetinari
Copy link
Member

Looks like python/importlib_metadata#396

@chrisburr
Copy link
Member

It's somehow tied to import order:

$ mamba create --name test python=3.11 hypothesis importlib_metadata
$ conda activate test
$ python -c 'import hypothesis; import importlib_metadata; print("All good")'
All good
$ python -c 'import importlib_metadata; import hypothesis; print("All good")'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/cburr/miniconda3/envs/test/lib/python3.11/site-packages/hypothesis/__init__.py", line 56, in <module>
    run()
  File "/home/cburr/miniconda3/envs/test/lib/python3.11/site-packages/hypothesis/entry_points.py", line 62, in run
    for entry in get_entry_points():  # pragma: no cover
  File "/home/cburr/miniconda3/envs/test/lib/python3.11/site-packages/hypothesis/entry_points.py", line 28, in get_entry_points
    eps = importlib_metadata.entry_points(group="hypothesis")
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/cburr/miniconda3/envs/test/lib/python3.11/importlib/metadata/__init__.py", line 1016, in entry_points
    return SelectableGroups.load(eps).select(**params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/cburr/miniconda3/envs/test/lib/python3.11/importlib/metadata/__init__.py", line 472, in load
    ordered = sorted(eps, key=by_group)
              ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/cburr/miniconda3/envs/test/lib/python3.11/importlib/metadata/__init__.py", line 1013, in <genexpr>
    eps = itertools.chain.from_iterable(
                                       ^
  File "/home/cburr/miniconda3/envs/test/lib/python3.11/importlib/metadata/_itertools.py", line 16, in unique_everseen
    k = key(element)
        ^^^^^^^^^^^^
AttributeError: 'PathDistribution' object has no attribute '_normalized_name'

@h-vetinari
Copy link
Member

Looks like python/importlib_metadata#396

... which did not make it into 3.11... 😑

python/cpython#98706

@h-vetinari
Copy link
Member

h-vetinari commented Oct 26, 2022

It's somehow tied to import order:

Please chime in on the cpython issue if you feel like it! :)
Personally, I do not want us to depend on import-order quirks. 😅

@chrisburr
Copy link
Member

Updating to importlib_metadata 5.0.0 with pip fixes it so I think we just need conda-forge/importlib_metadata-feedstock#109

$ pip install --upgrade importlib_metadata
Requirement already satisfied: importlib_metadata in ./miniconda3/envs/test/lib/python3.11/site-packages (3.3.0)
Collecting importlib_metadata
  Downloading importlib_metadata-5.0.0-py3-none-any.whl (21 kB)
Requirement already satisfied: zipp>=0.5 in ./miniconda3/envs/test/lib/python3.11/site-packages (from importlib_metadata) (3.10.0)
Installing collected packages: importlib_metadata
  Attempting uninstall: importlib_metadata
    Found existing installation: importlib-metadata 3.3.0
    Uninstalling importlib-metadata-3.3.0:
      Successfully uninstalled importlib-metadata-3.3.0
Successfully installed importlib_metadata-5.0.0
$ python -c 'import importlib_metadata; import hypothesis; print("All good")'
All good

@h-vetinari
Copy link
Member

h-vetinari commented Oct 26, 2022

The workaround 0912020 will most likely need conda-forge/importlib_metadata-feedstock#110 (resp. conda-forge/importlib_metadata-feedstock#109).

@h-vetinari
Copy link
Member

Updating to importlib_metadata 5.0.0 with pip fixes it

TBH, I'm surprised this works (since python vendors it), but great news, thanks!

@h-vetinari
Copy link
Member

It seems there are some flaky tests that get some refcount comparisons wrong on aarch.

However those builds have nothing to do with 3.11 and passed in previous runs (also in this PR), so I'm just going ahead and merging this one. 🙃

=========================== short test summary info ============================
FAILED core/tests/test_nditer.py::test_partial_iteration_cleanup[1-i-O] - assert 123 == 124
 +  where 124 = <built-in function getrefcount>(123)
 +    where <built-in function getrefcount> = sys.getrefcount
FAILED core/tests/test_nditer.py::test_partial_iteration_cleanup[1-O-i] - assert 20607 == 20603
 +  where 20603 = <built-in function getrefcount>(123)
 +    where <built-in function getrefcount> = sys.getrefcount
FAILED core/tests/test_nditer.py::test_partial_iteration_cleanup[1-i,O-O,O] - assert 41085 == 20603
 +  where 20603 = <built-in function getrefcount>(123)
 +    where <built-in function getrefcount> = sys.getrefcount
FAILED core/tests/test_nditer.py::test_partial_iteration_cleanup[1-O,i-i,O] - assert 41085 == 20603
 +  where 20603 = <built-in function getrefcount>(123)
 +    where <built-in function getrefcount> = sys.getrefcount
FAILED core/tests/test_nditer.py::test_partial_iteration_cleanup[2-i-O] - assert 20605 == 123
 +  where 123 = <built-in function getrefcount>(123)
 +    where <built-in function getrefcount> = sys.getrefcount
FAILED core/tests/test_nditer.py::test_partial_iteration_cleanup[2-O-i] - assert 20607 == 20603
 +  where 20603 = <built-in function getrefcount>(123)
 +    where <built-in function getrefcount> = sys.getrefcount
FAILED core/tests/test_nditer.py::test_partial_iteration_cleanup[2-i,O-O,O] - assert 41085 == 20603
 +  where 20603 = <built-in function getrefcount>(123)
 +    where <built-in function getrefcount> = sys.getrefcount
FAILED core/tests/test_nditer.py::test_partial_iteration_cleanup[2-O,i-i,O] - assert 41085 == 20603
 +  where 20603 = <built-in function getrefcount>(123)
 +    where <built-in function getrefcount> = sys.getrefcount
FAILED core/tests/test_nditer.py::test_partial_iteration_cleanup[3-i-O] - assert 20605 == 123
 +  where 123 = <built-in function getrefcount>(123)
 +    where <built-in function getrefcount> = sys.getrefcount
FAILED core/tests/test_nditer.py::test_partial_iteration_cleanup[3-O-i] - assert 20607 == 20603
 +  where 20603 = <built-in function getrefcount>(123)
 +    where <built-in function getrefcount> = sys.getrefcount
FAILED core/tests/test_nditer.py::test_partial_iteration_cleanup[3-i,O-O,O] - assert 41085 == 20603
 +  where 20603 = <built-in function getrefcount>(123)
 +    where <built-in function getrefcount> = sys.getrefcount
FAILED core/tests/test_nditer.py::test_partial_iteration_cleanup[3-O,i-i,O] - assert 41085 == 20603
 +  where 20603 = <built-in function getrefcount>(123)
 +    where <built-in function getrefcount> = sys.getrefcount
12 failed, 18972 passed, 462 skipped, 37 xfailed, 7 xpassed, 4656 warnings in 2151.79s (0:35:51)

@h-vetinari h-vetinari merged commit f340575 into conda-forge:main Oct 26, 2022
@regro-cf-autotick-bot regro-cf-autotick-bot deleted the rebuild-python311-0-1_haff149 branch October 26, 2022 12:41
@jakirkham
Copy link
Member

Thanks Axel! 🙏

Do we have upstream issues about those flaky tests?

@h-vetinari
Copy link
Member

Do we have upstream issues about those flaky tests?

Not yet, it's the first time I've seen that failure. If it keeps happening I'll raise an issue.

@jakirkham
Copy link
Member

cc @rgommers (in case the test failures above (under details) ring any bells)

@rgommers
Copy link
Contributor

Should indeed be a test issue rather than a bug in the code being tested. Upstream issue is numpy/numpy#21169

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

Successfully merging this pull request may close these issues.

None yet

6 participants