Skip to content

Commit

Permalink
Merge pull request #402 from mjurbanski-reef/py312
Browse files Browse the repository at this point in the history
declare Python 3.12 support; retire unsupported PyPy relases
  • Loading branch information
mpnowacki-reef committed Jul 21, 2023
2 parents a593c2d + 29d857a commit a9d4719
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 8 deletions.
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 @@ -23,6 +23,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 @@ -36,7 +37,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 @@ -104,7 +104,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 @@ -86,6 +86,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(
'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

0 comments on commit a9d4719

Please sign in to comment.