Merge lp:~jelmer/brz/python3.12 into lp:brz/3.3
- python3.12
- Merge into 3.3
Status: | Merged |
---|---|
Approved by: | Jelmer Vernooij |
Approved revision: | 7828 |
Merged at revision: | 7823 |
Proposed branch: | lp:~jelmer/brz/python3.12 |
Merge into: | lp:brz/3.3 |
Diff against target: |
148 lines (+19/-12) 9 files modified
breezy/bzr/tests/test__static_tuple.py (+1/-1) breezy/bzr/tests/test_bundle.py (+1/-0) breezy/doc_generate/__init__.py (+3/-2) breezy/forge.py (+6/-0) breezy/osutils.py (+4/-2) breezy/plugins/weave_fmt/xml4.py (+1/-1) breezy/tests/test_import_tariff.py (+0/-4) breezy/tests/test_selftest.py (+2/-2) pyproject.toml (+1/-0) |
To merge this branch: | bzr merge lp:~jelmer/brz/python3.12 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Jelmer Vernooij | Approve | ||
Review via email: mp+459757@code.launchpad.net |
Commit message
Fix tests on Python 3.12
Description of the change
Fix tests on Python 3.12
Jelmer Vernooij (jelmer) : | # |
The Breezy Bot (the-breezy-bot) wrote : | # |
The Breezy Bot (the-breezy-bot) wrote : | # |
The attempt to merge lp:~jelmer/brz/python3.12 into lp:brz/3.3 failed. Command exited with 2.
Below is the output from the failed tests.
Collecting setuptools-gettext
Using cached setuptools_
Requirement already satisfied: types-paramiko in /usr/lib/
Requirement already satisfied: setuptools>=60.8 in ./lib/python3.
Requirement already satisfied: cryptography>
Using cached setuptools_
Installing collected packages: setuptools-gettext
Successfully installed setuptools-
Obtaining file://
Installing build dependencies: started
Installing build dependencies: finished with status 'done'
Checking if build backend supports build_editable: started
Checking if build backend supports build_editable: finished with status 'done'
Getting requirements to build editable: started
Getting requirements to build editable: finished with status 'done'
Installing backend dependencies: started
Installing backend dependencies: finished with status 'done'
Preparing editable metadata (pyproject.toml): started
Preparing editable metadata (pyproject.toml): finished with status 'done'
Requirement already satisfied: configobj in /usr/lib/
Requirement already satisfied: fastbencode in /usr/lib/
Requirement already satisfied: patiencediff in /usr/lib/
Requirement already satisfied: merge3 in /usr/lib/
Requirement already satisfied: dulwich>=0.21.6 in /usr/lib/
Requirement already satisfied: urllib3>=1.24.1 in /usr/lib/
Requirement already satisfied: pyyaml in /usr/lib/
Collecting testtools (from breezy==3.3.6.dev0)
Using cached testtools-
Collecting testscenarios (from breezy==3.3.6.dev0)
Using cached testscenarios-
Collecting python-subunit (from breezy==3.3.6.dev0)
Using cached python_
Requirement already satisfied: flake8 in /usr/lib/
Collecting cython>=0.29 (from breezy==3.3.6.dev0)
Using cached Cython-
Collecting docutils (from breezy==3.3.6.dev0)
Using cached docutils-
Requirement already satisfied: setuptools in ./lib/python3.
Collecting sphinx (from breezy==3.3.6.dev0)
Using cached sphinx-
Collecting sphinx-epytext (from breezy==3.3.6.dev0)
Using cached sphinx_
Coll...
The Breezy Bot (the-breezy-bot) wrote : | # |
There are additional revisions which have not been approved in review. Please seek review and approval of these new revisions.
The Breezy Bot (the-breezy-bot) wrote : | # |
The attempt to merge lp:~jelmer/brz/python3.12 into lp:brz/3.3 failed. Command exited with 2.
Below is the output from the failed tests.
Collecting setuptools-gettext
Downloading setuptools_
Requirement already satisfied: types-paramiko in /usr/lib/
Requirement already satisfied: setuptools>=60.8 in ./lib/python3.
Requirement already satisfied: cryptography>
Downloading setuptools_
Installing collected packages: setuptools-gettext
Successfully installed setuptools-
Obtaining file://
Installing build dependencies: started
Installing build dependencies: finished with status 'done'
Checking if build backend supports build_editable: started
Checking if build backend supports build_editable: finished with status 'done'
Getting requirements to build editable: started
Getting requirements to build editable: finished with status 'done'
Installing backend dependencies: started
Installing backend dependencies: finished with status 'done'
Preparing editable metadata (pyproject.toml): started
Preparing editable metadata (pyproject.toml): finished with status 'done'
Requirement already satisfied: configobj in /usr/lib/
Requirement already satisfied: fastbencode in /usr/lib/
Requirement already satisfied: patiencediff in /usr/lib/
Requirement already satisfied: merge3 in /usr/lib/
Requirement already satisfied: dulwich>=0.21.6 in /usr/lib/
Requirement already satisfied: urllib3>=1.24.1 in /usr/lib/
Requirement already satisfied: pyyaml in /usr/lib/
Collecting testtools (from breezy==3.3.6.dev0)
Downloading testtools-
Collecting testscenarios (from breezy==3.3.6.dev0)
Downloading testscenarios-
Collecting python-subunit (from breezy==3.3.6.dev0)
Downloading python_
Requirement already satisfied: flake8 in /usr/lib/
Collecting cython>=0.29 (from breezy==3.3.6.dev0)
Using cached Cython-
Collecting docutils (from breezy==3.3.6.dev0)
Downloading docutils-
Requirement already satisfied: setuptools in ./lib/python3.
Collecting sphinx (from breezy==3.3.6.dev0)
Downloading sphinx-
Collecting sphinx-epytext (from breezy==3.3.6.dev0)
Downloading sphinx-
Preparing m...
The Breezy Bot (the-breezy-bot) wrote : | # |
The attempt to merge lp:~jelmer/brz/python3.12 into lp:brz/3.3 failed. Command exited with 2.
Below is the output from the failed tests.
Collecting setuptools-gettext
Downloading setuptools_
Requirement already satisfied: types-paramiko in /usr/lib/
Requirement already satisfied: setuptools>=60.8 in ./lib/python3.
Requirement already satisfied: cryptography>
Downloading setuptools_
Installing collected packages: setuptools-gettext
Successfully installed setuptools-
Obtaining file://
Installing build dependencies: started
Installing build dependencies: finished with status 'done'
Checking if build backend supports build_editable: started
Checking if build backend supports build_editable: finished with status 'done'
Getting requirements to build editable: started
Getting requirements to build editable: finished with status 'done'
Installing backend dependencies: started
Installing backend dependencies: finished with status 'done'
Preparing editable metadata (pyproject.toml): started
Preparing editable metadata (pyproject.toml): finished with status 'done'
Requirement already satisfied: configobj in /usr/lib/
Requirement already satisfied: fastbencode in /usr/lib/
Requirement already satisfied: patiencediff in /usr/lib/
Requirement already satisfied: merge3 in /usr/lib/
Requirement already satisfied: dulwich>=0.21.6 in /usr/lib/
Requirement already satisfied: urllib3>=1.24.1 in /usr/lib/
Requirement already satisfied: pyyaml in /usr/lib/
Collecting testtools (from breezy==3.3.6.dev0)
Downloading testtools-
Collecting testscenarios (from breezy==3.3.6.dev0)
Downloading testscenarios-
Collecting python-subunit (from breezy==3.3.6.dev0)
Downloading python_
Requirement already satisfied: flake8 in /usr/lib/
Collecting cython>=0.29 (from breezy==3.3.6.dev0)
Using cached Cython-
Collecting docutils (from breezy==3.3.6.dev0)
Downloading docutils-
Requirement already satisfied: setuptools in ./lib/python3.
Collecting sphinx (from breezy==3.3.6.dev0)
Downloading sphinx-
Collecting sphinx-epytext (from breezy==3.3.6.dev0)
Downloading sphinx-
Preparing m...
The Breezy Bot (the-breezy-bot) wrote : | # |
The attempt to merge lp:~jelmer/brz/python3.12 into lp:brz/3.3 failed. Command exited with 1.
Below is the output from the failed tests.
Collecting setuptools-gettext
Downloading setuptools_
Requirement already satisfied: types-paramiko in /usr/lib/
Requirement already satisfied: setuptools>=60.8 in ./lib/python3.
Requirement already satisfied: cryptography>
Downloading setuptools_
Installing collected packages: setuptools-gettext
Successfully installed setuptools-
Obtaining file://
Installing build dependencies: started
Installing build dependencies: finished with status 'done'
Checking if build backend supports build_editable: started
Checking if build backend supports build_editable: finished with status 'done'
Getting requirements to build editable: started
Getting requirements to build editable: finished with status 'done'
Installing backend dependencies: started
Installing backend dependencies: finished with status 'done'
Preparing editable metadata (pyproject.toml): started
Preparing editable metadata (pyproject.toml): finished with status 'done'
Requirement already satisfied: configobj in /usr/lib/
Requirement already satisfied: fastbencode in /usr/lib/
Requirement already satisfied: patiencediff in /usr/lib/
Requirement already satisfied: merge3 in /usr/lib/
Requirement already satisfied: dulwich>=0.21.6 in /usr/lib/
Requirement already satisfied: urllib3>=1.24.1 in /usr/lib/
Requirement already satisfied: pyyaml in /usr/lib/
Collecting tzlocal (from breezy==3.3.6.dev0)
Downloading tzlocal-
Collecting testtools (from breezy==3.3.6.dev0)
Downloading testtools-
Collecting testscenarios (from breezy==3.3.6.dev0)
Downloading testscenarios-
Collecting python-subunit (from breezy==3.3.6.dev0)
Downloading python_
Requirement already satisfied: flake8 in /usr/lib/
Collecting cython>=0.29 (from breezy==3.3.6.dev0)
Using cached Cython-
Collecting docutils (from breezy==3.3.6.dev0)
Downloading docutils-
Requirement already satisfied: setuptools in ./lib/python3.
Collecting sphinx (from breezy==3.3.6.dev0)
Downloading sphinx-
Collecting...
The Breezy Bot (the-breezy-bot) wrote : | # |
The attempt to merge lp:~jelmer/brz/python3.12 into lp:brz/3.3 failed. Command exited with 1.
Below is the output from the failed tests.
Collecting setuptools-gettext
Downloading setuptools_
Requirement already satisfied: types-paramiko in /usr/lib/
Requirement already satisfied: setuptools>=60.8 in ./lib/python3.
Requirement already satisfied: cryptography>
Downloading setuptools_
Installing collected packages: setuptools-gettext
Successfully installed setuptools-
Obtaining file://
Installing build dependencies: started
Installing build dependencies: finished with status 'done'
Checking if build backend supports build_editable: started
Checking if build backend supports build_editable: finished with status 'done'
Getting requirements to build editable: started
Getting requirements to build editable: finished with status 'done'
Installing backend dependencies: started
Installing backend dependencies: finished with status 'done'
Preparing editable metadata (pyproject.toml): started
Preparing editable metadata (pyproject.toml): finished with status 'done'
Requirement already satisfied: configobj in /usr/lib/
Requirement already satisfied: fastbencode in /usr/lib/
Requirement already satisfied: patiencediff in /usr/lib/
Requirement already satisfied: merge3 in /usr/lib/
Requirement already satisfied: dulwich>=0.21.6 in /usr/lib/
Requirement already satisfied: urllib3>=1.24.1 in /usr/lib/
Requirement already satisfied: pyyaml in /usr/lib/
Collecting tzlocal (from breezy==3.3.6.dev0)
Downloading tzlocal-
Collecting testtools (from breezy==3.3.6.dev0)
Downloading testtools-
Collecting testscenarios (from breezy==3.3.6.dev0)
Downloading testscenarios-
Collecting python-subunit (from breezy==3.3.6.dev0)
Downloading python_
Requirement already satisfied: flake8 in /usr/lib/
Collecting cython>=0.29 (from breezy==3.3.6.dev0)
Using cached Cython-
Collecting docutils (from breezy==3.3.6.dev0)
Downloading docutils-
Requirement already satisfied: setuptools in ./lib/python3.
Collecting sphinx (from breezy==3.3.6.dev0)
Downloading sphinx-
Collecting...
- 7828. By Jelmer Vernooij
-
Remove shutil from banned modules
Preview Diff
1 | === modified file 'breezy/bzr/tests/test__static_tuple.py' |
2 | --- breezy/bzr/tests/test__static_tuple.py 2023-01-31 01:05:40 +0000 |
3 | +++ breezy/bzr/tests/test__static_tuple.py 2024-02-11 20:28:40 +0000 |
4 | @@ -50,7 +50,7 @@ |
5 | # Then it works fine. Something about passing it to assertRefcount is |
6 | # actually double-incrementing (and decrementing) the refcount |
7 | self.assertEqual(count, sys.getrefcount(obj) - 3) |
8 | - else: |
9 | + elif sys.version_info[:2] == (3, 11): |
10 | self.assertEqual(count, sys.getrefcount(obj) - 2) |
11 | |
12 | def test_create(self): |
13 | |
14 | === modified file 'breezy/bzr/tests/test_bundle.py' |
15 | --- breezy/bzr/tests/test_bundle.py 2023-01-31 01:05:40 +0000 |
16 | +++ breezy/bzr/tests/test_bundle.py 2024-02-11 20:28:40 +0000 |
17 | @@ -469,6 +469,7 @@ |
18 | |
19 | if checkout_dir is None: |
20 | checkout_dir = tempfile.mkdtemp(prefix='test-branch-', dir='.') |
21 | + checkout_dir = os.path.relpath(checkout_dir, os.getcwd()) |
22 | else: |
23 | if not os.path.exists(checkout_dir): |
24 | os.mkdir(checkout_dir) |
25 | |
26 | === modified file 'breezy/doc_generate/__init__.py' |
27 | --- breezy/doc_generate/__init__.py 2020-02-18 01:57:45 +0000 |
28 | +++ breezy/doc_generate/__init__.py 2024-02-11 20:28:40 +0000 |
29 | @@ -33,7 +33,8 @@ |
30 | :return: A `datetime` object |
31 | """ |
32 | try: |
33 | - return datetime.datetime.utcfromtimestamp( |
34 | - int(os.environ['SOURCE_DATE_EPOCH'])) |
35 | + return datetime.datetime.fromtimestamp( |
36 | + int(os.environ['SOURCE_DATE_EPOCH']), |
37 | + datetime.UTC) |
38 | except (KeyError, ValueError): |
39 | return datetime.datetime.utcnow() |
40 | |
41 | === modified file 'breezy/forge.py' |
42 | --- breezy/forge.py 2023-01-31 01:05:40 +0000 |
43 | +++ breezy/forge.py 2024-02-11 20:28:40 +0000 |
44 | @@ -129,6 +129,12 @@ |
45 | def __init__(self, url=None): |
46 | self.url = url |
47 | |
48 | + def __str__(self): |
49 | + return self.url |
50 | + |
51 | + def __repr__(self): |
52 | + return "<%s(%r)>" % (self.__class__.__name__, self.url) |
53 | + |
54 | def get_web_url(self): |
55 | raise NotImplementedError(self.get_web_url) |
56 | |
57 | |
58 | === modified file 'breezy/osutils.py' |
59 | --- breezy/osutils.py 2023-01-31 01:05:40 +0000 |
60 | +++ breezy/osutils.py 2024-02-11 20:28:40 +0000 |
61 | @@ -736,10 +736,12 @@ |
62 | |
63 | def local_time_offset(t=None): |
64 | """Return offset of local zone from GMT, either at present or at time t.""" |
65 | - from datetime import datetime |
66 | + from datetime import UTC, datetime |
67 | + |
68 | + from tzlocal import get_localzone |
69 | if t is None: |
70 | t = time.time() |
71 | - offset = datetime.fromtimestamp(t) - datetime.utcfromtimestamp(t) |
72 | + offset = datetime.fromtimestamp(t, get_localzone()) - datetime.fromtimestamp(t, UTC) |
73 | return offset.days * 86400 + offset.seconds |
74 | |
75 | |
76 | |
77 | === modified file 'breezy/plugins/weave_fmt/xml4.py' |
78 | --- breezy/plugins/weave_fmt/xml4.py 2023-01-31 01:05:40 +0000 |
79 | +++ breezy/plugins/weave_fmt/xml4.py 2024-02-11 20:28:40 +0000 |
80 | @@ -167,7 +167,7 @@ |
81 | |
82 | pelts = elt.find('parents') |
83 | |
84 | - if pelts: |
85 | + if pelts is not None: |
86 | for p in pelts: |
87 | rev.parent_ids.append(p.get('revision_id')) |
88 | rev.parent_sha1s.append(p.get('revision_sha1')) |
89 | |
90 | === modified file 'breezy/tests/test_import_tariff.py' |
91 | --- breezy/tests/test_import_tariff.py 2023-01-31 01:05:40 +0000 |
92 | +++ breezy/tests/test_import_tariff.py 2024-02-11 20:28:40 +0000 |
93 | @@ -179,7 +179,6 @@ |
94 | 'getpass', |
95 | 'kerberos', |
96 | 'merge3', |
97 | - 'shutil', |
98 | 'ssl', |
99 | 'socket', |
100 | 'smtplib', |
101 | @@ -232,10 +231,8 @@ |
102 | 'getpass', |
103 | 'kerberos', |
104 | 'merge3', |
105 | - 'shutil', |
106 | 'smtplib', |
107 | 'ssl', |
108 | - 'tempfile', |
109 | 'tarfile', |
110 | 'termios', |
111 | 'tty', |
112 | @@ -302,7 +299,6 @@ |
113 | 'merge3', |
114 | 'smtplib', |
115 | 'tarfile', |
116 | - 'tempfile', |
117 | 'termios', |
118 | 'tty', |
119 | ] + old_format_modules) |
120 | |
121 | === modified file 'breezy/tests/test_selftest.py' |
122 | --- breezy/tests/test_selftest.py 2024-01-07 15:55:19 +0000 |
123 | +++ breezy/tests/test_selftest.py 2024-02-11 20:28:40 +0000 |
124 | @@ -809,11 +809,11 @@ |
125 | |
126 | class TimeAddedVerboseTestResult(tests.VerboseTestResult): |
127 | def startTest(self, test): |
128 | - self.time(datetime.datetime.utcfromtimestamp(1.145)) |
129 | + self.time(datetime.datetime.fromtimestamp(1.145, datetime.UTC)) |
130 | super().startTest(test) |
131 | |
132 | def addSuccess(self, test): |
133 | - self.time(datetime.datetime.utcfromtimestamp(51.147)) |
134 | + self.time(datetime.datetime.fromtimestamp(51.147, datetime.UTC)) |
135 | super().addSuccess(test) |
136 | |
137 | def report_tests_starting(self): pass |
138 | |
139 | === modified file 'pyproject.toml' |
140 | --- pyproject.toml 2023-09-04 18:06:58 +0000 |
141 | +++ pyproject.toml 2024-02-11 20:28:40 +0000 |
142 | @@ -34,6 +34,7 @@ |
143 | "dulwich>=0.21.6", |
144 | "urllib3>=1.24.1", |
145 | "pyyaml", |
146 | + "tzlocal", |
147 | ] |
148 | dynamic = ["version", "scripts"] |
149 |
The attempt to merge lp:~jelmer/brz/python3.12 into lp:brz/3.3 failed. Command exited with 2.
Below is the output from the failed tests.
Collecting setuptools-gettext gettext- 0.1.11- py3-none- any.whl. metadata (1.9 kB) python3/ dist-packages (3.3) 11/site- packages (from setuptools-gettext) (68.1.2) =37.0.0 in /usr/lib/ python3/ dist-packages (from types-paramiko) (38.0.4) gettext- 0.1.11- py3-none- any.whl (13 kB) gettext- 0.1.11 /tmp/tarmac/ branch. 5mv_7oj9 python3/ dist-packages (from breezy==3.3.6.dev0) (5.0.8) python3/ dist-packages (from breezy==3.3.6.dev0) (0.2) python3/ dist-packages (from breezy==3.3.6.dev0) (0.2.13) python3/ dist-packages (from breezy==3.3.6.dev0) (0.0.8) python3/ dist-packages (from breezy==3.3.6.dev0) (0.21.6) python3/ dist-packages (from breezy==3.3.6.dev0) (1.26.18) python3/ dist-packages (from breezy==3.3.6.dev0) (6.0.1) 2.7.1-py3- none-any. whl.metadata (5.3 kB) 0.5.0-py2. py3-none- any.whl (21 kB) subunit- 1.4.4-py3- none-any. whl.metadata (22 kB) python3/ dist-packages (from breezy==3.3.6.dev0) (6.1.0) 3.0.8-cp311- cp311-manylinux _2_17_x86_ 64.manylinux201 4_x86_64. whl.metadata (3.2 kB) 0.20.1- py3-none- any.whl. metadata (2.8 kB) 11/site- packages (from breezy==3.3.6.dev0) (68.1.2) 7.2.6-py3- none-any. whl.metadata (5.9 kB) epytext- 0.0.4.tar. gz (3.6 kB)
Downloading setuptools_
Requirement already satisfied: types-paramiko in /usr/lib/
Requirement already satisfied: setuptools>=60.8 in ./lib/python3.
Requirement already satisfied: cryptography>
Downloading setuptools_
Installing collected packages: setuptools-gettext
Successfully installed setuptools-
Obtaining file://
Installing build dependencies: started
Installing build dependencies: finished with status 'done'
Checking if build backend supports build_editable: started
Checking if build backend supports build_editable: finished with status 'done'
Getting requirements to build editable: started
Getting requirements to build editable: finished with status 'done'
Installing backend dependencies: started
Installing backend dependencies: finished with status 'done'
Preparing editable metadata (pyproject.toml): started
Preparing editable metadata (pyproject.toml): finished with status 'done'
Requirement already satisfied: configobj in /usr/lib/
Requirement already satisfied: fastbencode in /usr/lib/
Requirement already satisfied: patiencediff in /usr/lib/
Requirement already satisfied: merge3 in /usr/lib/
Requirement already satisfied: dulwich>=0.21.6 in /usr/lib/
Requirement already satisfied: urllib3>=1.24.1 in /usr/lib/
Requirement already satisfied: pyyaml in /usr/lib/
Collecting testtools (from breezy==3.3.6.dev0)
Downloading testtools-
Collecting testscenarios (from breezy==3.3.6.dev0)
Downloading testscenarios-
Collecting python-subunit (from breezy==3.3.6.dev0)
Downloading python_
Requirement already satisfied: flake8 in /usr/lib/
Collecting cython>=0.29 (from breezy==3.3.6.dev0)
Using cached Cython-
Collecting docutils (from breezy==3.3.6.dev0)
Downloading docutils-
Requirement already satisfied: setuptools in ./lib/python3.
Collecting sphinx (from breezy==3.3.6.dev0)
Downloading sphinx-
Collecting sphinx-epytext (from breezy==3.3.6.dev0)
Downloading sphinx-
Preparing m...