Update Python 3.13 compat patch: 3.13.0a6 renamed pathmod to parser

(cherry picked from commit 2e52292f0e868ab1e7d3bc2da1f7d1239045884d)
epel9
Karolina Surma 10 months ago committed by Miro Hrončok
parent 52abb4851f
commit aa42e3cbdc

@ -47,10 +47,10 @@ index b2e1b85..d833de6 100644
# Allows to pass some tests for Windows via PosixPath. # Allows to pass some tests for Windows via PosixPath.
_flavour.altsep = _flavour.altsep or "\\" _flavour.altsep = _flavour.altsep or "\\"
+ # Python 3.13 renamed _flavour to pathmod + # Python 3.13 renamed _flavour to parser
+ pathmod = getattr(Path(), "pathmod", None) + parser = getattr(Path(), "parser", None)
+ if hasattr(pathmod, "altsep"): + if hasattr(parser, "altsep"):
+ pathmod.altsep = pathmod.altsep or "\\" + parser.altsep = parser.altsep or "\\"
+ +
def exists(self): def exists(self):
return self.is_file() or self.is_dir() return self.is_file() or self.is_dir()

@ -23,6 +23,7 @@ Patch2: prevent-PermissionError-when-using-venv-creator-on-s.patch
Patch3: 3.12-support-and-no-setuptools-wheel-on-3.12-2558.patch Patch3: 3.12-support-and-no-setuptools-wheel-on-3.12-2558.patch
# Fix compatibility with Python 3.13 # Fix compatibility with Python 3.13
# https://github.com/pypa/virtualenv/pull/2673 # https://github.com/pypa/virtualenv/pull/2673
# https://github.com/pypa/virtualenv/pull/2702
Patch5: py3.13.patch Patch5: py3.13.patch
BuildArch: noarch BuildArch: noarch

Loading…
Cancel
Save