public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: dev-python/pyxdg/files/, dev-python/pyxdg/
@ 2020-01-26 17:45 Michał Górny
  0 siblings, 0 replies; 3+ messages in thread
From: Michał Górny @ 2020-01-26 17:45 UTC (permalink / raw
  To: gentoo-commits

commit:     fdf7963d5cf80533f29c008e272f49342e19bb25
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sun Jan 26 17:23:35 2020 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sun Jan 26 17:45:26 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fdf7963d

dev-python/pyxdg: Remove old

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 dev-python/pyxdg/Manifest                          |  1 -
 .../pyxdg/files/sec-patch-CVE-2014-1624.patch      | 54 ----------------------
 dev-python/pyxdg/pyxdg-0.25-r1.ebuild              | 27 -----------
 dev-python/pyxdg/pyxdg-0.26.ebuild                 | 31 -------------
 4 files changed, 113 deletions(-)

diff --git a/dev-python/pyxdg/Manifest b/dev-python/pyxdg/Manifest
index 176840507ba..40a65a9d767 100644
--- a/dev-python/pyxdg/Manifest
+++ b/dev-python/pyxdg/Manifest
@@ -1,2 +1 @@
-DIST pyxdg-0.25.tar.gz 48935 BLAKE2B 8feffefff37da1e560040b36cc1ccb4ffdc57642b4de92f7a937303a02117ffe263a5dfc91bb6e85112ce60bc19509c21e7f8f859ef3ca5fca0e8c87a61cb128 SHA512 86cbf3a54fb8e79043db60dcdbb3fb10013ae25a900fa3592edc8a24bf3f440c19bc04626c7906293c785fcb56eab9d87d209b723b5baa872376ba1eb86758b6
 DIST pyxdg-rel-0.26.tar.gz 68435 BLAKE2B a95948db17da9909554e82c0ccf590c3f94ec26d1e34d5ba335868233a649368c08ef30cc19e878310ef038e5bdb6d18cd0e15e9413d9c54b70931f25844ee8c SHA512 0c11bccb74b8c0d98f3c63c318d35d08e1c3bbea128bf7b82792e1bdc0a60c8c4d6414b0612b19296cfb48f7951dfc6dd55ac8d23238e370e7faf6c4f64d1fb6

diff --git a/dev-python/pyxdg/files/sec-patch-CVE-2014-1624.patch b/dev-python/pyxdg/files/sec-patch-CVE-2014-1624.patch
deleted file mode 100644
index d94c0a42bdd..00000000000
--- a/dev-python/pyxdg/files/sec-patch-CVE-2014-1624.patch
+++ /dev/null
@@ -1,54 +0,0 @@
-Improve security of get_runtime_dir(strict=False) 
-https://github.com/takluyver/pyxdg/commit/bd999c1c3fe7ee5f30ede2cf704cf03e400347b4
-diff --git a/xdg/BaseDirectory.py b/xdg/BaseDirectory.py
-index cececa3..a7c31b1 100644
---- a/xdg/BaseDirectory.py
-+++ b/xdg/BaseDirectory.py
-@@ -25,7 +25,7 @@
- Note: see the rox.Options module for a higher-level API for managing options.
- """
- 
--import os
-+import os, stat
- 
- _home = os.path.expanduser('~')
- xdg_data_home = os.environ.get('XDG_DATA_HOME') or \
-@@ -131,15 +131,30 @@ def get_runtime_dir(strict=True):
-         
-         import getpass
-         fallback = '/tmp/pyxdg-runtime-dir-fallback-' + getpass.getuser()
-+        create = False
-+
-         try:
--            os.mkdir(fallback, 0o700)
-+            # This must be a real directory, not a symlink, so attackers can't
-+            # point it elsewhere. So we use lstat to check it.
-+            st = os.lstat(fallback)
-         except OSError as e:
-             import errno
--            if e.errno == errno.EEXIST:
--                # Already exists - set 700 permissions again.
--                import stat
--                os.chmod(fallback, stat.S_IRUSR|stat.S_IWUSR|stat.S_IXUSR)
--            else: # pragma: no cover
-+            if e.errno == errno.ENOENT:
-+                create = True
-+            else:
-                 raise
--        
-+        else:
-+            # The fallback must be a directory
-+            if not stat.S_ISDIR(st.st_mode):
-+                os.unlink(fallback)
-+                create = True
-+            # Must be owned by the user and not accessible by anyone else
-+            elif (st.st_uid != os.getuid()) \
-+              or (st.st_mode & (stat.S_IRWXG | stat.S_IRWXO)):
-+                os.rmdir(fallback)
-+                create = True
-+
-+        if create:
-+            os.mkdir(fallback, 0o700)
-+
-         return fallback
-

diff --git a/dev-python/pyxdg/pyxdg-0.25-r1.ebuild b/dev-python/pyxdg/pyxdg-0.25-r1.ebuild
deleted file mode 100644
index ef1b0c486d5..00000000000
--- a/dev-python/pyxdg/pyxdg-0.25-r1.ebuild
+++ /dev/null
@@ -1,27 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=5
-
-PYTHON_COMPAT=( python{2_7,3_6} )
-inherit distutils-r1
-
-DESCRIPTION="A Python module to deal with freedesktop.org specifications"
-HOMEPAGE="https://freedesktop.org/wiki/Software/pyxdg https://cgit.freedesktop.org/xdg/pyxdg/"
-SRC_URI="https://people.freedesktop.org/~takluyver/${P}.tar.gz"
-
-LICENSE="LGPL-2"
-SLOT="0"
-KEYWORDS="~alpha amd64 arm arm64 hppa ia64 ~mips ppc ppc64 sparc x86"
-IUSE="test"
-RESTRICT="!test? ( test )"
-
-DEPEND="test? ( dev-python/nose[${PYTHON_USEDEP}]
-	x11-themes/hicolor-icon-theme )"
-
-DOCS=( AUTHORS ChangeLog README TODO )
-PATCHES=( "${FILESDIR}"/sec-patch-CVE-2014-1624.patch )
-
-python_test() {
-	nosetests || die
-}

diff --git a/dev-python/pyxdg/pyxdg-0.26.ebuild b/dev-python/pyxdg/pyxdg-0.26.ebuild
deleted file mode 100644
index b7485e40e20..00000000000
--- a/dev-python/pyxdg/pyxdg-0.26.ebuild
+++ /dev/null
@@ -1,31 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-PYTHON_COMPAT=( python{2_7,3_6} )
-inherit distutils-r1
-
-MY_P=${PN}-rel-${PV}
-DESCRIPTION="A Python module to deal with freedesktop.org specifications"
-HOMEPAGE="https://freedesktop.org/wiki/Software/pyxdg https://cgit.freedesktop.org/xdg/pyxdg/"
-# official mirror of the git repo
-SRC_URI="https://github.com/takluyver/pyxdg/archive/rel-${PV}.tar.gz -> ${MY_P}.tar.gz"
-
-LICENSE="LGPL-2"
-SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86"
-IUSE="test"
-RESTRICT="!test? ( test )"
-
-DEPEND="
-	test? (
-		dev-python/nose[${PYTHON_USEDEP}]
-		x11-themes/hicolor-icon-theme
-	)"
-
-S=${WORKDIR}/${MY_P}
-
-python_test() {
-	nosetests -v || die
-}


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-python/pyxdg/files/, dev-python/pyxdg/
@ 2020-10-18 13:27 Conrad Kostecki
  0 siblings, 0 replies; 3+ messages in thread
From: Conrad Kostecki @ 2020-10-18 13:27 UTC (permalink / raw
  To: gentoo-commits

commit:     cff994e70fc59d554f605bd2c9140f75eee51f4e
Author:     Conrad Kostecki <conikost <AT> gentoo <DOT> org>
AuthorDate: Sun Oct 18 13:25:28 2020 +0000
Commit:     Conrad Kostecki <conikost <AT> gentoo <DOT> org>
CommitDate: Sun Oct 18 13:25:28 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cff994e7

dev-python/pyxdg: fix tests

This patch fixes tests with python 3.8.4 and newer.

Closes: https://bugs.gentoo.org/735746
Closes: https://bugs.gentoo.org/743823
Package-Manager: Portage-3.0.8, Repoman-3.0.1
Signed-off-by: Conrad Kostecki <conikost <AT> gentoo.org>

 dev-python/pyxdg/files/pyxdg-0.26-python384.patch | 58 +++++++++++++++++++++++
 dev-python/pyxdg/pyxdg-0.26-r2.ebuild             | 20 +++-----
 2 files changed, 65 insertions(+), 13 deletions(-)

diff --git a/dev-python/pyxdg/files/pyxdg-0.26-python384.patch b/dev-python/pyxdg/files/pyxdg-0.26-python384.patch
new file mode 100644
index 00000000000..def4a835f03
--- /dev/null
+++ b/dev-python/pyxdg/files/pyxdg-0.26-python384.patch
@@ -0,0 +1,58 @@
+From 9b913229ace838958e51a16cabc41905a2460f7b Mon Sep 17 00:00:00 2001
+From: Conrad Kostecki <conrad@kostecki.com>
+Date: Tue, 25 Aug 2020 00:24:53 +0200
+Subject: [PATCH] Fix compatibility with >=python-3.8.4
+
+Signed-off-by: Conrad Kostecki <conrad@kostecki.com>
+---
+ xdg/Menu.py | 16 ++++++++++++++--
+ 1 file changed, 14 insertions(+), 2 deletions(-)
+
+diff --git a/xdg/Menu.py b/xdg/Menu.py
+index 1d03cad..ee406bd 100644
+--- a/xdg/Menu.py
++++ b/xdg/Menu.py
+@@ -21,6 +21,7 @@ def print_menu(menu, tab=0):
+ import locale
+ import subprocess
+ import ast
++import sys
+ try:
+     import xml.etree.cElementTree as etree
+ except ImportError:
+@@ -35,6 +36,17 @@ def print_menu(menu, tab=0):
+ import xdg.Config
+ 
+ 
++def _ast_const(name):
++    if sys.version_info >= (3, 4):
++        name = ast.literal_eval(name)
++        if sys.version_info >= (3, 8):
++            return ast.Constant(name)
++        else:
++            return ast.NameConstant(name)
++    else:
++        return ast.Name(id=name, ctx=ast.Load())
++
++
+ def _strxfrm(s):
+     """Wrapper around locale.strxfrm that accepts unicode strings on Python 2.
+ 
+@@ -754,7 +766,7 @@ def parse_rule(self, node):
+         if expr:
+             tree.body = expr
+         else:
+-            tree.body = ast.Name('False', ast.Load())
++            tree.body = _ast_const('False')
+         ast.fix_missing_locations(tree)
+         return Rule(type, tree)
+ 
+@@ -781,7 +793,7 @@ def parse_rule_node(self, node):
+             expr = self.parse_bool_op(node, ast.Or())
+             return ast.UnaryOp(ast.Not(), expr) if expr else None
+         elif tag == 'All':
+-            return ast.Name('True', ast.Load())
++            return _ast_const('True')
+         elif tag == 'Category':
+             category = node.text
+             return ast.Compare(

diff --git a/dev-python/pyxdg/pyxdg-0.26-r2.ebuild b/dev-python/pyxdg/pyxdg-0.26-r2.ebuild
index 94de62c5960..b86bc4b81e9 100644
--- a/dev-python/pyxdg/pyxdg-0.26-r2.ebuild
+++ b/dev-python/pyxdg/pyxdg-0.26-r2.ebuild
@@ -3,16 +3,16 @@
 
 EAPI=7
 
-DISTUTILS_USE_SETUPTOOLS=no
+DISTUTILS_USE_SETUPTOOLS="no"
+MY_P="${PN}-rel-${PV}"
 PYTHON_COMPAT=( python{3_6,3_7,3_8,3_9} )
 
 inherit distutils-r1
 
-MY_P=${PN}-rel-${PV}
 DESCRIPTION="A Python module to deal with freedesktop.org specifications"
 HOMEPAGE="https://freedesktop.org/wiki/Software/pyxdg https://cgit.freedesktop.org/xdg/pyxdg/"
-# official mirror of the git repo
-SRC_URI="https://github.com/takluyver/pyxdg/archive/rel-${PV}.tar.gz -> ${MY_P}.tar.gz"
+SRC_URI="https://github.com/takluyver/${PN}/archive/rel-${PV}.tar.gz -> ${MY_P}.tar.gz"
+S="${WORKDIR}/${MY_P}"
 
 LICENSE="LGPL-2"
 SLOT="0"
@@ -20,14 +20,8 @@ KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ppc ppc64 sparc x86"
 IUSE="test"
 RESTRICT="!test? ( test )"
 
-DEPEND="
-	test? (
-		dev-python/nose[${PYTHON_USEDEP}]
-		x11-themes/hicolor-icon-theme
-	)"
+DEPEND="test? ( x11-themes/hicolor-icon-theme )"
 
-S=${WORKDIR}/${MY_P}
+PATCHES=( "${FILESDIR}/${P}-python384.patch" )
 
-python_test() {
-	nosetests -v || die
-}
+distutils_enable_tests nose


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-python/pyxdg/files/, dev-python/pyxdg/
@ 2023-10-28 15:55 Andrey Grozin
  0 siblings, 0 replies; 3+ messages in thread
From: Andrey Grozin @ 2023-10-28 15:55 UTC (permalink / raw
  To: gentoo-commits

commit:     49838c757565b8e66b7d13b0bca5cb0498f501c4
Author:     Andrey Grozin <grozin <AT> gentoo <DOT> org>
AuthorDate: Sat Oct 28 15:54:53 2023 +0000
Commit:     Andrey Grozin <grozin <AT> gentoo <DOT> org>
CommitDate: Sat Oct 28 15:55:32 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=49838c75

dev-python/pyxdg: add python3_12

Signed-off-by: Andrey Grozin <grozin <AT> gentoo.org>

 dev-python/pyxdg/files/pyxdg-0.28-py3.12.patch | 12 +++++++++++
 dev-python/pyxdg/pyxdg-0.28-r1.ebuild          | 29 ++++++++++++++++++++++++++
 2 files changed, 41 insertions(+)

diff --git a/dev-python/pyxdg/files/pyxdg-0.28-py3.12.patch b/dev-python/pyxdg/files/pyxdg-0.28-py3.12.patch
new file mode 100644
index 000000000000..20b7a5b514bc
--- /dev/null
+++ b/dev-python/pyxdg/files/pyxdg-0.28-py3.12.patch
@@ -0,0 +1,12 @@
+diff -r -U3 pyxdg-rel-0.28.orig/test/test_basedirectory.py pyxdg-rel-0.28/test/test_basedirectory.py
+--- pyxdg-rel-0.28.orig/test/test_basedirectory.py	2022-06-05 18:34:18.000000000 +0700
++++ pyxdg-rel-0.28/test/test_basedirectory.py	2023-10-28 22:41:56.975921683 +0700
+@@ -9,7 +9,7 @@
+ try:
+     reload
+ except NameError:
+-    from imp import reload
++    from importlib import reload
+ 
+ class BaseDirectoryTest(unittest.TestCase):
+     def setUp(self):

diff --git a/dev-python/pyxdg/pyxdg-0.28-r1.ebuild b/dev-python/pyxdg/pyxdg-0.28-r1.ebuild
new file mode 100644
index 000000000000..deb254a6cf7c
--- /dev/null
+++ b/dev-python/pyxdg/pyxdg-0.28-r1.ebuild
@@ -0,0 +1,29 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{9..12} )
+DISTUTILS_USE_PEP517=setuptools
+
+inherit distutils-r1
+
+MY_P="${PN}-rel-${PV}"
+DESCRIPTION="A Python module to deal with freedesktop.org specifications"
+HOMEPAGE="
+	https://freedesktop.org/wiki/Software/pyxdg/
+	https://pypi.org/project/pyxdg/
+"
+SRC_URI="
+	https://github.com/takluyver/pyxdg/archive/rel-${PV}.tar.gz
+		-> ${MY_P}.gh.tar.gz
+"
+S=${WORKDIR}/${MY_P}
+
+LICENSE="LGPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86"
+
+PATCHES=( "${FILESDIR}"/${P}-py3.12.patch )
+
+distutils_enable_tests pytest


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-10-28 15:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-28 15:55 [gentoo-commits] repo/gentoo:master commit in: dev-python/pyxdg/files/, dev-python/pyxdg/ Andrey Grozin
  -- strict thread matches above, loose matches on Subject: below --
2020-10-18 13:27 Conrad Kostecki
2020-01-26 17:45 Michał Górny

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox