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

GH-110488: Fix two small issues in pathlib.PurePath.with_name() #110651

Merged
merged 2 commits into from
Oct 11, 2023

Conversation

barneygale
Copy link
Contributor

@barneygale barneygale commented Oct 10, 2023

Ensure that PurePath('foo/a').with_name('.') raises ValueError

Ensure that PureWindowsPath('foo/a').with_name('a:b') does not raise ValueError.

Ensure that `PurePath('foo/a').with_name('.')` raises `ValueError`

Ensure that `PureWindowsPath('foo/a').with_name('a:b')` does not raise
`ValueError`.
@barneygale
Copy link
Contributor Author

Thank you, Jelle!

@barneygale barneygale merged commit b5f7777 into python:main Oct 11, 2023
@miss-islington
Copy link
Contributor

Thanks @barneygale for the PR 🌮🎉.. I'm working now to backport this PR to: 3.12.
🐍🍒⛏🤖

@miss-islington
Copy link
Contributor

Sorry, @barneygale, I could not cleanly backport this to 3.12 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker b5f7777cb3ecae02d49e0b348968c1ff1ffe21f4 3.12

barneygale added a commit to barneygale/cpython that referenced this pull request Oct 11, 2023
…)` (python#110651)

Ensure that `PurePath('foo/a').with_name('.')` raises `ValueError`

Ensure that `PureWindowsPath('foo/a').with_name('a:b')` does not raise
`ValueError`.

(cherry picked from commit b5f7777)
barneygale added a commit to barneygale/cpython that referenced this pull request Oct 11, 2023
…h_name()` (pythonGH-110651)

Ensure that `PurePath('foo/a').with_name('.')` raises `ValueError`

Ensure that `PureWindowsPath('foo/a').with_name('a:b')` does not raise
`ValueError`..
(cherry picked from commit b5f7777)

Co-authored-by: Barney Gale <barney.gale@gmail.com>
barneygale added a commit to barneygale/cpython that referenced this pull request Oct 11, 2023
…h_name()` (pythonGH-110651)

Ensure that `PurePath('foo/a').with_name('.')` raises `ValueError`

Ensure that `PureWindowsPath('foo/a').with_name('a:b')` does not raise
`ValueError`..
(cherry picked from commit b5f7777)

Co-authored-by: Barney Gale <barney.gale@gmail.com>
@bedevere-app
Copy link

bedevere-app bot commented Oct 11, 2023

GH-110678 is a backport of this pull request to the 3.12 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.12 bug and security fixes label Oct 11, 2023
barneygale added a commit that referenced this pull request Oct 11, 2023
…()` (GH-110651) (#110678)

Ensure that `PurePath('foo/a').with_name('.')` raises `ValueError`

Ensure that `PureWindowsPath('foo/a').with_name('a:b')` does not raise
`ValueError`.

(cherry picked from commit b5f7777)
Glyphack pushed a commit to Glyphack/cpython that referenced this pull request Sep 2, 2024
…)` (python#110651)

Ensure that `PurePath('foo/a').with_name('.')` raises `ValueError`

Ensure that `PureWindowsPath('foo/a').with_name('a:b')` does not raise
`ValueError`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants