From b52916545c1decc1b1d09a51fa95cdd3dd161cc4 Mon Sep 17 00:00:00 2001 From: Stefano Rivera Date: Sun, 25 Dec 2022 13:38:54 -0400 Subject: Update links to Python Support schedule --- docs/narr/upgrading.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/narr/upgrading.rst b/docs/narr/upgrading.rst index 020f2ed37..e92a46285 100644 --- a/docs/narr/upgrading.rst +++ b/docs/narr/upgrading.rst @@ -86,10 +86,10 @@ At the time of a Pyramid version release, each supports all versions of Python through the end of their lifespans. The end-of-life for a given version of Python is when security updates are no longer released. -- `Python 3.7 Lifespan `_ 2023-06-27. -- `Python 3.8 Lifespan `_ 2024-10. -- `Python 3.9 Lifespan `_ 2025-10. -- `Python 3.10 Lifespan `_ 2026-10. +- `Python 3.7 Lifespan `_ 2023-06-27. +- `Python 3.8 Lifespan `_ 2024-10. +- `Python 3.9 Lifespan `_ 2025-10. +- `Python 3.10 Lifespan `_ 2026-10. To determine the Python support for a specific release of Pyramid, view its ``tox.ini`` file at the root of the repository's version. -- cgit v1.2.3 From aa25fbc378cd4d48fd2eb2c0d55ae488e2d6c9a0 Mon Sep 17 00:00:00 2001 From: Stefano Rivera Date: Sun, 25 Dec 2022 13:40:27 -0400 Subject: Run tests on Python 3.11 --- .github/workflows/ci-tests.yml | 1 + HACKING.txt | 3 ++- docs/narr/install.rst | 4 ++-- tox.ini | 2 +- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci-tests.yml b/.github/workflows/ci-tests.yml index 605ebdae0..13b849d0f 100644 --- a/.github/workflows/ci-tests.yml +++ b/.github/workflows/ci-tests.yml @@ -19,6 +19,7 @@ jobs: - "3.8" - "3.9" - "3.10" + - "3.11" - "pypy-3.8" os: - "ubuntu-20.04" diff --git a/HACKING.txt b/HACKING.txt index 9cc2e8edb..bb7045ed6 100644 --- a/HACKING.txt +++ b/HACKING.txt @@ -50,7 +50,8 @@ In order to add a feature to Pyramid: - The feature must be documented in both the API and narrative documentation (in `docs/`). -- The feature must work fully on the following CPython versions: 3.7, 3.8, 3.9, and 3.10 on both UNIX and Windows. +- The feature must work fully on the following CPython versions: 3.7, 3.8, 3.9, + 3.10, and 3.11 on both UNIX and Windows. - The feature must work on the latest version of PyPy3. diff --git a/docs/narr/install.rst b/docs/narr/install.rst index 882b40d10..d07692d86 100644 --- a/docs/narr/install.rst +++ b/docs/narr/install.rst @@ -21,8 +21,8 @@ the following sections. .. sidebar:: Python Versions - As of this writing, :app:`Pyramid` is tested against Python 3.7, 3.8, 3.9, - and 3.10 and PyPy (matches CPython version 3.8). + As of this writing, :app:`Pyramid` is tested against Python 3.7, + 3.8, 3.9, 3.10, 3.11 and PyPy (matches CPython version 3.8). :app:`Pyramid` is known to run on all popular Unix-like systems such as Linux, macOS, and FreeBSD, as well as on Windows platforms. It is also known to diff --git a/tox.ini b/tox.ini index a64ad5387..32341b56f 100644 --- a/tox.ini +++ b/tox.ini @@ -1,7 +1,7 @@ [tox] envlist = lint, - py37,py38,py39,py310,pypy3, + py37,py38,py39,py310,py311,pypy3, py38-cover,coverage, docs -- cgit v1.2.3 From ce639190b4a61b4d51c5cacbe634451cddfd6c39 Mon Sep 17 00:00:00 2001 From: Stefano Rivera Date: Sun, 25 Dec 2022 13:40:47 -0400 Subject: Declare support for python 3.11 --- CHANGES.rst | 2 ++ docs/narr/upgrading.rst | 1 + setup.py | 1 + 3 files changed, 4 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index 0ee6fd30d..698aec734 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -4,6 +4,8 @@ unreleased Features -------- +- Pyramid adds support for Python 3.11. + Bug Fixes --------- diff --git a/docs/narr/upgrading.rst b/docs/narr/upgrading.rst index e92a46285..5fc3dc9fa 100644 --- a/docs/narr/upgrading.rst +++ b/docs/narr/upgrading.rst @@ -90,6 +90,7 @@ Python is when security updates are no longer released. - `Python 3.8 Lifespan `_ 2024-10. - `Python 3.9 Lifespan `_ 2025-10. - `Python 3.10 Lifespan `_ 2026-10. +- `Python 3.11 Lifespan `_ 2027-10. To determine the Python support for a specific release of Pyramid, view its ``tox.ini`` file at the root of the repository's version. diff --git a/setup.py b/setup.py index 17434313e..42d7d91a2 100644 --- a/setup.py +++ b/setup.py @@ -78,6 +78,7 @@ setup( "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", "Framework :: Pyramid", -- cgit v1.2.3 From 109345ccc7779bb5eda68d2c6f6f8808065666bc Mon Sep 17 00:00:00 2001 From: Stefano Rivera Date: Thu, 29 Dec 2022 14:52:23 -0400 Subject: Sign CONTRIBUTORS.txt --- CONTRIBUTORS.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CONTRIBUTORS.txt b/CONTRIBUTORS.txt index edce6e9c7..92ecd67de 100644 --- a/CONTRIBUTORS.txt +++ b/CONTRIBUTORS.txt @@ -358,3 +358,5 @@ Contributors - Jens Troeger, 2021/04/08 - Karthikeyan Singaravelan, 2021/08/24 + +- Stefano Rivera, 2022/12/29 -- cgit v1.2.3 From 7ecd8d6f75d9d21f3f7b10e4c84958cf3aa8fb17 Mon Sep 17 00:00:00 2001 From: Stefano Rivera Date: Thu, 29 Dec 2022 14:55:08 -0400 Subject: Drop l*gettext() from pyramid.i18n Python 3.8 deprecated l*gettext() (bpo-33710), and it was removed from Python in 3.11 (bpo-44235). In most cases on Python 3, the l variants aren't useful, and difficult to use correctly. This adds support for Python 3.11. --- CHANGES.rst | 3 +++ src/pyramid/i18n.py | 12 ------------ tests/test_i18n.py | 12 ------------ 3 files changed, 3 insertions(+), 24 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index 698aec734..b9eacd894 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -13,6 +13,9 @@ Backward Incompatibilities -------------------------- - Pyramid is no longer tested on, nor supports Python 3.6 +- Pyramid drops support for l*gettext() methods in the i18n module. + These have been deprecated in Python's gettext module since 3.8, and + removed in Python 3.11. Documentation Changes --------------------- diff --git a/src/pyramid/i18n.py b/src/pyramid/i18n.py index cded99ca5..e7710f08d 100644 --- a/src/pyramid/i18n.py +++ b/src/pyramid/i18n.py @@ -335,12 +335,6 @@ class Translations(gettext.GNUTranslations): """ return self._domains.get(domain, self).gettext(message) - def ldgettext(self, domain, message): - """Like ``lgettext()``, but look the message up in the specified - domain. - """ - return self._domains.get(domain, self).lgettext(message) - def dugettext(self, domain, message): """Like ``ugettext()``, but look the message up in the specified domain. @@ -353,12 +347,6 @@ class Translations(gettext.GNUTranslations): """ return self._domains.get(domain, self).ngettext(singular, plural, num) - def ldngettext(self, domain, singular, plural, num): - """Like ``lngettext()``, but look the message up in the specified - domain. - """ - return self._domains.get(domain, self).lngettext(singular, plural, num) - def dungettext(self, domain, singular, plural, num): """Like ``ungettext()`` but look the message up in the specified domain. diff --git a/tests/test_i18n.py b/tests/test_i18n.py index 206eea290..a4834cedc 100644 --- a/tests/test_i18n.py +++ b/tests/test_i18n.py @@ -421,11 +421,6 @@ class TestTranslations(unittest.TestCase): self.assertEqual(t.dgettext('messages', 'foo'), 'Voh') self.assertEqual(t.dgettext('messages1', 'foo'), 'VohD') - def test_ldgettext(self): - t = self._makeOne() - self.assertEqual(t.ldgettext('messages', 'foo'), b'Voh') - self.assertEqual(t.ldgettext('messages1', 'foo'), b'VohD') - def test_dugettext(self): t = self._makeOne() self.assertEqual(t.dugettext('messages', 'foo'), 'Voh') @@ -436,13 +431,6 @@ class TestTranslations(unittest.TestCase): self.assertEqual(t.dngettext('messages', 'foo1', 'foos1', 1), 'Voh1') self.assertEqual(t.dngettext('messages1', 'foo1', 'foos1', 1), 'VohD1') - def test_ldngettext(self): - t = self._makeOne() - self.assertEqual(t.ldngettext('messages', 'foo1', 'foos1', 1), b'Voh1') - self.assertEqual( - t.ldngettext('messages1', 'foo1', 'foos1', 1), b'VohD1' - ) - def test_dungettext(self): t = self._makeOne() self.assertEqual(t.dungettext('messages', 'foo1', 'foos1', 1), 'Voh1') -- cgit v1.2.3