Skip to content

bpo-39783: Optimize contruction of Path and PurePath objects #20288

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

Closed
wants to merge 2 commits into from

Conversation

remilapeyre
Copy link
Contributor

@remilapeyre remilapeyre commented May 21, 2020

Now that the _closed attribute has been removed we can move ahead with this.

https://bugs.python.org/issue39783

@remilapeyre remilapeyre changed the title bpo-39782: Optimize contruction of Path and PurePath objects bpo-39783: Optimize contruction of Path and PurePath objects May 21, 2020
@barneygale
Copy link
Contributor

Could this be implemented in _from_parts() to avoid doubling up the code?

@remilapeyre
Copy link
Contributor Author

Could this be implemented in _from_parts() to avoid doubling up the code?

Yes, thanks!

@barneygale
Copy link
Contributor

LGTM!

@@ -686,7 +686,9 @@ def _parse_args(cls, args):
return cls._flavour.parse_parts(parts)

@classmethod
def _from_parts(cls, args, init=True):
def _from_parts(cls, args, kwargs=None, *, init=True):
Copy link
Contributor

Choose a reason for hiding this comment

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

It looks like kwargs is not needed as it's not used anywhere?

Copy link
Member

Choose a reason for hiding this comment

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

It has been removed on main, you have a merge conflict now.

@barneygale
Copy link
Contributor

Closing - see rationale in issue. Thanks all the same for the patch.

@barneygale barneygale closed this Feb 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants