commit:     827ece915c1a98e3dad5a1c2f1358451ab52b496
Author:     Oz Tiram <oz.tiram <AT> gmail <DOT> com>
AuthorDate: Sun May  7 02:53:38 2023 +0000
Commit:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Sat May 20 12:18:30 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=827ece91

dev-python/pipenv: fix patch for imports

Bug: https://bugs.gentoo.org/905793
Signed-off-by: Oz Tiram <oz.tiram <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/30907
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>

 .../pipenv/files/pipenv-2023.4.29-fix-toml-dump.patch  | 18 ++++++++++++++++++
 .../files/pipenv-2023.4.29-fix-toml-in-vendor.patch    | 11 ++++++++++-
 dev-python/pipenv/pipenv-2023.4.29.ebuild              |  1 +
 3 files changed, 29 insertions(+), 1 deletion(-)

diff --git a/dev-python/pipenv/files/pipenv-2023.4.29-fix-toml-dump.patch 
b/dev-python/pipenv/files/pipenv-2023.4.29-fix-toml-dump.patch
new file mode 100644
index 000000000000..8218d0f59e1c
--- /dev/null
+++ b/dev-python/pipenv/files/pipenv-2023.4.29-fix-toml-dump.patch
@@ -0,0 +1,18 @@
+diff --git a/pipenv/project.py b/pipenv/project.py
+index 55251bc5f..9fd46f089 100644
+--- a/pipenv/project.py
++++ b/pipenv/project.py
+@@ -183,9 +183,9 @@ class Project:
+                 "name": "pypi",
+             }
+ 
+-        default_sources_toml = 
f"[[source]]\n{toml.dumps(self.default_source)}"
++        default_sources_toml = 
f"[[source]]\n{tomlkit.dumps(self.default_source)}"
+         for pip_conf_index in pip_conf_indexes:
+-            default_sources_toml += 
f"\n\n[[source]]\n{toml.dumps(pip_conf_index)}"
++            default_sources_toml += 
f"\n\n[[source]]\n{tomlkit.dumps(pip_conf_index)}"
+         plette.pipfiles.DEFAULT_SOURCE_TOML = default_sources_toml
+ 
+         # Hack to skip this during pipenv run, or -r.
+
+

diff --git a/dev-python/pipenv/files/pipenv-2023.4.29-fix-toml-in-vendor.patch 
b/dev-python/pipenv/files/pipenv-2023.4.29-fix-toml-in-vendor.patch
index cb0f3f70d48b..e23a42e46b59 100644
--- a/dev-python/pipenv/files/pipenv-2023.4.29-fix-toml-in-vendor.patch
+++ b/dev-python/pipenv/files/pipenv-2023.4.29-fix-toml-in-vendor.patch
@@ -1,5 +1,5 @@
 diff --git a/pipenv/project.py b/pipenv/project.py
-index ed43cf2bc..903667639 100644
+index ed43cf2bc..55251bc5f 100644
 --- a/pipenv/project.py
 +++ b/pipenv/project.py
 @@ -13,6 +13,13 @@ import urllib.parse
@@ -16,6 +16,15 @@ index ed43cf2bc..903667639 100644
  from pipenv.cmdparse import Script
  from pipenv.environment import Environment
  from pipenv.environments import Setting, is_in_virtualenv, 
normalize_pipfile_path
+@@ -43,8 +50,6 @@ from pipenv.utils.toml import cleanup_toml, 
convert_toml_outline_tables
+ from pipenv.vendor import plette
+ from pipenv.vendor.requirementslib.models.utils import 
get_default_pyproject_backend
+ 
+-import click, toml, tomlkit
+-
+ try:
+     # this is only in Python3.8 and later
+     from functools import cached_property
 diff --git a/pipenv/utils/toml.py b/pipenv/utils/toml.py
 index d4157d01c..27d9975ae 100644
 --- a/pipenv/utils/toml.py

diff --git a/dev-python/pipenv/pipenv-2023.4.29.ebuild 
b/dev-python/pipenv/pipenv-2023.4.29.ebuild
index 5fdc0ff53f40..123b4de71625 100644
--- a/dev-python/pipenv/pipenv-2023.4.29.ebuild
+++ b/dev-python/pipenv/pipenv-2023.4.29.ebuild
@@ -23,6 +23,7 @@ PATCHES=(
        "${FILESDIR}/pipenv-2023.4.29-append-always-install.patch"
        "${FILESDIR}/pipenv-2023.4.29-fix-imports.patch"
        "${FILESDIR}/pipenv-2023.4.29-fix-toml-in-vendor.patch"
+       "${FILESDIR}/pipenv-2023.4.29-fix-toml-dump.patch"
 )
 
 RDEPEND="

Reply via email to