Skip to content

Comments

get_dirs_from_args handles paths with invalid syntax#7639

Merged
nicoddemus merged 2 commits intopytest-dev:masterfrom
nicoddemus:issue-7638
Aug 15, 2020
Merged

get_dirs_from_args handles paths with invalid syntax#7639
nicoddemus merged 2 commits intopytest-dev:masterfrom
nicoddemus:issue-7638

Conversation

@nicoddemus
Copy link
Member

Fix #7638

@nicoddemus nicoddemus added the needs backport applied to PRs, indicates that it should be ported to the current bug-fix branch label Aug 12, 2020
@bluetech
Copy link
Member

I don't have a windows machine to test, but by the removal of the sys.version_info < (3, 8) check I assume this (OSError on invalid syntax) can happen even on Python>=3.8? If so it might be worth reporting to Python upstream, it's just really annoying that these methods can raise and they already changed it do the right thing regarding "unrepresentable characters" (ref second paragraph).

Regarding the needs backport label, I think this problem only happens in the new pathlib code which is not in 6.0.x. The AppVeyor run you linked seems to confirm it only fails on master. So IIUC it doesn't need a backport.

@nicoddemus nicoddemus removed the needs backport applied to PRs, indicates that it should be ported to the current bug-fix branch label Aug 14, 2020
@nicoddemus
Copy link
Member Author

nicoddemus commented Aug 14, 2020

I don't have a windows machine to test, but by the removal of the sys.version_info < (3, 8) check I assume this (OSError on invalid syntax) can happen even on Python>=3.8? If so it might be worth reporting to Python upstream, it's just really annoying that these methods can raise and they already changed it do the right thing regarding "unrepresentable characters" (ref second paragraph).

Good point, was about to report it but then noticed that was already the case: https://bugs.python.org/issue35306

I've added that link as a comment. 👍

So IIUC it doesn't need a backport.

You are definitely correct, thanks!

@nicoddemus nicoddemus closed this Aug 14, 2020
@nicoddemus nicoddemus reopened this Aug 14, 2020
@nicoddemus nicoddemus merged commit 3f0abcc into pytest-dev:master Aug 15, 2020
@nicoddemus nicoddemus deleted the issue-7638 branch August 15, 2020 12:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

get_dirs_from_args() breaks on Windows with options that include full paths

2 participants