Skip to content

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
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
@codecov
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

@jacobtylerwalls jacobtylerwalls merged commit 580a365 into main Jul 8, 2024
@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.

4 participants