From c9813f037417909aea003afa78813e6bab104d8e Mon Sep 17 00:00:00 2001 From: Michael Howitz Date: Fri, 7 Jun 2024 08:38:39 +0200 Subject: [PATCH] Drop support for Python 3.7. --- CHANGES.rst | 2 ++ setup.py | 4 ++-- src/five/formlib/tests/forms.txt | 18 +++++++++--------- 3 files changed, 13 insertions(+), 11 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index ec2880b..38c8f11 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -4,9 +4,11 @@ Changelog 4.0 (unreleased) ---------------- +* Add support for Python 3.12. * Drop support for Python 3.7. + 3.0 (2023-02-01) ---------------- diff --git a/setup.py b/setup.py index 15de42b..33aacdc 100644 --- a/setup.py +++ b/setup.py @@ -19,11 +19,11 @@ "License :: OSI Approved :: Zope Public License", "Operating System :: OS Independent", "Programming Language :: Python :: 3", - "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 :: Implementation :: CPython", "Topic :: Internet :: WWW/HTTP :: Dynamic Content", "Topic :: Internet :: WWW/HTTP :: WSGI :: Application", @@ -34,7 +34,7 @@ package_dir={'': 'src'}, namespace_packages=['five'], include_package_data=True, - python_requires='>=3.7', + python_requires='>=3.8', install_requires=[ 'setuptools', 'transaction', diff --git a/src/five/formlib/tests/forms.txt b/src/five/formlib/tests/forms.txt index 210f7f6..92afdd1 100644 --- a/src/five/formlib/tests/forms.txt +++ b/src/five/formlib/tests/forms.txt @@ -47,7 +47,7 @@ An unprotected form can be accessed with anonymously: We don't have access, we will not be able to get to the protected add form: - >>> browser.open("http://localhost/test_folder_1_/ftf/+/protectedaddform.html") + >>> browser.open("http://localhost/test_folder_1_/ftf/+/protectedaddform.html") >>> print(browser.headers) Status: 401 ... ... @@ -83,7 +83,7 @@ specified attribute is the default value: >>> edittest = self.folder.ftf.edittest >>> str(edittest.title) 'title' - >>> edittest.description #XXX shouldn't we get a u'' here??? + >>> edittest.description #XXX shouldn't we get a '' here??? We can also verify that the IObjectCreatedEvent was fired, and the test subscriber we registered set a flag indicating such: @@ -124,7 +124,7 @@ We will see that nothing has changed: >>> str(edittest.title) 'title' - >>> edittest.description #XXX shouldn't we get a u'' here??? + >>> edittest.description #XXX shouldn't we get a '' here??? >>> getattr(edittest, '_modified_flag', False) False @@ -198,12 +198,12 @@ the content, this means that no IObjectModified event should have been fired Unicode-safety of forms ----------------------- -Automatically generated forms support unicode (native strings -under Python 3). Here we will enter the following two -chinese sequences (How do you do? and I'm doing good) in forms: +Automatically generated forms support native strings (formerly known as +``unicode``). Here we will enter the following two chinese sequences ("How do +you do?" and "I'm doing good.") in forms: - >>> ni_hao = u'\u4f60\u597d' - >>> wo_hen_hao = u'\u6211\u5f88\u597d' + >>> ni_hao = '\u4f60\u597d' + >>> wo_hen_hao = '\u6211\u5f88\u597d' First, it's imaginable that we make a mistake and enter one of the phrases in the integer field: @@ -316,7 +316,7 @@ element to the list: Now, let's enter some more Chinese: - >>> de_guo = u'\u5fb7\u56fd' + >>> de_guo = '\u5fb7\u56fd' >>> print(http_request( ... "/test_folder_1_/ftf/unicodetest/@@edit.html", (