From aa42e3cbdc0b0a31b020718fe7fd8a4dede6560c Mon Sep 17 00:00:00 2001 From: Karolina Surma Date: Tue, 16 Apr 2024 09:11:03 +0200 Subject: [PATCH] Update Python 3.13 compat patch: 3.13.0a6 renamed pathmod to parser (cherry picked from commit 2e52292f0e868ab1e7d3bc2da1f7d1239045884d) --- py3.13.patch | 8 ++++---- python-virtualenv.spec | 1 + 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/py3.13.patch b/py3.13.patch index 729192c..4921d77 100644 --- a/py3.13.patch +++ b/py3.13.patch @@ -47,10 +47,10 @@ index b2e1b85..d833de6 100644 # Allows to pass some tests for Windows via PosixPath. _flavour.altsep = _flavour.altsep or "\\" -+ # Python 3.13 renamed _flavour to pathmod -+ pathmod = getattr(Path(), "pathmod", None) -+ if hasattr(pathmod, "altsep"): -+ pathmod.altsep = pathmod.altsep or "\\" ++ # Python 3.13 renamed _flavour to parser ++ parser = getattr(Path(), "parser", None) ++ if hasattr(parser, "altsep"): ++ parser.altsep = parser.altsep or "\\" + def exists(self): return self.is_file() or self.is_dir() diff --git a/python-virtualenv.spec b/python-virtualenv.spec index ff98a3d..95dd5a3 100644 --- a/python-virtualenv.spec +++ b/python-virtualenv.spec @@ -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 # Fix compatibility with Python 3.13 # https://github.com/pypa/virtualenv/pull/2673 +# https://github.com/pypa/virtualenv/pull/2702 Patch5: py3.13.patch BuildArch: noarch