[New-bugs-announce] [issue46208] os.path.normpath change between 3.11.0a2 and 3.11.0a3+

Hugo van Kemenade report at bugs.python.org
Thu Dec 30 14:38:30 EST 2021


New submission from Hugo van Kemenade <hugovk+python at gmail.com>:

The behaviour of os.path.normpath appears to have changed between Python 3.10/Python 3.11.0a2 and 3.11.0a3+.

I don't see anything mentioned in https://docs.python.org/3.11/whatsnew/3.11.html

Is this intentional?


Old behaviour:

Python 3.10.1 (v3.10.1:2cd268a3a9, Dec  6 2021, 14:28:59) [Clang 13.0.0 (clang-1300.0.29.3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from os.path import normpath
>>> normpath('handbook/../../Tests/image.png')
'../Tests/image.png'
>>>


Python 3.11.0a2 (main, Dec 30 2021, 21:22:15) [Clang 13.0.0 (clang-1300.0.29.30)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from os.path import normpath
>>> normpath('handbook/../../Tests/image.png')
'../Tests/image.png'
>>>


New behaviour:

Python 3.11.0a3+ (heads/main:af6b406, Dec  9 2021, 15:34:48) [Clang 13.0.0 (clang-1300.0.29.3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from os.path import normpath
>>> normpath('handbook/../../Tests/image.png')
'Tests/image.png'
>>>


Python 3.11.0a3+ (heads/main:8d7644f, Dec 30 2021, 21:32:51) [Clang 13.0.0 (clang-1300.0.29.30)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from os.path import normpath
>>> normpath('handbook/../../Tests/image.png')
'Tests/image.png'
>>>

(Found in https://github.com/sphinx-doc/sphinx/issues/10030.)

----------
components: Library (Lib)
messages: 409384
nosy: hugovk
priority: normal
severity: normal
status: open
title: os.path.normpath change between 3.11.0a2 and 3.11.0a3+
versions: Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue46208>
_______________________________________


More information about the New-bugs-announce mailing list