public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Benjamin A. Beasley <code@musicinmybrain.net>
To: git-commits@fedoraproject.org
Subject: [rpms/python-pydantic] epel9: Update to 1.10.27
Date: Sat, 21 Nov 2026 19:07:23 GMT [thread overview]
Message-ID: <179528804379.1.12796155221692636270.rpms-python-pydantic-574540917a97@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/python-pydantic
Branch : epel9
Commit : 574540917a97809e9d8ea30a8072fc402368ccf1
Author : Benjamin A. Beasley <code@musicinmybrain.net>
Date : 2026-11-21T09:59:17+00:00
Stats : +176/-12 in 4 file(s)
URL : https://src.fedoraproject.org/rpms/python-pydantic/c/574540917a97809e9d8ea30a8072fc402368ccf1?branch=epel9
Log:
Update to 1.10.27
- Enable the Cython-based compiled extension for better performance
- Fixes CVE-2026-133276, CVE-2026-133429, and CVE-2026-133421
---
diff --git a/.gitignore b/.gitignore
index 570e6f5..ee5e016 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,3 +3,4 @@
/python-pydantic-1.10.12.tar.gz
/python-pydantic-1.10.13.tar.gz
/python-pydantic-1.10.14.tar.gz
+/python-pydantic-1.10.27.tar.gz
diff --git a/python-pydantic.spec b/python-pydantic.spec
index a95463b..fad3d06 100644
--- a/python-pydantic.spec
+++ b/python-pydantic.spec
@@ -1,14 +1,25 @@
Name: python-pydantic
-Version: 1.10.14
+Version: 1.10.27
Release: %autorelease
Summary: Data validation using Python type hinting
License: MIT
URL: https://github.com/pydantic/pydantic
-Source: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz
-BuildArch: noarch
+Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz
+# Pydantic v1 was ported from setup.py to pyproject.toml in
+# https://github.com/pydantic/pydantic/commit/4a52e6a8cc24ba02a59e0c24d00e3721d3e2c834,
+# but this requires setuptools≥68, which we don’t have in EPEL9.
+#
+# Instead, we start with a copy of setup.py just before this change,
+# https://github.com/pydantic/pydantic/raw/8f84b498993c3b4bc4b63952ce481e86bc0ad297/setup.py
+# and maintain any necessary changes to track the upstream pyproject.toml
+# locally. We can still use the latest upstream pyproject.toml as long as we
+# remove “build-backend = 'setuptools.build_meta'” from [build-system].
+Source1: setup.py
+
+BuildRequires: tomcli
+BuildRequires: gcc
-BuildRequires: python3-devel
# For check phase
BuildRequires: python3dist(hypothesis)
BuildRequires: python3dist(pytest)
@@ -24,38 +35,44 @@ Data validation and settings management using python type hinting.}
Summary: %{summary}
Recommends: python3-pydantic+email
-
%description -n python3-pydantic %{_description}
+%pyproject_extras_subpkg email,dotenv -n python3-pydantic
+
+
%prep
%autosetup -n pydantic-%{version}
+# See notes above Source1. We also make do with Cython v0.29.
+cp --preserve '%{SOURCE1}' .
+tomcli set pyproject.toml del build-system.build-backend
+tomcli set pyproject.toml list build-system.requires setuptools Cython
+
%generate_buildrequires
-%pyproject_buildrequires -x email -x dotenv
+%pyproject_buildrequires --extras email --extras dotenv
%build
+export CYTHON_NTHREADS='%{_smp_build_ncpus}'
%pyproject_wheel
%install
%pyproject_install
-%pyproject_save_files pydantic
+%pyproject_save_files --assert-license pydantic
%check
# Disable mypy plugin tests. We don't use it for downstream packaging.
-%pytest -Wdefault --ignore=tests/mypy/test_mypy.py
+%pyproject_check_import --exclude pydantic.mypy --exclude pydantic.v1.mypy
+%pytest -Wdefault --ignore=tests/mypy/test_mypy.py -rs
%files -n python3-pydantic -f %{pyproject_files}
-%license LICENSE
%doc README.md docs/
-%pyproject_extras_subpkg email,dotenv -n python3-pydantic
-
%changelog
%autochangelog
diff --git a/setup.py b/setup.py
new file mode 100644
index 0000000..509a25c
--- /dev/null
+++ b/setup.py
@@ -0,0 +1,146 @@
+import os
+import re
+import sys
+from importlib.machinery import SourceFileLoader
+from pathlib import Path
+
+from setuptools import setup
+
+if os.name == 'nt':
+ from setuptools.command import build_ext
+
+ def get_export_symbols(self, ext):
+ """
+ Slightly modified from:
+ https://github.com/python/cpython/blob/8849e5962ba481d5d414b3467a256aba2134b4da\
+ /Lib/distutils/command/build_ext.py#L686-L703
+ """
+ # Patch from: https://bugs.python.org/issue35893
+ parts = ext.name.split('.')
+ if parts[-1] == '__init__':
+ suffix = parts[-2]
+ else:
+ suffix = parts[-1]
+
+ # from here on unchanged
+ try:
+ # Unicode module name support as defined in PEP-489
+ # https://www.python.org/dev/peps/pep-0489/#export-hook-name
+ suffix.encode('ascii')
+ except UnicodeEncodeError:
+ suffix = 'U' + suffix.encode('punycode').replace(b'-', b'_').decode('ascii')
+
+ initfunc_name = 'PyInit_' + suffix
+ if initfunc_name not in ext.export_symbols:
+ ext.export_symbols.append(initfunc_name)
+ return ext.export_symbols
+
+ build_ext.build_ext.get_export_symbols = get_export_symbols
+
+
+class ReplaceLinks:
+ def __init__(self):
+ self.links = set()
+
+ def replace_issues(self, m):
+ id = m.group(1)
+ self.links.add(f'.. _#{id}: https://github.com/pydantic/pydantic/issues/{id}')
+ return f'`#{id}`_'
+
+ def replace_users(self, m):
+ name = m.group(2)
+ self.links.add(f'.. _@{name}: https://github.com/{name}')
+ return f'{m.group(1)}`@{name}`_'
+
+ def extra(self):
+ return '\n\n' + '\n'.join(sorted(self.links)) + '\n'
+
+
+description = 'Data validation and settings management using python type hints'
+THIS_DIR = Path(__file__).resolve().parent
+try:
+ history = (THIS_DIR / 'HISTORY.md').read_text(encoding='utf-8')
+ history = re.sub(r'(\s)#(\d+)', r'\1[#\2](https://github.com/pydantic/pydantic/issues/\2)', history)
+ history = re.sub(r'( +)@([\w\-]+)', r'\1[@\2](https://github.com/\2)', history, flags=re.I)
+ history = re.sub('@@', '@', history)
+
+ long_description = (THIS_DIR / 'README.md').read_text(encoding='utf-8') + '\n\n' + history
+except FileNotFoundError:
+ long_description = description + '.\n\nSee https://pydantic-docs.helpmanual.io/ for documentation.'
+
+# avoid loading the package before requirements are installed:
+version = SourceFileLoader('version', 'pydantic/version.py').load_module()
+
+ext_modules = None
+if not any(arg in sys.argv for arg in ['clean', 'check']) and 'SKIP_CYTHON' not in os.environ:
+ from Cython.Build import cythonize
+
+ # For cython test coverage install with `make build-trace`
+ compiler_directives = {}
+ if 'CYTHON_TRACE' in sys.argv:
+ if sys.version_info >= (3, 12):
+ raise RuntimeError("Cython 0.x does not support tracing for Python 3.12+.")
+ compiler_directives['linetrace'] = True
+ # Set CFLAG to all optimizations (-O3), add `-g0` to reduce size of binaries, see #2276
+ # Any additional CFLAGS will be appended. Only the last optimization flag will have effect
+ # Downstream patch: don’t do this! We should respect distro compiler flags
+ # and produce usable debuginfo.
+ # os.environ['CFLAGS'] = '-O3 -g0 ' + os.environ.get('CFLAGS', '')
+ ext_modules = cythonize(
+ 'pydantic/*.py',
+ exclude=['pydantic/generics.py'],
+ nthreads=int(os.getenv('CYTHON_NTHREADS', 0)),
+ language_level=3,
+ compiler_directives=compiler_directives,
+ )
+
+setup(
+ name='pydantic',
+ version=str(version.VERSION),
+ description=description,
+ long_description=long_description,
+ long_description_content_type='text/markdown',
+ classifiers=[
+ 'Development Status :: 5 - Production/Stable',
+ 'Programming Language :: Python',
+ 'Programming Language :: Python :: 3',
+ 'Programming Language :: Python :: 3 :: Only',
+ 'Programming Language :: Python :: 3.7',
+ 'Programming Language :: Python :: 3.8',
+ 'Programming Language :: Python :: 3.9',
+ 'Programming Language :: Python :: 3.10',
+ 'Programming Language :: Python :: 3.11',
+ 'Programming Language :: Python :: 3.12',
+ 'Programming Language :: Python :: 3.13',
+ 'Programming Language :: Python :: 3.14',
+ 'Intended Audience :: Developers',
+ 'Intended Audience :: Information Technology',
+ 'Intended Audience :: System Administrators',
+ 'License :: OSI Approved :: MIT License',
+ 'Operating System :: Unix',
+ 'Operating System :: POSIX :: Linux',
+ 'Environment :: Console',
+ 'Environment :: MacOS X',
+ 'Framework :: Hypothesis',
+ 'Framework :: Pydantic',
+ 'Topic :: Software Development :: Libraries :: Python Modules',
+ 'Topic :: Internet',
+ ],
+ author='Samuel Colvin',
+ author_email='s@muelcolvin.com',
+ url='https://github.com/pydantic/pydantic',
+ license='MIT',
+ packages=['pydantic', 'pydantic.v1'],
+ package_data={'pydantic': ['py.typed']},
+ python_requires='>=3.7',
+ zip_safe=False, # https://mypy.readthedocs.io/en/latest/installed_packages.html
+ install_requires=[
+ 'typing-extensions>=4.2.0'
+ ],
+ extras_require={
+ 'email': ['email-validator>=1.0.3'],
+ 'dotenv': ['python-dotenv>=0.10.4'],
+ },
+ ext_modules=ext_modules,
+ entry_points={'hypothesis': ['_ = pydantic._hypothesis_plugin']},
+)
diff --git a/sources b/sources
index 0023212..ea69680 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (python-pydantic-1.10.14.tar.gz) = ba90fc57172b395398b87cac44778e842fba2d28c31d8d90ad49bf870c27da71b9eef2a5cf786b0de0a3ee84af187c0759b8b27a42edaa0feb7183a2b99aa52a
+SHA512 (python-pydantic-1.10.27.tar.gz) = e605fc3b77d0cd212a66385977fcf1294620058bdfb9a19d62f8d5b45d67c3fda3355a84d7f81bcc10da4aaaf770474800656f85d6bf139cd986982cf543383c
reply other threads:[~2026-11-21 19:07 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=179528804379.1.12796155221692636270.rpms-python-pydantic-574540917a97@fedoraproject.org \
--to=code@musicinmybrain.net \
--cc=git-commits@fedoraproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox