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

Make trio run on Python 3.13 (probably) #2918

Merged
merged 8 commits into from
Jan 19, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python: ['pypy-3.9', 'pypy-3.10', '3.8', '3.9', '3.10', '3.11', '3.12-dev', 'pypy-3.9-nightly', 'pypy-3.10-nightly']
python: ['pypy-3.9', 'pypy-3.10', '3.8', '3.9', '3.10', '3.11', '3.12', 'pypy-3.9-nightly', 'pypy-3.10-nightly']
check_formatting: ['0']
no_test_requirements: ['0']
extra_name: ['']
Expand Down
3 changes: 2 additions & 1 deletion src/trio/_path.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ def generate_forwards(cls, attrs: dict[str, object]) -> None:
if attr_name.startswith("_") or attr_name in attrs:
continue

if isinstance(attr, property):
if isinstance(attr, (property, types.ModuleType)):
cls._forward.append(attr_name)
elif isinstance(attr, types.FunctionType):
wrapper = _forward_factory(cls, attr_name, attr)
Expand Down Expand Up @@ -199,6 +199,7 @@ def generate_iter(cls, attrs: dict[str, object]) -> None:
setattr(cls, attr_name, wrapper)


# TODO: `pathmod` points to `os.path`... is that what we want?
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I left this because ATM trio.Path has a pathmod pointing to a synchronous path module. Which is weird but also we don't have an equivalent module IIRC.

Copy link
Contributor

Choose a reason for hiding this comment

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

This might get changed, see python/cpython#113893.

Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Looks like the TODO is irrelevant because AFAICT the pathmod or flavour or flavor or whatever it will be only does operations like joining paths. Seemingly nothing that interacts with FS?

Copy link
Member

Choose a reason for hiding this comment

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

Yea, as far as I remember looking at it a bit ago I think they've just make an abstract class for the path interface, at least in that particular PR

@final
class Path(metaclass=AsyncAutoWrapperType):
"""A :class:`pathlib.Path` wrapper that executes blocking methods in
Expand Down