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

Add python 3.13 to the continuous integration #2424

Merged
merged 10 commits into from
Jul 8, 2024

Conversation

Pierre-Sassoulas
Copy link
Member

@Pierre-Sassoulas Pierre-Sassoulas commented May 6, 2024

Type of Changes

Type
✨ New feature

Description

Add compatibility with Python 3.13.

@Pierre-Sassoulas Pierre-Sassoulas added the Maintenance Discussion or action around maintaining astroid or the dev workflow label May 6, 2024
@Pierre-Sassoulas Pierre-Sassoulas added this to the 3.3.0 milestone May 6, 2024
@jacobtylerwalls jacobtylerwalls force-pushed the try-out-python-3.13 branch 2 times, most recently from 5a2fffb to 4a4f9cf Compare July 6, 2024 19:20
@@ -8,6 +8,7 @@ numpy>=1.17.0; python_version<"3.12"
python-dateutil
PyQt6
regex
setuptools
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oof, is that avoidable ? I don't see what changed in this MR to warrant that, si it means we already were depending on setuptools ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Exactly. Uninstall setuptools, run pytest -k namespace, see:

tests/test_manager.py:124: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

    import warnings
    
    with warnings.catch_warnings():
        warnings.simplefilter("ignore", DeprecationWarning)
>       __import__("pkg_resources").declare_namespace(__name__)
E       AttributeError: module 'pkg_resources' has no attribute 'declare_namespace'

tests/testdata/python3/data/path_pkg_resources_1/package/__init__.py:5: AttributeError
===================================== short test summary info ======================================
FAILED tests/test_manager.py::AstroidManagerTest::test_identify_old_namespace_package_protocol - AttributeError: module 'pkg_resources' has no attribute 'declare_namespace'
========================== 1 failed, 10 passed, 1675 deselected in 1.18s ===========================

We could do this in a separate MR if you like, but I figured a separate commit was enough.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't this a test dependencie and not a runtime dependencie ?

Copy link
Member

@jacobtylerwalls jacobtylerwalls Jul 6, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that's what this file is. (My commit message is slightly wrong, should say test dependency)

@jacobtylerwalls jacobtylerwalls changed the base branch from main to pin-numpy July 6, 2024 20:12
@jacobtylerwalls jacobtylerwalls changed the base branch from pin-numpy to main July 6, 2024 20:18
Copy link

codecov bot commented Jul 6, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.75%. Comparing base (314e08b) to head (875cc38).
Report is 141 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #2424   +/-   ##
=======================================
  Coverage   92.74%   92.75%           
=======================================
  Files          94       94           
  Lines       10993    11007   +14     
=======================================
+ Hits        10195    10209   +14     
  Misses        798      798           
Flag Coverage Δ
linux 92.63% <100.00%> (+<0.01%) ⬆️
pypy 92.75% <100.00%> (+<0.01%) ⬆️
windows 92.73% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
astroid/brain/brain_dataclasses.py 92.72% <100.00%> (+0.16%) ⬆️
astroid/brain/brain_pathlib.py 91.66% <100.00%> (+0.75%) ⬆️
astroid/brain/brain_typing.py 87.42% <100.00%> (+0.24%) ⬆️

... and 1 file with indirect coverage changes

tests/test_inference.py Show resolved Hide resolved
tests/brain/test_pathlib.py Show resolved Hide resolved
astroid/brain/brain_pathlib.py Show resolved Hide resolved
astroid/brain/brain_dataclasses.py Outdated Show resolved Hide resolved
@jacobtylerwalls jacobtylerwalls merged commit 580a365 into main Jul 8, 2024
20 checks passed
@jacobtylerwalls jacobtylerwalls deleted the try-out-python-3.13 branch July 8, 2024 14:24
@jacobtylerwalls
Copy link
Member

Thanks for the reviews!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Maintenance Discussion or action around maintaining astroid or the dev workflow python 3.13
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants