summaryrefslogtreecommitdiff
path: root/dev-python/translate-toolkit
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-11-07 16:19:32 +0000
committerV3n3RiX <venerix@koprulu.sector>2023-11-07 16:19:32 +0000
commit198bd0cd3c1be97f7deb5283fa00048718482de4 (patch)
tree00169eb129b4ca13ceeb4879c4c5b7fb69c3c4fd /dev-python/translate-toolkit
parente0fac29676c44b996e61c06f8d5c92288e46966b (diff)
gentoo auto-resync : 07:11:2023 - 16:19:32
Diffstat (limited to 'dev-python/translate-toolkit')
-rw-r--r--dev-python/translate-toolkit/Manifest3
-rw-r--r--dev-python/translate-toolkit/files/translate-toolkit-3.10.1-py312.patch36
-rw-r--r--dev-python/translate-toolkit/translate-toolkit-3.10.1-r1.ebuild (renamed from dev-python/translate-toolkit/translate-toolkit-3.10.1.ebuild)8
3 files changed, 44 insertions, 3 deletions
diff --git a/dev-python/translate-toolkit/Manifest b/dev-python/translate-toolkit/Manifest
index 3b06959e5113..7395d8a49c38 100644
--- a/dev-python/translate-toolkit/Manifest
+++ b/dev-python/translate-toolkit/Manifest
@@ -1,3 +1,4 @@
+AUX translate-toolkit-3.10.1-py312.patch 1518 BLAKE2B 93024929524479ac6d42558b642da725d39668ecf9bf6bcc4f96707cc1888982270a45af57d3d08b5364b17ed12bd20bb11097ea2dd7ec1e738458b4610f4be8 SHA512 c2201b9a2d98cbee2593024675066009b21ba46856b1c7d50962cafe5ad4fc87a7578aa6779478c16ebaedbdd472635aab932f05124df3e3216bfca1601c755f
DIST translate-3.10.1.gh.tar.gz 1197315 BLAKE2B 8cb9f78e505a7e6c737fa39e32c731313893d9016e14e79d565f2c68baecedd8be47bc4cc715000ee8dfcf094624b9b3a68a39800ec98908684dab8e8517448e SHA512 f3355603e445a432cb69f102a2ce4a20013b3df1a4c17c60a4599b069db6a0ad5316d29d79f211a61a1eb155dd550fb2db7c98e3f36dc858c5d15118cbeae8d8
-EBUILD translate-toolkit-3.10.1.ebuild 3213 BLAKE2B a1c2892f25e3e17672648ee2e1badafbe5785fe6458ba04ca50f9f6024edbe24032412ebb8c858185e79d4fadc218f29bb39822ca70723999a3e9e3e492a4284 SHA512 8cd5abb5a54bf2248d78814981a6d9e64a117e0140ce384ff7913de01d5ca4e9e03059a5f79b9aee373bc808c3fafcbcb630575b6d97a47e1a0ceddc02ffa55c
+EBUILD translate-toolkit-3.10.1-r1.ebuild 3287 BLAKE2B c864f117c4e2e1a040bcc5cc8fa8edd01e5228ae9723289851513c48b41056784192a8796d245295821e78ebc050c869c4427b33084d96e92dcc37278967ba5d SHA512 71323866bcfe6294b24876f2a0127e20c26b055b12fcbe5bc3e9f55730139a656d2e2fadef30cb34e642527a135f1ee4b1a99e94b4a602ca46837a3577e1814a
MISC metadata.xml 756 BLAKE2B 06f64f258d362954f99f7e9eee241eb3dddc6b00b9069df2ad977d28b5cf06f9c8ee2246ee5958600b5ac86297968d7aaced6b6420dca4ed507c441c58c61ca9 SHA512 80374c40513ca450f97e3930929c1450e7438ea15830e60937952a6fccfd999675f2ca2056c5aa4e287ba256c6ec08a09d8f7adb8b2c5af8ca0cd595f34acd85
diff --git a/dev-python/translate-toolkit/files/translate-toolkit-3.10.1-py312.patch b/dev-python/translate-toolkit/files/translate-toolkit-3.10.1-py312.patch
new file mode 100644
index 000000000000..da0fd91520aa
--- /dev/null
+++ b/dev-python/translate-toolkit/files/translate-toolkit-3.10.1-py312.patch
@@ -0,0 +1,36 @@
+From 3217ed10bb9371ff25cb04e194e0250d42f89206 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= <michal@cihar.com>
+Date: Tue, 7 Nov 2023 08:42:56 +0100
+Subject: [PATCH] optrecurse: properly close opened files
+
+This avoids leaking file descriptors in the tests and makes sure the
+content is written at the end of conversion.
+
+Fixes #5071
+---
+ translate/misc/optrecurse.py | 9 ++++++++-
+ 1 file changed, 8 insertions(+), 1 deletion(-)
+
+diff --git a/translate/misc/optrecurse.py b/translate/misc/optrecurse.py
+index d69666b8e8..9337c7c4ff 100644
+--- a/translate/misc/optrecurse.py
++++ b/translate/misc/optrecurse.py
+@@ -684,10 +684,17 @@ def processfile(
+ tempoutput = False
+ templatefile = self.opentemplatefile(options, fulltemplatepath)
+ passthroughoptions = self.getpassthroughoptions(options)
+- if fileprocessor(inputfile, outputfile, templatefile, **passthroughoptions):
++ result = fileprocessor(
++ inputfile, outputfile, templatefile, **passthroughoptions
++ )
++ if fullinputpath is not None:
++ inputfile.close()
++ if result:
+ if tempoutput:
+ self.warning("writing to temporary output...")
+ self.finalizetempoutputfile(options, outputfile, fulloutputpath)
++ if fulloutputpath and os.path.isfile(fulloutputpath):
++ outputfile.close()
+ return True
+ else:
+ # remove the file if it is a file (could be stdout etc)
diff --git a/dev-python/translate-toolkit/translate-toolkit-3.10.1.ebuild b/dev-python/translate-toolkit/translate-toolkit-3.10.1-r1.ebuild
index 77dcd8f1db85..507a80f7bb74 100644
--- a/dev-python/translate-toolkit/translate-toolkit-3.10.1.ebuild
+++ b/dev-python/translate-toolkit/translate-toolkit-3.10.1-r1.ebuild
@@ -4,8 +4,7 @@
EAPI=8
DISTUTILS_USE_PEP517=setuptools
-# py3.12: https://github.com/translate/translate/issues/5071
-PYTHON_COMPAT=( python3_{10..11} )
+PYTHON_COMPAT=( python3_{10..12} )
PYTHON_REQ_USE="sqlite"
inherit distutils-r1
@@ -52,6 +51,11 @@ BDEPEND="
)
"
+PATCHES=(
+ # https://github.com/translate/translate/commit/3217ed10bb9371ff25cb04e194e0250d42f89206
+ "${FILESDIR}/${P}-py312.patch"
+)
+
distutils_enable_tests pytest
src_test() {