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

shlex.split(): remove support for s=None #94352

Closed
vstinner opened this issue Jun 27, 2022 · 0 comments
Closed

shlex.split(): remove support for s=None #94352

vstinner opened this issue Jun 27, 2022 · 0 comments
Labels
type-bug An unexpected behavior, bug, or error

Comments

@vstinner
Copy link
Member

vstinner commented Jun 27, 2022

Calling shlex.split(None) is deprecated since Python 3.9: commit 975ac32 of bpo-33262.

What's New in Python 3.9:

Passing None as the first argument to the shlex.split() function has been deprecated. (Contributed by Zackery Spytz in bpo-33262.)

IMO it's now time to remove this deprecated feature.

I wrote PR #94353 to implement this change.

@vstinner vstinner added the type-bug An unexpected behavior, bug, or error label Jun 27, 2022
vstinner added a commit that referenced this issue Jul 4, 2022
shlex.split(): Passing None for s argument now raises an exception,
rather than reading sys.stdin. The feature was deprecated in Python
3.9.
@vstinner vstinner closed this as completed Jul 4, 2022
openstack-mirroring pushed a commit to openstack/openstack that referenced this issue Mar 29, 2024
* Update kolla-ansible from branch 'master'
  to 3c3c5179586f4ceebd70f0fee7e127f636b1c1af
  - tests: Replace imp with importlib.machinery
    
    It's needed for Python3.12 support, because imp has been dropped [1].
    
    Also shlex dropped s=None support [2].
    
    [1]: https://docs.python.org/3/whatsnew/3.12.html
    [2]: python/cpython#94352
    
    Change-Id: I23f37897ea08ac708f6df485f699122df647e552
openstack-mirroring pushed a commit to openstack/kolla-ansible that referenced this issue Mar 29, 2024
It's needed for Python3.12 support, because imp has been dropped [1].

Also shlex dropped s=None support [2].

[1]: https://docs.python.org/3/whatsnew/3.12.html
[2]: python/cpython#94352

Change-Id: I23f37897ea08ac708f6df485f699122df647e552
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

1 participant