Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add py3.12 to tests, replace pypy37 with pypy310 #183

Merged
merged 6 commits into from
Jul 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,12 +81,17 @@ jobs:
fail-fast: false
matrix:
os: ["ubuntu-latest", "macos-latest", "windows-latest"]
python-version: ["3.7", "3.8", "3.9", "3.10", "pypy-3.7", "3.11"]
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12-dev", "pypy-3.10"]
exclude:
- os: "macos-latest"
python-version: "pypy-3.7"
python-version: "pypy-3.10"
- os: "windows-latest"
python-version: "pypy-3.7"
python-version: "pypy-3.10"
# FIXME remove these exclusions after 3.12 release; 3.12-dev setlocale(...) is broken on Windows & Mac
- os: "macos-latest"
python-version: "3.12-dev"
- os: "windows-latest"
python-version: "3.12-dev"
steps:
- uses: actions/checkout@v3
with:
Expand All @@ -103,7 +108,7 @@ jobs:
run: nox -vs integration -- -m "not require_secrets"
- name: Run integration tests (with secrets)
# Limit CI workload by running integration tests with secrets only on edge Python versions.
if: ${{ env.B2_TEST_APPLICATION_KEY != '' && env.B2_TEST_APPLICATION_KEY_ID != '' && contains(fromJSON('["3.7", "pypy-3.7", "3.11"]'), matrix.python-version) }}
if: ${{ env.B2_TEST_APPLICATION_KEY != '' && env.B2_TEST_APPLICATION_KEY_ID != '' && contains(fromJSON('["3.7", "pypy-3.10", "3.11"]'), matrix.python-version) }}
run: nox -vs integration -- -m "require_secrets" --cleanup
test-docker:
needs: cleanup_buckets
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Added
* Declare official support of Python 3.12

### Infrastructure
* Remove unsupported PyPy 3.7 from tests matrix and add PyPy 3.10 instead
* Autocomplete integration tests will now work properly even if tested package has not been installed
* Automatically set copyright date when generating the docs
* Increase timeout time in autocomplete tests to accommodate slower CI environments
Expand All @@ -17,6 +21,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed
* Fast rm sometimes failing due to a rare race condition
* Fix UnicodeEncodeError in non-Unicode terminals by prioritizing stdout encoding
* When listing licenses in `license` command only show licenses of `b2` and its dependencies

## [3.9.0] - 2023-04-28

Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ We encourage outside contributors to perform changes to our codebase. Many such
* maintain Continuous Integration (by using GitHub Actions) that:
* runs all sorts of linters
* checks if the Python distribution can be built
* runs all tests on a matrix of 6 versions of Python (including PyPy) and 3 operating systems (Linux, Mac OS X, and Windows)
* runs all tests on a matrix of supported versions of Python (including PyPy) and 3 operating systems (Linux, Mac OS X, and Windows)
* checks if the documentation can be built properly
* maintain other Continuous Integration tools (coverage tracker)

Expand Down
12 changes: 12 additions & 0 deletions b2/console_tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
import queue
import re
import signal
import subprocess
import sys
import threading
import time
Expand Down Expand Up @@ -3267,6 +3268,15 @@ def _put_license_text_for_packages(self, stream: io.StringIO):
@classmethod
def _get_licenses_dicts(cls) -> List[Dict]:
assert piplicenses, 'In order to run this command, you need to install the `license` extra: pip install b2[license]'
pipdeptree_run = subprocess.run(
["pipdeptree", "--json", "-p", "b2"],
capture_output=True,
text=True,
check=True,
)
pipdeptree = json.loads(pipdeptree_run.stdout)
used_packages = [dep["package"]['package_name'] for dep in pipdeptree]

parser = piplicenses.create_parser()
args = parser.parse_args(
[
Expand All @@ -3276,6 +3286,8 @@ def _get_licenses_dicts(cls) -> List[Dict]:
'--with-authors',
'--with-urls',
'--with-license-file',
'--packages',
*used_packages,
]
)
licenses_output = piplicenses.create_output_string(args)
Expand Down
1 change: 1 addition & 0 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
'3.11',
] if NOX_PYTHONS is None else NOX_PYTHONS.split(',')
PYTHON_DEFAULT_VERSION = PYTHON_VERSIONS[-1]
PYTHON_VERSIONS += ['3.12'] # move this into PYTHON_VERSION above after official 3.12 release

PY_PATHS = ['b2', 'test', 'noxfile.py', 'setup.py']

Expand Down
6 changes: 4 additions & 2 deletions requirements-license.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
pip-licenses==3.5.5; python_version < '3.11'
pip-licenses==4.3.0; python_version >= '3.11'
pip-licenses==3.5.5; python_version < '3.8'
pip-licenses==4.3.2; python_version >= '3.8'
pipdeptree~=2.9
prettytable~=3.7
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
argcomplete>=2,<4
arrow>=1.0.2,<2.0.0
b2sdk~=1.21
b2sdk>=1.22.1,<2
docutils==0.19
idna~=2.2.0; platform_system == 'Java'
importlib-metadata~=3.3; python_version < '3.8'
Expand Down
2 changes: 2 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@ def read_requirements(extra=None):
'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',
],

# What does your project relate to?
Expand Down
Loading