diff options
Diffstat (limited to 'dev-python/faker')
-rw-r--r-- | dev-python/faker/Manifest | 5 | ||||
-rw-r--r-- | dev-python/faker/faker-37.1.0.ebuild | 7 | ||||
-rw-r--r-- | dev-python/faker/faker-37.3.0.ebuild | 42 | ||||
-rw-r--r-- | dev-python/faker/files/faker-37.1.0-py314.patch | 45 |
4 files changed, 97 insertions, 2 deletions
diff --git a/dev-python/faker/Manifest b/dev-python/faker/Manifest index a8c1914d56e8..2f808eace1b6 100644 --- a/dev-python/faker/Manifest +++ b/dev-python/faker/Manifest @@ -1,3 +1,6 @@ +AUX faker-37.1.0-py314.patch 1739 BLAKE2B 87344a97edfe65115b8bec82e4f6a2a0fb58a13bca522e0f4f753f4eb64cabfcbbe4222cb856303949f664b6e9ee7b6799b693fdba9c5aa0bd01471876d76d85 SHA512 e6037a1d7586865c5100ebf1c56aec81c4f77456c7d561e9da6aab22563e60e6bce711e15c16629358c6230d7587e7ba225f9ab938b80c3ed4843d2c7bc05789 DIST faker-37.1.0.tar.gz 1875707 BLAKE2B 67ae3cecd677fde963a6177ebd56f868487cb872d91e825cbef71c73ec227d0f7f6376e8580e587750cfab7fd35e823b67bf655ae883ef701caacf7c0424f16e SHA512 f7abea076457b8eaf391c600f5f91eed9ec11f48e8d0f48e43c4d3a318a8b40da492c23052d3bd6d84b7472a87459cab75c63872492544423f53aec4b596fbf7 -EBUILD faker-37.1.0.ebuild 952 BLAKE2B 83e99246ec77efacd7ff9602044ccd209bb8982cf79590c89ae4023329c598525842129e423b93b8eb440ccfedd10e4c8af0ccb4b9cb2939faa322ba5d483b43 SHA512 83316b1a1f33b0f9284793a437eb0600dae71ba165047c41aeee01c059025218a3534eab1d42db1328765a3c7117ae827caff47c461e84db925e132b0208fb7c +DIST faker-37.3.0.tar.gz 1901376 BLAKE2B bb8506dc82848e26c1eb47e7e237de4c6aa6b9d0b40ff7f3ae7586d700067ac1ffd95f0a4fcb63544523a9f3e99a27ed173fd4c39016989ae9d1c1b1c5cc8fd3 SHA512 da0a2fdc6646a581802c47c6bcf66c4c1658d4b72d0b0972c13ac5c1c991d96204bd8efd73c6042dd4785614f115b99c6221e243f6ed86326ab69882c1470a5f +EBUILD faker-37.1.0.ebuild 1036 BLAKE2B 75b0a38a8e7069ea9daa8e9611c7199c04d47caa73f708b3bce8d0539cce73cd863c816bf006ade36ab1762dba1312e3028ad2b40956142b09e554f3d0e2a970 SHA512 2321e1d2e567212e95767426e9a4a21f4bce7b30b11a0c7cd446c2a4c043dc0a9695bd830005387ab1c607e0e1ae5e3a4a23804451c40e4b7b154f740a60f86f +EBUILD faker-37.3.0.ebuild 953 BLAKE2B 43d761890051958e03acc9044b3ab28a9aa969aa4ee3ec9414d71acea2da07848c4ca5ca73e9c17da0c92064a5d311db08435601c84ec09fc2445dd55f160072 SHA512 3a206eb7e74ab665bcb54e926098bdd1a4365218437262b6554e6b829842644ec421062ff54acd23a8eafa3a1e0ff9cd95a0a701d0cbb5635c2ae9feecf93194 MISC metadata.xml 498 BLAKE2B c9b7885dc7d34f2263068624a6b07ac6f1ec8078cc11abb6137612ba57edffefc48dae2708284aa83ecc941ebb2d3b8a87a143648e404a0683e75bb6c078f4e2 SHA512 0b385bbbfbb026803526e43c6c43965ff75f42d3ab133603708b187686aac29de508856e5e8ae7622a66b99032efa97f95c21625e10d074c858d8aff7446a312 diff --git a/dev-python/faker/faker-37.1.0.ebuild b/dev-python/faker/faker-37.1.0.ebuild index 1f51daec1777..57e328c855a3 100644 --- a/dev-python/faker/faker-37.1.0.ebuild +++ b/dev-python/faker/faker-37.1.0.ebuild @@ -5,7 +5,7 @@ EAPI=8 DISTUTILS_USE_PEP517=setuptools PYPI_PN=${PN^} -PYTHON_COMPAT=( pypy3 pypy3_11 python3_{10..13} ) +PYTHON_COMPAT=( pypy3_11 python3_{11..14} ) inherit distutils-r1 pypi @@ -34,6 +34,11 @@ BDEPEND=" # note: tests are flaky with xdist distutils_enable_tests pytest +PATCHES=( + # https://github.com/joke2k/faker/pull/2213 + "${FILESDIR}/${P}-py314.patch" +) + python_test() { local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 local -x PYTEST_PLUGINS=faker.contrib.pytest.plugin diff --git a/dev-python/faker/faker-37.3.0.ebuild b/dev-python/faker/faker-37.3.0.ebuild new file mode 100644 index 000000000000..4e1028448c20 --- /dev/null +++ b/dev-python/faker/faker-37.3.0.ebuild @@ -0,0 +1,42 @@ +# Copyright 2022-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_USE_PEP517=setuptools +PYPI_PN=${PN^} +PYTHON_COMPAT=( pypy3_11 python3_{11..14} ) + +inherit distutils-r1 pypi + +DESCRIPTION="A Python package that generates fake data for you" +HOMEPAGE=" + https://github.com/joke2k/faker/ + https://pypi.org/project/Faker/ +" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64 ~arm ~arm64 ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" + +RDEPEND=" + dev-python/tzdata[${PYTHON_USEDEP}] + !dev-ruby/faker +" +BDEPEND=" + test? ( + dev-python/freezegun[${PYTHON_USEDEP}] + dev-python/pillow[${PYTHON_USEDEP},tiff] + dev-python/validators[${PYTHON_USEDEP}] + ) +" + +# note: tests are flaky with xdist +distutils_enable_tests pytest + +python_test() { + local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 + local -x PYTEST_PLUGINS=faker.contrib.pytest.plugin + epytest + epytest --exclusive-faker-session tests/pytest/session_overrides +} diff --git a/dev-python/faker/files/faker-37.1.0-py314.patch b/dev-python/faker/files/faker-37.1.0-py314.patch new file mode 100644 index 000000000000..9f6931ba7a8d --- /dev/null +++ b/dev-python/faker/files/faker-37.1.0-py314.patch @@ -0,0 +1,45 @@ +From eaad7bb42385793a0622376caf3b832a7836781e Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org> +Date: Wed, 14 May 2025 13:17:48 +0200 +Subject: [PATCH] Fix type annotations for Python 3.14 + +Fix type annotations for `Provider.json()` to avoid name collision +in Python 3.14.0b1 where `json` is resolved to the `json()` method +itself rather than the `json` module. Import `JSONEncoder` directly +instead, so we can reference it without `json.`. + +Fixes #2212 +--- + faker/providers/misc/__init__.py | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/faker/providers/misc/__init__.py b/faker/providers/misc/__init__.py +index dca3363e..6ed2e958 100644 +--- a/faker/providers/misc/__init__.py ++++ b/faker/providers/misc/__init__.py +@@ -9,6 +9,7 @@ import tarfile + import uuid + import zipfile + ++from json import JSONEncoder + from typing import Any, Callable, Dict, List, Literal, Optional, Sequence, Set, Tuple, Type, Union, overload + + from faker.exceptions import UnsupportedFeature +@@ -536,7 +537,7 @@ class Provider(BaseProvider): + data_columns: Optional[List] = None, + num_rows: int = 10, + indent: Optional[int] = None, +- cls: Optional[Type[json.JSONEncoder]] = None, ++ cls: Optional[Type[JSONEncoder]] = None, + ) -> bytes: + """ + Generate random JSON structure and return as bytes. +@@ -551,7 +552,7 @@ class Provider(BaseProvider): + data_columns: Optional[List] = None, + num_rows: int = 10, + indent: Optional[int] = None, +- cls: Optional[Type[json.JSONEncoder]] = None, ++ cls: Optional[Type[JSONEncoder]] = None, + ) -> str: + """ + Generate random JSON structure values. |