Merge lp:~jelmer/brz/python-compat into lp:brz/3.3

Proposed by Jelmer Vernooij
Status: Needs review
Proposed branch: lp:~jelmer/brz/python-compat
Merge into: lp:brz/3.3
Diff against target: 147 lines (+16/-63)
3 files modified
breezy/bzr/_static_tuple_c.c (+14/-13)
breezy/bzr/_str_helpers.pxd (+2/-2)
breezy/python-compat.h (+0/-48)
To merge this branch: bzr merge lp:~jelmer/brz/python-compat
Reviewer Review Type Date Requested Status
Jelmer Vernooij Approve
Review via email: mp+431801@code.launchpad.net

Commit message

Drop python 2 compat code.

Description of the change

Drop python 2 compat code.

To post a comment you must log in.
Revision history for this message
Jelmer Vernooij (jelmer) :
review: Approve
Revision history for this message
The Breezy Bot (the-breezy-bot) wrote :
Download full text (68.7 KiB)

The attempt to merge lp:~jelmer/brz/python-compat into lp:brz/3.3 failed. Below is the output from the failed tests.

Collecting setuptools-gettext
  Using cached setuptools_gettext-0.1.1-py3-none-any.whl (10 kB)
Requirement already satisfied: setuptools>=46.1 in ./lib/python3.10/site-packages (from setuptools-gettext) (65.5.0)
Installing collected packages: setuptools-gettext
Successfully installed setuptools-gettext-0.1.1
Obtaining file:///tmp/tarmac/branch._6hf7_33
  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'
  Preparing editable metadata (pyproject.toml): started
  Preparing editable metadata (pyproject.toml): finished with status 'done'
Requirement already satisfied: fastbencode in /usr/lib/python3/dist-packages (from breezy==3.3.1.dev0) (0.0.12)
Requirement already satisfied: merge3 in /usr/lib/python3/dist-packages (from breezy==3.3.1.dev0) (0.0.8)
Requirement already satisfied: configobj in /usr/lib/python3/dist-packages (from breezy==3.3.1.dev0) (5.0.6)
Requirement already satisfied: urllib3>=1.24.1 in /usr/lib/python3/dist-packages (from breezy==3.3.1.dev0) (1.26.12)
Requirement already satisfied: dulwich>=0.20.23 in /usr/lib/python3/dist-packages (from breezy==3.3.1.dev0) (0.20.46)
Requirement already satisfied: pyyaml in /usr/lib/python3/dist-packages (from breezy==3.3.1.dev0) (5.4.1)
Requirement already satisfied: patiencediff in /usr/lib/python3/dist-packages (from breezy==3.3.1.dev0) (0.2.3)
Requirement already satisfied: gpg in /usr/lib/python3/dist-packages (from breezy==3.3.1.dev0) (1.18.0)
Collecting pyinotify
  Using cached pyinotify-0.9.6.tar.gz (60 kB)
  Preparing metadata (setup.py): started
  Preparing metadata (setup.py): finished with status 'done'
Requirement already satisfied: launchpadlib>=1.6.3 in /usr/lib/python3/dist-packages (from breezy==3.3.1.dev0) (1.10.17)
Collecting testtools
  Using cached testtools-2.5.0-py3-none-any.whl (181 kB)
Collecting python-subunit
  Using cached python_subunit-1.4.0-py2.py3-none-any.whl (106 kB)
Collecting fastimport
  Using cached fastimport-0.9.14.tar.gz (41 kB)
  Preparing metadata (setup.py): started
  Preparing metadata (setup.py): finished with status 'done'
Collecting sphinx-epytext
  Using cached sphinx-epytext-0.0.4.tar.gz (3.6 kB)
  Preparing metadata (setup.py): started
  Preparing metadata (setup.py): finished with status 'done'
Requirement already satisfied: setuptools in ./lib/python3.10/site-packages (from breezy==3.3.1.dev0) (65.5.0)
Collecting sphinx
  Using cached sphinx-5.3.0-py3-none-any.whl (3.2 MB)
Requirement already satisfied: httplib2 in /usr/lib/python3/dist-packages (from launchpadlib>=1.6.3->breezy==3.3.1.dev0) (0.20.4)
Collecting keyring
  Using cached keyring-23.9.3-py3-none-any.whl (35 kB)
Requirement already satisfied: lazr.restfulclient>=0.9.19 in /usr/lib/python3/dist-packages (from launchpadlib>=1.6.3->breezy==3.3.1.dev0) (0.14.5)
...

Revision history for this message
The Breezy Bot (the-breezy-bot) wrote :
Download full text (68.7 KiB)

The attempt to merge lp:~jelmer/brz/python-compat into lp:brz/3.3 failed. Below is the output from the failed tests.

Collecting setuptools-gettext
  Using cached setuptools_gettext-0.1.1-py3-none-any.whl (10 kB)
Requirement already satisfied: setuptools>=46.1 in ./lib/python3.10/site-packages (from setuptools-gettext) (65.5.0)
Installing collected packages: setuptools-gettext
Successfully installed setuptools-gettext-0.1.1
Obtaining file:///tmp/tarmac/branch.xle4bgjs
  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'
  Preparing editable metadata (pyproject.toml): started
  Preparing editable metadata (pyproject.toml): finished with status 'done'
Requirement already satisfied: merge3 in /usr/lib/python3/dist-packages (from breezy==3.3.1.dev0) (0.0.8)
Requirement already satisfied: dulwich>=0.20.23 in /usr/lib/python3/dist-packages (from breezy==3.3.1.dev0) (0.20.46)
Requirement already satisfied: urllib3>=1.24.1 in /usr/lib/python3/dist-packages (from breezy==3.3.1.dev0) (1.26.12)
Requirement already satisfied: configobj in /usr/lib/python3/dist-packages (from breezy==3.3.1.dev0) (5.0.6)
Requirement already satisfied: pyyaml in /usr/lib/python3/dist-packages (from breezy==3.3.1.dev0) (5.4.1)
Requirement already satisfied: fastbencode in /usr/lib/python3/dist-packages (from breezy==3.3.1.dev0) (0.0.12)
Requirement already satisfied: patiencediff in /usr/lib/python3/dist-packages (from breezy==3.3.1.dev0) (0.2.3)
Collecting fastimport
  Using cached fastimport-0.9.14.tar.gz (41 kB)
  Preparing metadata (setup.py): started
  Preparing metadata (setup.py): finished with status 'done'
Requirement already satisfied: launchpadlib>=1.6.3 in /usr/lib/python3/dist-packages (from breezy==3.3.1.dev0) (1.10.17)
Collecting python-subunit
  Using cached python_subunit-1.4.0-py2.py3-none-any.whl (106 kB)
Collecting testtools
  Using cached testtools-2.5.0-py3-none-any.whl (181 kB)
Requirement already satisfied: setuptools in ./lib/python3.10/site-packages (from breezy==3.3.1.dev0) (65.5.0)
Collecting sphinx
  Using cached sphinx-5.3.0-py3-none-any.whl (3.2 MB)
Collecting sphinx-epytext
  Using cached sphinx-epytext-0.0.4.tar.gz (3.6 kB)
  Preparing metadata (setup.py): started
  Preparing metadata (setup.py): finished with status 'done'
Requirement already satisfied: gpg in /usr/lib/python3/dist-packages (from breezy==3.3.1.dev0) (1.18.0)
Collecting pyinotify
  Using cached pyinotify-0.9.6.tar.gz (60 kB)
  Preparing metadata (setup.py): started
  Preparing metadata (setup.py): finished with status 'done'
Requirement already satisfied: httplib2 in /usr/lib/python3/dist-packages (from launchpadlib>=1.6.3->breezy==3.3.1.dev0) (0.20.4)
Collecting keyring
  Using cached keyring-23.9.3-py3-none-any.whl (35 kB)
Requirement already satisfied: lazr.restfulclient>=0.9.19 in /usr/lib/python3/dist-packages (from launchpadlib>=1.6.3->breezy==3.3.1.dev0) (0.14.5)
...

Revision history for this message
The Breezy Bot (the-breezy-bot) wrote :
Download full text (71.2 KiB)

The attempt to merge lp:~jelmer/brz/python-compat into lp:brz/3.3 failed. Below is the output from the failed tests.

Collecting setuptools-gettext
  Downloading setuptools_gettext-0.1.1-py3-none-any.whl (10 kB)
Requirement already satisfied: setuptools>=46.1 in ./lib/python3.10/site-packages (from setuptools-gettext) (65.5.0)
Installing collected packages: setuptools-gettext
Successfully installed setuptools-gettext-0.1.1
Obtaining file:///tmp/tarmac/branch.xth_sw7s
  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'
  Preparing editable metadata (pyproject.toml): started
  Preparing editable metadata (pyproject.toml): finished with status 'done'
Requirement already satisfied: patiencediff in /usr/lib/python3/dist-packages (from breezy==3.3.1.dev0) (0.2.3)
Requirement already satisfied: dulwich>=0.20.23 in /usr/lib/python3/dist-packages (from breezy==3.3.1.dev0) (0.20.46)
Requirement already satisfied: fastbencode in /usr/lib/python3/dist-packages (from breezy==3.3.1.dev0) (0.0.12)
Requirement already satisfied: urllib3>=1.24.1 in /usr/lib/python3/dist-packages (from breezy==3.3.1.dev0) (1.26.12)
Requirement already satisfied: configobj in /usr/lib/python3/dist-packages (from breezy==3.3.1.dev0) (5.0.6)
Requirement already satisfied: merge3 in /usr/lib/python3/dist-packages (from breezy==3.3.1.dev0) (0.0.8)
Requirement already satisfied: pyyaml in /usr/lib/python3/dist-packages (from breezy==3.3.1.dev0) (5.4.1)
Collecting pyinotify
  Downloading pyinotify-0.9.6.tar.gz (60 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 61.0/61.0 kB 898.0 kB/s eta 0:00:00
  Preparing metadata (setup.py): started
  Preparing metadata (setup.py): finished with status 'done'
Requirement already satisfied: launchpadlib>=1.6.3 in /usr/lib/python3/dist-packages (from breezy==3.3.1.dev0) (1.10.17)
Requirement already satisfied: setuptools in ./lib/python3.10/site-packages (from breezy==3.3.1.dev0) (65.5.0)
Collecting sphinx-epytext
  Downloading sphinx-epytext-0.0.4.tar.gz (3.6 kB)
  Preparing metadata (setup.py): started
  Preparing metadata (setup.py): finished with status 'done'
Collecting sphinx
  Downloading sphinx-5.3.0-py3-none-any.whl (3.2 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.2/3.2 MB 2.5 MB/s eta 0:00:00
Collecting testtools
  Downloading testtools-2.5.0-py3-none-any.whl (181 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 182.0/182.0 kB 1.3 MB/s eta 0:00:00
Collecting python-subunit
  Downloading python_subunit-1.4.0-py2.py3-none-any.whl (106 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 106.1/106.1 kB 1.8 MB/s eta 0:00:00
Collecting fastimport
  Downloading fastimport-0.9.14.tar.gz (41 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 41.8/41.8 kB 114.4 kB/s eta 0:00:00
  Preparing metadata (setup.py): started
  Preparing metadata (setup.py): finished with status 'done'
Requirement already satisfied: gpg in /usr/lib/python3/dist-p...

Revision history for this message
The Breezy Bot (the-breezy-bot) wrote :
Download full text (71.1 KiB)

The attempt to merge lp:~jelmer/brz/python-compat into lp:brz/3.3 failed. Below is the output from the failed tests.

Collecting setuptools-gettext
  Downloading setuptools_gettext-0.1.1-py3-none-any.whl (10 kB)
Requirement already satisfied: setuptools>=46.1 in ./lib/python3.10/site-packages (from setuptools-gettext) (65.5.0)
Installing collected packages: setuptools-gettext
Successfully installed setuptools-gettext-0.1.1
Obtaining file:///tmp/tarmac/branch.9ohedp3l
  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'
  Preparing editable metadata (pyproject.toml): started
  Preparing editable metadata (pyproject.toml): finished with status 'done'
Requirement already satisfied: merge3 in /usr/lib/python3/dist-packages (from breezy==3.3.1.dev0) (0.0.8)
Requirement already satisfied: patiencediff in /usr/lib/python3/dist-packages (from breezy==3.3.1.dev0) (0.2.3)
Requirement already satisfied: dulwich>=0.20.23 in /usr/lib/python3/dist-packages (from breezy==3.3.1.dev0) (0.20.46)
Requirement already satisfied: urllib3>=1.24.1 in /usr/lib/python3/dist-packages (from breezy==3.3.1.dev0) (1.26.12)
Requirement already satisfied: pyyaml in /usr/lib/python3/dist-packages (from breezy==3.3.1.dev0) (5.4.1)
Requirement already satisfied: fastbencode in /usr/lib/python3/dist-packages (from breezy==3.3.1.dev0) (0.0.12)
Requirement already satisfied: configobj in /usr/lib/python3/dist-packages (from breezy==3.3.1.dev0) (5.0.6)
Collecting fastimport
  Downloading fastimport-0.9.14.tar.gz (41 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 41.8/41.8 kB 871.8 kB/s eta 0:00:00
  Preparing metadata (setup.py): started
  Preparing metadata (setup.py): finished with status 'done'
Requirement already satisfied: launchpadlib>=1.6.3 in /usr/lib/python3/dist-packages (from breezy==3.3.1.dev0) (1.10.17)
Collecting testtools
  Downloading testtools-2.5.0-py3-none-any.whl (181 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 182.0/182.0 kB 1.3 MB/s eta 0:00:00
Collecting python-subunit
  Downloading python_subunit-1.4.0-py2.py3-none-any.whl (106 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 106.1/106.1 kB 519.4 kB/s eta 0:00:00
Requirement already satisfied: gpg in /usr/lib/python3/dist-packages (from breezy==3.3.1.dev0) (1.18.0)
Collecting sphinx
  Downloading sphinx-5.3.0-py3-none-any.whl (3.2 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.2/3.2 MB 4.2 MB/s eta 0:00:00
Requirement already satisfied: setuptools in ./lib/python3.10/site-packages (from breezy==3.3.1.dev0) (65.5.0)
Collecting sphinx-epytext
  Downloading sphinx-epytext-0.0.4.tar.gz (3.6 kB)
  Preparing metadata (setup.py): started
  Preparing metadata (setup.py): finished with status 'done'
Collecting pyinotify
  Downloading pyinotify-0.9.6.tar.gz (60 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 61.0/61.0 kB 218.5 kB/s eta 0:00:00
  Preparing metadata (setup.py): started
  Preparing metada...

Revision history for this message
The Breezy Bot (the-breezy-bot) wrote :

The attempt to merge lp:~jelmer/brz/python-compat into lp:brz/3.3 failed. Command exited with 1.
Below is the output from the failed tests.

The virtual environment was not created successfully because ensurepip is not
available. On Debian/Ubuntu systems, you need to install the python3-venv
package using the following command.

    apt install python3.10-venv

You may need to use sudo with that command. After installing the python3-venv
package, recreate your virtual environment.

Failing command: ['/tmp/tarmac/branch.ftyvhdwy/bin/python3', '-Im', 'ensurepip', '--upgrade', '--default-pip']

Revision history for this message
The Breezy Bot (the-breezy-bot) wrote :
Download full text (14.3 KiB)

The attempt to merge lp:~jelmer/brz/python-compat into lp:brz/3.3 failed. Command exited with 1.
Below is the output from the failed tests.

Collecting setuptools-gettext
  Downloading setuptools_gettext-0.1.1-py3-none-any.whl (10 kB)
Requirement already satisfied: setuptools>=46.1 in ./lib/python3.10/site-packages (from setuptools-gettext) (65.5.0)
Installing collected packages: setuptools-gettext
Successfully installed setuptools-gettext-0.1.1
Obtaining file:///tmp/tarmac/branch.2tpfiljg
  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'
  Preparing editable metadata (pyproject.toml): started
  Preparing editable metadata (pyproject.toml): finished with status 'done'
Requirement already satisfied: urllib3>=1.24.1 in /usr/lib/python3/dist-packages (from breezy==3.3.1.dev0) (1.26.12)
Requirement already satisfied: pyyaml in /usr/lib/python3/dist-packages (from breezy==3.3.1.dev0) (5.4.1)
Requirement already satisfied: dulwich>=0.20.23 in /usr/lib/python3/dist-packages (from breezy==3.3.1.dev0) (0.20.46)
Requirement already satisfied: merge3 in /usr/lib/python3/dist-packages (from breezy==3.3.1.dev0) (0.0.8)
Requirement already satisfied: fastbencode in /usr/lib/python3/dist-packages (from breezy==3.3.1.dev0) (0.0.12)
Requirement already satisfied: patiencediff in /usr/lib/python3/dist-packages (from breezy==3.3.1.dev0) (0.2.3)
Requirement already satisfied: configobj in /usr/lib/python3/dist-packages (from breezy==3.3.1.dev0) (5.0.6)
Collecting python-subunit
  Downloading python_subunit-1.4.0-py2.py3-none-any.whl (106 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 106.1/106.1 kB 920.3 kB/s eta 0:00:00
Collecting testtools
  Downloading testtools-2.5.0-py3-none-any.whl (181 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 182.0/182.0 kB 1.6 MB/s eta 0:00:00
Requirement already satisfied: gpg in /usr/lib/python3/dist-packages (from breezy==3.3.1.dev0) (1.18.0)
Collecting fastimport
  Downloading fastimport-0.9.14.tar.gz (41 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 41.8/41.8 kB 348.3 kB/s eta 0:00:00
  Preparing metadata (setup.py): started
  Preparing metadata (setup.py): finished with status 'done'
Collecting sphinx
  Downloading sphinx-5.3.0-py3-none-any.whl (3.2 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.2/3.2 MB 7.5 MB/s eta 0:00:00
Collecting sphinx-epytext
  Downloading sphinx-epytext-0.0.4.tar.gz (3.6 kB)
  Preparing metadata (setup.py): started
  Preparing metadata (setup.py): finished with status 'done'
Requirement already satisfied: setuptools in ./lib/python3.10/site-packages (from breezy==3.3.1.dev0) (65.5.0)
Requirement already satisfied: launchpadlib>=1.6.3 in /usr/lib/python3/dist-packages (from breezy==3.3.1.dev0) (1.10.17)
Requirement already satisfied: httplib2 in /usr/lib/python3/dist-packages (from launchpadlib>=1.6.3->breezy==3.3.1.dev0) (0.20.4)
Collecting keyring
  Downloading keyring-23.9.3-py3-n...

Revision history for this message
The Breezy Bot (the-breezy-bot) wrote :
Download full text (14.3 KiB)

The attempt to merge lp:~jelmer/brz/python-compat into lp:brz/3.3 failed. Command exited with 1.
Below is the output from the failed tests.

Collecting setuptools-gettext
  Downloading setuptools_gettext-0.1.1-py3-none-any.whl (10 kB)
Requirement already satisfied: setuptools>=46.1 in ./lib/python3.10/site-packages (from setuptools-gettext) (65.5.0)
Installing collected packages: setuptools-gettext
Successfully installed setuptools-gettext-0.1.1
Obtaining file:///tmp/tarmac/branch.iscs0kzb
  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'
  Preparing editable metadata (pyproject.toml): started
  Preparing editable metadata (pyproject.toml): finished with status 'done'
Requirement already satisfied: configobj in /usr/lib/python3/dist-packages (from breezy==3.3.1.dev0) (5.0.6)
Requirement already satisfied: dulwich>=0.20.23 in /usr/lib/python3/dist-packages (from breezy==3.3.1.dev0) (0.20.46)
Requirement already satisfied: merge3 in /usr/lib/python3/dist-packages (from breezy==3.3.1.dev0) (0.0.8)
Requirement already satisfied: fastbencode in /usr/lib/python3/dist-packages (from breezy==3.3.1.dev0) (0.0.12)
Requirement already satisfied: pyyaml in /usr/lib/python3/dist-packages (from breezy==3.3.1.dev0) (5.4.1)
Requirement already satisfied: urllib3>=1.24.1 in /usr/lib/python3/dist-packages (from breezy==3.3.1.dev0) (1.26.12)
Requirement already satisfied: patiencediff in /usr/lib/python3/dist-packages (from breezy==3.3.1.dev0) (0.2.3)
Requirement already satisfied: launchpadlib>=1.6.3 in /usr/lib/python3/dist-packages (from breezy==3.3.1.dev0) (1.10.17)
Collecting fastimport
  Downloading fastimport-0.9.14.tar.gz (41 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 41.8/41.8 kB 237.1 kB/s eta 0:00:00
  Preparing metadata (setup.py): started
  Preparing metadata (setup.py): finished with status 'done'
Collecting sphinx
  Downloading sphinx-5.3.0-py3-none-any.whl (3.2 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.2/3.2 MB 8.0 MB/s eta 0:00:00
Collecting sphinx-epytext
  Downloading sphinx-epytext-0.0.4.tar.gz (3.6 kB)
  Preparing metadata (setup.py): started
  Preparing metadata (setup.py): finished with status 'done'
Requirement already satisfied: setuptools in ./lib/python3.10/site-packages (from breezy==3.3.1.dev0) (65.5.0)
Requirement already satisfied: gpg in /usr/lib/python3/dist-packages (from breezy==3.3.1.dev0) (1.18.0)
Collecting python-subunit
  Downloading python_subunit-1.4.0-py2.py3-none-any.whl (106 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 106.1/106.1 kB 317.2 kB/s eta 0:00:00
Collecting testtools
  Downloading testtools-2.5.0-py3-none-any.whl (181 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 182.0/182.0 kB 344.1 kB/s eta 0:00:00
Requirement already satisfied: httplib2 in /usr/lib/python3/dist-packages (from launchpadlib>=1.6.3->breezy==3.3.1.dev0) (0.20.4)
Collecting keyring
  Downloading keyring-23.9.3-py3-n...

Unmerged revisions

7665. By Jelmer Vernooij

Drop python 2 compat code.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'breezy/bzr/_static_tuple_c.c'
2--- breezy/bzr/_static_tuple_c.c 2022-07-16 19:07:39 +0000
3+++ breezy/bzr/_static_tuple_c.c 2022-10-19 10:13:59 +0000
4@@ -809,7 +809,7 @@
5 Py_ssize_t res;
6
7 res = _PyObject_SIZE(&StaticTuple_Type) + (int)self->size * sizeof(void*);
8- return PyInt_FromSsize_t(res);
9+ return PyLong_FromSsize_t(res);
10 }
11
12
13@@ -906,10 +906,7 @@
14 0, /* tp_getattro */
15 0, /* tp_setattro */
16 0, /* tp_as_buffer */
17- /* Py_TPFLAGS_CHECKTYPES tells the number operations that they shouldn't
18- * try to 'coerce' but instead stuff like 'add' will check it arguments.
19- */
20- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_CHECKTYPES, /* tp_flags*/
21+ Py_TPFLAGS_DEFAULT, /* tp_flags*/
22 StaticTuple_doc, /* tp_doc */
23 /* gc.get_referents checks the IS_GC flag before it calls tp_traverse
24 * And we don't include this object in the garbage collector because we
25@@ -993,32 +990,36 @@
26 }
27
28
29-PYMOD_INIT_FUNC(_static_tuple_c)
30+PyMODINIT_FUNC PyInit_static_tuple_c(void)
31 {
32 PyObject* m;
33
34 StaticTuple_Type.tp_getattro = PyObject_GenericGetAttr;
35 if (PyType_Ready(&StaticTuple_Type) < 0) {
36- return PYMOD_ERROR;
37+ return NULL;
38 }
39
40- PYMOD_CREATE(m, "_static_tuple_c",
41- "C implementation of a StaticTuple structure",
42- static_tuple_c_methods);
43+ static struct PyModuleDef moduledef = {
44+ PyModuleDef_HEAD_INIT,
45+ "_static_tuple_c",
46+ "C implementation of a StaticTuple structure", -1,
47+ static_tuple_c_methods
48+ };
49+ m = PyModule_Create(&moduledef);
50 if (m == NULL) {
51- return PYMOD_ERROR;
52+ return NULL;
53 }
54
55 Py_INCREF(&StaticTuple_Type);
56 PyModule_AddObject(m, "StaticTuple", (PyObject *)&StaticTuple_Type);
57 if (import_breezy__bzr___simple_set_pyx() == -1) {
58- return PYMOD_ERROR;
59+ return NULL;
60 }
61 setup_interned_tuples(m);
62 setup_empty_tuple(m);
63 setup_c_api(m);
64
65- return PYMOD_SUCCESS(m);
66+ return m;
67 }
68
69 // vim: tabstop=4 sw=4 expandtab
70
71=== modified file 'breezy/bzr/_str_helpers.pxd'
72--- breezy/bzr/_str_helpers.pxd 2020-06-08 19:42:53 +0000
73+++ breezy/bzr/_str_helpers.pxd 2022-10-19 10:13:59 +0000
74@@ -21,7 +21,6 @@
75
76 cdef extern from "python-compat.h":
77 object PyBytes_FromStringAndSize (char *, Py_ssize_t)
78- object PyBytes_InternFromStringAndSize (char *, Py_ssize_t)
79
80
81 cdef inline void* _my_memrchr(void *s, int c, size_t n): # cannot_raise
82@@ -49,4 +48,5 @@
83 if size < 0:
84 raise AssertionError(
85 'tried to create a string with an invalid size: %d' % size)
86- return PyBytes_InternFromStringAndSize(s, size)
87+ # For now, don't intern on Python 3
88+ return PyBytes_FromStringAndSize(s, size)
89
90=== modified file 'breezy/python-compat.h'
91--- breezy/python-compat.h 2020-11-19 12:13:38 +0000
92+++ breezy/python-compat.h 2022-10-19 10:13:59 +0000
93@@ -29,54 +29,6 @@
94 #define inline __inline
95 #endif
96
97-#if PY_MAJOR_VERSION >= 3
98-
99-#define PyInt_FromSsize_t PyLong_FromSsize_t
100-
101-/* On Python 3 just don't intern bytes for now */
102-#define PyBytes_InternFromStringAndSize PyBytes_FromStringAndSize
103-
104-/* In Python 3 the Py_TPFLAGS_CHECKTYPES behaviour is on by default */
105-#define Py_TPFLAGS_CHECKTYPES 0
106-
107-#define PYMOD_ERROR NULL
108-#define PYMOD_SUCCESS(val) val
109-#define PYMOD_INIT_FUNC(name) PyMODINIT_FUNC PyInit_##name(void)
110-#define PYMOD_CREATE(ob, name, doc, methods) do { \
111- static struct PyModuleDef moduledef = { \
112- PyModuleDef_HEAD_INIT, name, doc, -1, methods \
113- }; \
114- ob = PyModule_Create(&moduledef); \
115- } while(0)
116-
117-#else
118-
119-#define PyBytes_Type PyString_Type
120-#define PyBytes_CheckExact PyString_CheckExact
121-#define PyBytes_FromStringAndSize PyString_FromStringAndSize
122-inline PyObject* PyBytes_InternFromStringAndSize(const char *v, Py_ssize_t len)
123-{
124- PyObject *obj = PyString_FromStringAndSize(v, len);
125- if (obj != NULL) {
126- PyString_InternInPlace(&obj);
127- }
128- return obj;
129-}
130-
131-/* Lazy hide Python 3.3 only functions, callers must avoid on 2.7 anyway */
132-#define PyUnicode_AsUTF8AndSize(u, size) NULL
133-
134-#define PYMOD_ERROR
135-#define PYMOD_SUCCESS(val)
136-#define PYMOD_INIT_FUNC(name) void init##name(void)
137-#define PYMOD_CREATE(ob, name, doc, methods) do { \
138- ob = Py_InitModule3(name, methods, doc); \
139- } while(0)
140-
141-#endif
142-
143-#define BrzPy_EnterRecursiveCall(where) (Py_EnterRecursiveCall(where) == 0)
144-
145 #if defined(_WIN32) || defined(WIN32)
146 /* Defining WIN32_LEAN_AND_MEAN makes including windows quite a bit
147 * lighter weight.

Subscribers

People subscribed via source and target branches