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 pypy3.7&3.8 with pypy39&310 #291

Merged
merged 3 commits into from
Jul 21, 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
15 changes: 10 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,16 +84,21 @@ jobs:
fail-fast: false
matrix:
os: ["ubuntu-latest", "macos-latest", "windows-latest"]
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11.0", "pypy-3.7", "pypy-3.8"]
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12-dev", "pypy-3.9", "pypy-3.10"]
exclude:
- os: "macos-latest"
python-version: "pypy-3.7"
python-version: "pypy-3.9"
- os: "ubuntu-latest"
python-version: "pypy-3.7"
python-version: "pypy-3.9"
- os: "macos-latest"
python-version: "pypy-3.8"
python-version: "pypy-3.10"
- os: "windows-latest"
python-version: "pypy-3.8"
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 Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Added
* Declare official support of Python 3.12

### Deprecated
* Deprecate `file_infos` argument. Use `file_info` instead. Old argument name won't be supported in v3.

Expand All @@ -17,6 +20,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
* Fix crash on upload retry with unbound data source

### Infrastructure
* Remove unsupported PyPy versions (3.7, 3.8) from tests matrix and add PyPy 3.9 & 3.10 instead
* Replaced `pyflakes` with `ruff` for linting
* Refactored logic for resuming large file uploads to unify code paths, correct inconsistencies, and enhance configurability (#381)
* Automatically set copyright date when generating the docs
Expand Down
4 changes: 2 additions & 2 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
'3.9',
'3.10',
'3.11',
'3.12',
] if NOX_PYTHONS is None else NOX_PYTHONS.split(',')

PYTHON_DEFAULT_VERSION = PYTHON_VERSIONS[-1]
Expand All @@ -35,7 +36,6 @@
"pytest-cov==3.0.0",
"pytest-mock==3.6.1",
'pytest-lazy-fixture==0.6.3',
'pyfakefs==4.5.6',
'pytest-xdist==2.5.0',
'pytest-timeout==2.1.0',
]
Expand Down Expand Up @@ -103,7 +103,7 @@ def unit(session):
"""Run unit tests."""
install_myself(session)
session.run('pip', 'install', *REQUIREMENTS_TEST)
args = ['--doctest-modules', '-p', 'pyfakefs', '-n', 'auto']
args = ['--doctest-modules', '-n', 'auto']
if not SKIP_COVERAGE:
args += ['--cov=b2sdk', '--cov-branch', '--cov-report=xml']
# TODO: Use session.parametrize for apiver
Expand Down
2 changes: 2 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,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
6 changes: 5 additions & 1 deletion test/unit/account_info/test_sqlite_account_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,11 @@ def test_migrate_to_4(self):

class TestSqliteAccountProfileFileLocation:
@pytest.fixture(autouse=True)
def setup(self, monkeypatch, fs):
def setup(self, monkeypatch, tmpdir):
monkeypatch.setenv(
kkalinowski-reef marked this conversation as resolved.
Show resolved Hide resolved
'HOME', str(tmpdir)
) # this affects .expanduser() and protects the real HOME folder
monkeypatch.setenv("USERPROFILE", str(tmpdir)) # same as HOME, but for Windows
monkeypatch.delenv(B2_ACCOUNT_INFO_ENV_VAR, raising=False)
monkeypatch.delenv(XDG_CONFIG_HOME_ENV_VAR, raising=False)

Expand Down