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

commit:     b7aeaf6d8ea3a794c8e394416a120609c1890ab7
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Tue Jan  3 06:04:03 2023 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Tue Jan  3 06:23:40 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b7aeaf6d

dev-python/pydocstyle: Bump to 6.2.0

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

 dev-python/pydocstyle/Manifest                     |  1 +
 .../pydocstyle/files/pydocstyle-6.2.0-tomli.patch  | 91 ++++++++++++++++++++++
 dev-python/pydocstyle/pydocstyle-6.2.0.ebuild      | 49 ++++++++++++
 3 files changed, 141 insertions(+)

diff --git a/dev-python/pydocstyle/Manifest b/dev-python/pydocstyle/Manifest
index 70448015989d..716834b1a5bb 100644
--- a/dev-python/pydocstyle/Manifest
+++ b/dev-python/pydocstyle/Manifest
@@ -1 +1,2 @@
 DIST pydocstyle-6.1.1.tar.gz 73982 BLAKE2B 6a896221fdcd257f0475472e1cf87ef892d8292a4c0faf661595adb17e2d18f4a8277cda498197309d34597c448203856c272256277a7e35fba20e2e5ba47f2b SHA512 ce4932a6601c80d05a46600f5af7df54798025a5f3dc41ab8cf1bc0d63e7f78b70cccb17dc99ddab25eda9abd639f91468fca1b1ceb4539708350212e481a156
+DIST pydocstyle-6.2.0.gh.tar.gz 77296 BLAKE2B 22f6d8691763b6c3e41bca7d0ef5193a282189f442072089aebb6d96d2e039e971e9e5645e50f4bcb8433f36cdf0e33c956c4ac381f2e7e649d010d63f5db501 SHA512 382c74d22072337a624ac635d95c9cf5fbbd373c11c85b6302c56bf21f099ebc4dd8eec2f896a8c02d4548524078daebbceef7c4fb055dfb6a6eadab0e42a190

diff --git a/dev-python/pydocstyle/files/pydocstyle-6.2.0-tomli.patch b/dev-python/pydocstyle/files/pydocstyle-6.2.0-tomli.patch
new file mode 100644
index 000000000000..f7600d1973bb
--- /dev/null
+++ b/dev-python/pydocstyle/files/pydocstyle-6.2.0-tomli.patch
@@ -0,0 +1,91 @@
+From b45a393b2f0c4ce0f17c3e58cf5d768bd653e155 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
+Date: Tue, 3 Jan 2023 06:49:32 +0100
+Subject: [PATCH] Use tomllib/tomli for reading .toml configs
+
+Use the built-in `tomllib` module in Python 3.11 and the modern `tomli`
+package in older Python versions to read .toml configs instead of
+the unmaintained and broken `toml` package.
+
+Fixes #599
+Fixes #600
+---
+ docs/release_notes.rst   |  7 +++++++
+ poetry.lock              | 16 ++++++++--------
+ pyproject.toml           |  4 ++--
+ requirements/runtime.txt |  2 +-
+ requirements/tests.txt   |  1 -
+ src/pydocstyle/config.py | 20 ++++++++++++--------
+ 6 files changed, 30 insertions(+), 20 deletions(-)
+
+diff --git a/pyproject.toml b/pyproject.toml
+index 607aa3f..84bfe0d 100644
+--- a/pyproject.toml
++++ b/pyproject.toml
+@@ -21,11 +21,11 @@ classifiers = [
+ [tool.poetry.dependencies]
+ python = ">=3.6"
+ snowballstemmer = ">=2.2.0"
+-toml = {version = ">=0.10.2", optional = true}
++tomli = {version = ">=1.2.3", optional = true, python = "<3.11"}
+ importlib-metadata = {version = ">=2.0.0,<5.0.0", python = "<3.8"}
+ 
+ [tool.poetry.extras]
+-toml = ["toml"]
++toml = ["tomli"]
+ 
+ [tool.poetry.scripts]
+ pydocstyle = "pydocstyle.cli:main"
+diff --git a/src/pydocstyle/config.py b/src/pydocstyle/config.py
+index 4819cde..c05f7dc 100644
+--- a/src/pydocstyle/config.py
++++ b/src/pydocstyle/config.py
+@@ -4,6 +4,7 @@ import copy
+ import itertools
+ import operator
+ import os
++import sys
+ from collections import namedtuple
+ from collections.abc import Set
+ from configparser import NoOptionError, NoSectionError, RawConfigParser
+@@ -14,10 +15,13 @@ from ._version import __version__
+ from .utils import log
+ from .violations import ErrorRegistry, conventions
+ 
+-try:
+-    import toml
+-except ImportError:  # pragma: no cover
+-    toml = None  # type: ignore
++if sys.version_info >= (3, 11):
++    import tomllib
++else:
++    try:
++        import tomli as tomllib
++    except ImportError:  # pragma: no cover
++        tomllib = None  # type: ignore
+ 
+ 
+ def check_initialized(method):
+@@ -60,15 +64,15 @@ class TomlParser:
+         read_ok = []
+         for filename in filenames:
+             try:
+-                with open(filename, encoding=encoding) as fp:
+-                    if not toml:
++                with open(filename, "rb") as fp:
++                    if not tomllib:
+                         log.warning(
+                             "The %s configuration file was ignored, "
+-                            "because the `toml` package is not installed.",
++                            "because the `tomli` package is not installed.",
+                             filename,
+                         )
+                         continue
+-                    self._config.update(toml.load(fp))
++                    self._config.update(tomllib.load(fp))
+             except OSError:
+                 continue
+             if isinstance(filename, os.PathLike):
+-- 
+2.39.0
+

diff --git a/dev-python/pydocstyle/pydocstyle-6.2.0.ebuild b/dev-python/pydocstyle/pydocstyle-6.2.0.ebuild
new file mode 100644
index 000000000000..ae9b07a98370
--- /dev/null
+++ b/dev-python/pydocstyle/pydocstyle-6.2.0.ebuild
@@ -0,0 +1,49 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_USE_PEP517=poetry
+PYTHON_COMPAT=( pypy3 python3_{8..11} )
+
+inherit distutils-r1
+
+DESCRIPTION="Python docstring style checker"
+HOMEPAGE="
+	https://github.com/PyCQA/pydocstyle/
+	https://pypi.org/project/pydocstyle/
+"
+SRC_URI="
+	https://github.com/PyCQA/pydocstyle/archive/${PV}.tar.gz
+		-> ${P}.gh.tar.gz
+"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-macos"
+
+RDEPEND="
+	>=dev-python/snowballstemmer-2.2.0[${PYTHON_USEDEP}]
+"
+BDEPEND="
+	test? (
+		$(python_gen_cond_dep '
+			dev-python/tomli[${PYTHON_USEDEP}]
+		' 3.{8..10})
+	)
+"
+
+distutils_enable_tests pytest
+# Requires network to lookup github issues
+#distutils_enable_sphinx docs dev-python/sphinx_rtd_theme dev-python/sphinxcontrib-issuetracker
+
+PATCHES=(
+	"${FILESDIR}"/pydocstyle-6.1.1-disarm-pip-install.patch
+	"${FILESDIR}"/${P}-tomli.patch
+)
+
+src_prepare() {
+	# poetry sucks
+	sed -i -e "s:0.0.0-dev:${PV}:" pyproject.toml || die
+	distutils-r1_src_prepare
+}


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

* [gentoo-commits] repo/gentoo:master commit in: dev-python/pydocstyle/files/, dev-python/pydocstyle/
@ 2023-02-16 20:26 Michał Górny
  0 siblings, 0 replies; 3+ messages in thread
From: Michał Górny @ 2023-02-16 20:26 UTC (permalink / raw
  To: gentoo-commits

commit:     b02559c560f28e9e73e4dfc1b1fef246ee7af12f
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Thu Feb 16 20:25:20 2023 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Thu Feb 16 20:25:20 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b02559c5

dev-python/pydocstyle: Remove old

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

 dev-python/pydocstyle/Manifest                     |  2 -
 .../pydocstyle/files/pydocstyle-6.2.0-tomli.patch  | 91 ----------------------
 dev-python/pydocstyle/pydocstyle-6.2.0.ebuild      | 49 ------------
 dev-python/pydocstyle/pydocstyle-6.2.2.ebuild      | 48 ------------
 4 files changed, 190 deletions(-)

diff --git a/dev-python/pydocstyle/Manifest b/dev-python/pydocstyle/Manifest
index c27423b73e42..59b18c487eee 100644
--- a/dev-python/pydocstyle/Manifest
+++ b/dev-python/pydocstyle/Manifest
@@ -1,5 +1,3 @@
 DIST pydocstyle-6.1.1.tar.gz 73982 BLAKE2B 6a896221fdcd257f0475472e1cf87ef892d8292a4c0faf661595adb17e2d18f4a8277cda498197309d34597c448203856c272256277a7e35fba20e2e5ba47f2b SHA512 ce4932a6601c80d05a46600f5af7df54798025a5f3dc41ab8cf1bc0d63e7f78b70cccb17dc99ddab25eda9abd639f91468fca1b1ceb4539708350212e481a156
-DIST pydocstyle-6.2.0.gh.tar.gz 77296 BLAKE2B 22f6d8691763b6c3e41bca7d0ef5193a282189f442072089aebb6d96d2e039e971e9e5645e50f4bcb8433f36cdf0e33c956c4ac381f2e7e649d010d63f5db501 SHA512 382c74d22072337a624ac635d95c9cf5fbbd373c11c85b6302c56bf21f099ebc4dd8eec2f896a8c02d4548524078daebbceef7c4fb055dfb6a6eadab0e42a190
-DIST pydocstyle-6.2.2.gh.tar.gz 77412 BLAKE2B 5aa2eaa52e97d705fc6972db985ccb7927b856944250de8153ecdb3285bd0ec75305186a7d2e6904ccead9b4299637af83496456e2af9769fcf62fa0fae041cf SHA512 2097ec9d3429c83de821630384e717074abc39dfdff928327e8ccf4a1ba91592926ac55784403b559d88a8bb9a29557a2a406863c8603644de5d17972c63e4f5
 DIST pydocstyle-6.2.3.gh.tar.gz 77612 BLAKE2B f94b9c8232a3e96dad1d84d37bf7cc53f114edfddbd0dad725ff3bb79f39576a5fceff5a2b962e284e9d0d96ac8d71e5aa0406322af4bf8fdc73910348ff9190 SHA512 b275bd2367a3a6d4636a2879f503da15b9965bffe2750db87cbd3ca09fc3353a481a9c38e1b35b3b2aeeba019e9dd393d2cb65db2820d6343fb4c9881f7e6deb
 DIST pydocstyle-6.3.0.gh.tar.gz 78058 BLAKE2B 551da9af8baebcba4f1053e0d9495bff039a98c96ad229219cd37ac8ba9e3002fff8a136c5148144a5f84ed94a1414364d7c827ad010038f63961ce17a260ee3 SHA512 f8473b19ab6ef0b61787875558f9dd6f9f7f1954e1baa0010942af6d4de8dbca30c8c08be6acbf24aadd1c0a601ba9467b747026a6cd22379f0c4b84a38b57c7

diff --git a/dev-python/pydocstyle/files/pydocstyle-6.2.0-tomli.patch b/dev-python/pydocstyle/files/pydocstyle-6.2.0-tomli.patch
deleted file mode 100644
index f7600d1973bb..000000000000
--- a/dev-python/pydocstyle/files/pydocstyle-6.2.0-tomli.patch
+++ /dev/null
@@ -1,91 +0,0 @@
-From b45a393b2f0c4ce0f17c3e58cf5d768bd653e155 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
-Date: Tue, 3 Jan 2023 06:49:32 +0100
-Subject: [PATCH] Use tomllib/tomli for reading .toml configs
-
-Use the built-in `tomllib` module in Python 3.11 and the modern `tomli`
-package in older Python versions to read .toml configs instead of
-the unmaintained and broken `toml` package.
-
-Fixes #599
-Fixes #600
----
- docs/release_notes.rst   |  7 +++++++
- poetry.lock              | 16 ++++++++--------
- pyproject.toml           |  4 ++--
- requirements/runtime.txt |  2 +-
- requirements/tests.txt   |  1 -
- src/pydocstyle/config.py | 20 ++++++++++++--------
- 6 files changed, 30 insertions(+), 20 deletions(-)
-
-diff --git a/pyproject.toml b/pyproject.toml
-index 607aa3f..84bfe0d 100644
---- a/pyproject.toml
-+++ b/pyproject.toml
-@@ -21,11 +21,11 @@ classifiers = [
- [tool.poetry.dependencies]
- python = ">=3.6"
- snowballstemmer = ">=2.2.0"
--toml = {version = ">=0.10.2", optional = true}
-+tomli = {version = ">=1.2.3", optional = true, python = "<3.11"}
- importlib-metadata = {version = ">=2.0.0,<5.0.0", python = "<3.8"}
- 
- [tool.poetry.extras]
--toml = ["toml"]
-+toml = ["tomli"]
- 
- [tool.poetry.scripts]
- pydocstyle = "pydocstyle.cli:main"
-diff --git a/src/pydocstyle/config.py b/src/pydocstyle/config.py
-index 4819cde..c05f7dc 100644
---- a/src/pydocstyle/config.py
-+++ b/src/pydocstyle/config.py
-@@ -4,6 +4,7 @@ import copy
- import itertools
- import operator
- import os
-+import sys
- from collections import namedtuple
- from collections.abc import Set
- from configparser import NoOptionError, NoSectionError, RawConfigParser
-@@ -14,10 +15,13 @@ from ._version import __version__
- from .utils import log
- from .violations import ErrorRegistry, conventions
- 
--try:
--    import toml
--except ImportError:  # pragma: no cover
--    toml = None  # type: ignore
-+if sys.version_info >= (3, 11):
-+    import tomllib
-+else:
-+    try:
-+        import tomli as tomllib
-+    except ImportError:  # pragma: no cover
-+        tomllib = None  # type: ignore
- 
- 
- def check_initialized(method):
-@@ -60,15 +64,15 @@ class TomlParser:
-         read_ok = []
-         for filename in filenames:
-             try:
--                with open(filename, encoding=encoding) as fp:
--                    if not toml:
-+                with open(filename, "rb") as fp:
-+                    if not tomllib:
-                         log.warning(
-                             "The %s configuration file was ignored, "
--                            "because the `toml` package is not installed.",
-+                            "because the `tomli` package is not installed.",
-                             filename,
-                         )
-                         continue
--                    self._config.update(toml.load(fp))
-+                    self._config.update(tomllib.load(fp))
-             except OSError:
-                 continue
-             if isinstance(filename, os.PathLike):
--- 
-2.39.0
-

diff --git a/dev-python/pydocstyle/pydocstyle-6.2.0.ebuild b/dev-python/pydocstyle/pydocstyle-6.2.0.ebuild
deleted file mode 100644
index 6902ed9883c2..000000000000
--- a/dev-python/pydocstyle/pydocstyle-6.2.0.ebuild
+++ /dev/null
@@ -1,49 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-DISTUTILS_USE_PEP517=poetry
-PYTHON_COMPAT=( pypy3 python3_{9..11} )
-
-inherit distutils-r1
-
-DESCRIPTION="Python docstring style checker"
-HOMEPAGE="
-	https://github.com/PyCQA/pydocstyle/
-	https://pypi.org/project/pydocstyle/
-"
-SRC_URI="
-	https://github.com/PyCQA/pydocstyle/archive/${PV}.tar.gz
-		-> ${P}.gh.tar.gz
-"
-
-LICENSE="MIT"
-SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-macos"
-
-RDEPEND="
-	>=dev-python/snowballstemmer-2.2.0[${PYTHON_USEDEP}]
-"
-BDEPEND="
-	test? (
-		$(python_gen_cond_dep '
-			dev-python/tomli[${PYTHON_USEDEP}]
-		' 3.{8..10})
-	)
-"
-
-distutils_enable_tests pytest
-# Requires network to lookup github issues
-#distutils_enable_sphinx docs dev-python/sphinx-rtd-theme dev-python/sphinxcontrib-issuetracker
-
-PATCHES=(
-	"${FILESDIR}"/pydocstyle-6.1.1-disarm-pip-install.patch
-	"${FILESDIR}"/${P}-tomli.patch
-)
-
-src_prepare() {
-	# poetry sucks
-	sed -i -e "s:0.0.0-dev:${PV}:" pyproject.toml || die
-	distutils-r1_src_prepare
-}

diff --git a/dev-python/pydocstyle/pydocstyle-6.2.2.ebuild b/dev-python/pydocstyle/pydocstyle-6.2.2.ebuild
deleted file mode 100644
index 8fda4e7cbe2b..000000000000
--- a/dev-python/pydocstyle/pydocstyle-6.2.2.ebuild
+++ /dev/null
@@ -1,48 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-DISTUTILS_USE_PEP517=poetry
-PYTHON_COMPAT=( pypy3 python3_{9..11} )
-
-inherit distutils-r1
-
-DESCRIPTION="Python docstring style checker"
-HOMEPAGE="
-	https://github.com/PyCQA/pydocstyle/
-	https://pypi.org/project/pydocstyle/
-"
-SRC_URI="
-	https://github.com/PyCQA/pydocstyle/archive/${PV}.tar.gz
-		-> ${P}.gh.tar.gz
-"
-
-LICENSE="MIT"
-SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-macos"
-
-RDEPEND="
-	>=dev-python/snowballstemmer-2.2.0[${PYTHON_USEDEP}]
-"
-BDEPEND="
-	test? (
-		$(python_gen_cond_dep '
-			dev-python/tomli[${PYTHON_USEDEP}]
-		' 3.{8..10})
-	)
-"
-
-distutils_enable_tests pytest
-# Requires network to lookup github issues
-#distutils_enable_sphinx docs dev-python/sphinx-rtd-theme dev-python/sphinxcontrib-issuetracker
-
-PATCHES=(
-	"${FILESDIR}"/pydocstyle-6.1.1-disarm-pip-install.patch
-)
-
-src_prepare() {
-	# poetry sucks
-	sed -i -e "s:0.0.0-dev:${PV}:" pyproject.toml || die
-	distutils-r1_src_prepare
-}


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

* [gentoo-commits] repo/gentoo:master commit in: dev-python/pydocstyle/files/, dev-python/pydocstyle/
@ 2023-02-17  7:41 Michał Górny
  0 siblings, 0 replies; 3+ messages in thread
From: Michał Górny @ 2023-02-17  7:41 UTC (permalink / raw
  To: gentoo-commits

commit:     6b057cbe70bb46fbc9983a876e4d924b61a128b9
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Fri Feb 17 07:40:10 2023 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Fri Feb 17 07:40:10 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6b057cbe

dev-python/pydocstyle: Remove old

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

 dev-python/pydocstyle/Manifest                     |  1 -
 .../pydocstyle/files/pydocstyle-6.1.1-tomli.patch  | 90 ----------------------
 dev-python/pydocstyle/pydocstyle-6.1.1-r2.ebuild   | 43 -----------
 3 files changed, 134 deletions(-)

diff --git a/dev-python/pydocstyle/Manifest b/dev-python/pydocstyle/Manifest
index 59b18c487eee..0cce48528328 100644
--- a/dev-python/pydocstyle/Manifest
+++ b/dev-python/pydocstyle/Manifest
@@ -1,3 +1,2 @@
-DIST pydocstyle-6.1.1.tar.gz 73982 BLAKE2B 6a896221fdcd257f0475472e1cf87ef892d8292a4c0faf661595adb17e2d18f4a8277cda498197309d34597c448203856c272256277a7e35fba20e2e5ba47f2b SHA512 ce4932a6601c80d05a46600f5af7df54798025a5f3dc41ab8cf1bc0d63e7f78b70cccb17dc99ddab25eda9abd639f91468fca1b1ceb4539708350212e481a156
 DIST pydocstyle-6.2.3.gh.tar.gz 77612 BLAKE2B f94b9c8232a3e96dad1d84d37bf7cc53f114edfddbd0dad725ff3bb79f39576a5fceff5a2b962e284e9d0d96ac8d71e5aa0406322af4bf8fdc73910348ff9190 SHA512 b275bd2367a3a6d4636a2879f503da15b9965bffe2750db87cbd3ca09fc3353a481a9c38e1b35b3b2aeeba019e9dd393d2cb65db2820d6343fb4c9881f7e6deb
 DIST pydocstyle-6.3.0.gh.tar.gz 78058 BLAKE2B 551da9af8baebcba4f1053e0d9495bff039a98c96ad229219cd37ac8ba9e3002fff8a136c5148144a5f84ed94a1414364d7c827ad010038f63961ce17a260ee3 SHA512 f8473b19ab6ef0b61787875558f9dd6f9f7f1954e1baa0010942af6d4de8dbca30c8c08be6acbf24aadd1c0a601ba9467b747026a6cd22379f0c4b84a38b57c7

diff --git a/dev-python/pydocstyle/files/pydocstyle-6.1.1-tomli.patch b/dev-python/pydocstyle/files/pydocstyle-6.1.1-tomli.patch
deleted file mode 100644
index 8be2adca5ba1..000000000000
--- a/dev-python/pydocstyle/files/pydocstyle-6.1.1-tomli.patch
+++ /dev/null
@@ -1,90 +0,0 @@
-From 4c9ed77d3629a69febdaa14d153d3db869b58e4f Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
-Date: Wed, 12 Oct 2022 16:37:40 +0200
-Subject: [PATCH] Use tomllib/tomli for reading .toml configs
-
-Use the built-in `tomllib` module in Python 3.11 and the modern `tomli`
-package in older Python versions to read .toml configs instead of
-the unmaintained and broken `toml` package.
-
-Fixes #599
-Fixes #600
----
- docs/release_notes.rst   |  1 +
- requirements/runtime.txt |  2 +-
- requirements/tests.txt   |  1 -
- setup.py                 |  2 +-
- src/pydocstyle/config.py | 20 ++++++++++++--------
- 5 files changed, 15 insertions(+), 11 deletions(-)
-
-diff --git a/requirements/runtime.txt b/requirements/runtime.txt
-index 80302751..b4e9ca76 100644
---- a/requirements/runtime.txt
-+++ b/requirements/runtime.txt
-@@ -1,2 +1,2 @@
- snowballstemmer==1.2.1
--toml==0.10.2
-+tomli==2.0.1; python_version < "3.11"
-diff --git a/setup.py b/setup.py
-index a9c5df1c..6c0671c7 100644
---- a/setup.py
-+++ b/setup.py
-@@ -8,7 +8,7 @@
-     'snowballstemmer',
- ]
- extra_requirements = {
--    'toml': ['toml'],
-+    'toml': ['tomli; python_version < "3.11"'],
- }
- 
- 
-diff --git a/src/pydocstyle/config.py b/src/pydocstyle/config.py
-index ed00c874..db7ed1b6 100644
---- a/src/pydocstyle/config.py
-+++ b/src/pydocstyle/config.py
-@@ -4,6 +4,7 @@
- import itertools
- import operator
- import os
-+import sys
- from collections import namedtuple
- from collections.abc import Set
- from configparser import NoOptionError, NoSectionError, RawConfigParser
-@@ -13,10 +14,13 @@
- from .utils import __version__, log
- from .violations import ErrorRegistry, conventions
- 
--try:
--    import toml
--except ImportError:  # pragma: no cover
--    toml = None  # type: ignore
-+if sys.version_info >= (3, 11):
-+    import tomllib
-+else:
-+    try:
-+        import tomli as tomllib
-+    except ImportError:  # pragma: no cover
-+        tomllib = None  # type: ignore
- 
- 
- def check_initialized(method):
-@@ -59,15 +63,15 @@ def read(self, filenames, encoding=None):
-         read_ok = []
-         for filename in filenames:
-             try:
--                with open(filename, encoding=encoding) as fp:
--                    if not toml:
-+                with open(filename, "rb") as fp:
-+                    if not tomllib:
-                         log.warning(
-                             "The %s configuration file was ignored, "
--                            "because the `toml` package is not installed.",
-+                            "because the `tomli` package is not installed.",
-                             filename,
-                         )
-                         continue
--                    self._config.update(toml.load(fp))
-+                    self._config.update(tomllib.load(fp))
-             except OSError:
-                 continue
-             if isinstance(filename, os.PathLike):

diff --git a/dev-python/pydocstyle/pydocstyle-6.1.1-r2.ebuild b/dev-python/pydocstyle/pydocstyle-6.1.1-r2.ebuild
deleted file mode 100644
index f3c4f96d22f6..000000000000
--- a/dev-python/pydocstyle/pydocstyle-6.1.1-r2.ebuild
+++ /dev/null
@@ -1,43 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-DISTUTILS_USE_PEP517=setuptools
-PYTHON_COMPAT=( pypy3 python3_{9..11} )
-
-inherit distutils-r1
-
-DESCRIPTION="Python docstring style checker"
-HOMEPAGE="
-	https://github.com/PyCQA/pydocstyle/
-	https://pypi.org/project/pydocstyle/
-"
-SRC_URI="
-	https://github.com/PyCQA/pydocstyle/archive/${PV}.tar.gz
-		-> ${P}.tar.gz
-"
-
-LICENSE="MIT"
-SLOT="0"
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-macos"
-
-RDEPEND="
-	dev-python/snowballstemmer[${PYTHON_USEDEP}]
-"
-BDEPEND="
-	test? (
-		$(python_gen_cond_dep '
-			dev-python/tomli[${PYTHON_USEDEP}]
-		' 3.{8..10})
-	)
-"
-
-distutils_enable_tests pytest
-# Requires network to lookup github issues
-#distutils_enable_sphinx docs dev-python/sphinx-rtd-theme dev-python/sphinxcontrib-issuetracker
-
-PATCHES=(
-	"${FILESDIR}"/pydocstyle-6.1.1-disarm-pip-install.patch
-	"${FILESDIR}"/${P}-tomli.patch
-)


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

end of thread, other threads:[~2023-02-17  7:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-16 20:26 [gentoo-commits] repo/gentoo:master commit in: dev-python/pydocstyle/files/, dev-python/pydocstyle/ Michał Górny
  -- strict thread matches above, loose matches on Subject: below --
2023-02-17  7:41 Michał Górny
2023-01-03  6:23 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