Skip to content

Commit

Permalink
drop python3.7
Browse files Browse the repository at this point in the history
  • Loading branch information
mjurbanski-reef committed Jun 7, 2024
1 parent 104a0e6 commit 8192dfc
Show file tree
Hide file tree
Showing 8 changed files with 516 additions and 386 deletions.
6 changes: 1 addition & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,23 +81,19 @@ jobs:
fail-fast: false
matrix:
os: ["ubuntu-latest", "macos-latest", "windows-latest"]
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "pypy3.9", "pypy3.10"]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "pypy3.9", "pypy3.10"]
exclude:
- os: "macos-latest"
python-version: "pypy3.10"
- os: "windows-latest"
python-version: "pypy3.10"
# Workaround for https://github.com/actions/setup-python/issues/696
- os: "macos-latest"
python-version: 3.7
- os: "macos-latest"
python-version: 3.8
- os: "macos-latest"
python-version: 3.9
include:
# Workaround for https://github.com/actions/setup-python/issues/696
- os: "macos-13"
python-version: 3.7
- os: "macos-13"
python-version: 3.8
- os: "macos-13"
Expand Down
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ With `nox`, you can run different sessions (default are `lint` and `test`):

* `format` -> Format the code.
* `lint` -> Run linters.
* `test` (`test-3.7`, `test-3.8`, `test-3.9`, `test-3.10`, `test-3.11`) -> Run test suite.
* `test` (`test-3.8`, `test-3.9`, `test-3.10`, `test-3.11`) -> Run test suite.
* `cover` -> Perform coverage analysis.
* `build` -> Build the distribution.
* `generate_dockerfile` -> generate dockerfile
Expand All @@ -90,9 +90,9 @@ nox > Running session format
...
```

Sessions `test` ,`unit`, and `integration` can run on many Python versions, 3.7-3.11 by default.
Sessions `test` ,`unit`, and `integration` can run on many Python versions.

Sessions other than that use the last given Python version, 3.11 by default.
Sessions other than that use the last given Python version.

You can change it:

Expand Down
4 changes: 1 addition & 3 deletions b2/_internal/_cli/autocomplete_install.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@
import argcomplete
from class_registry import ClassRegistry, RegistryKeyError

from b2._internal._utils.python_compat import shlex_join

logger = logging.getLogger(__name__)

SHELL_REGISTRY = ClassRegistry()
Expand Down Expand Up @@ -275,7 +273,7 @@ def _silent_success_run_with_pty(
"""
import pexpect

command_str = shlex_join(cmd)
command_str = shlex.join(cmd)

child = pexpect.spawn(command_str, timeout=timeout, env=env)
output = io.BytesIO()
Expand Down
3 changes: 2 additions & 1 deletion b2/_internal/_utils/uri.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import dataclasses
import pathlib
import urllib.parse
from functools import singledispatchmethod
from pathlib import Path
from typing import Sequence

Expand All @@ -23,7 +24,7 @@
)
from b2sdk.v2.exception import B2Error

from b2._internal._utils.python_compat import removeprefix, singledispatchmethod
from b2._internal._utils.python_compat import removeprefix


class B2URIBase:
Expand Down
4 changes: 4 additions & 0 deletions changelog.d/+drop_py37.changed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Remove Python 3.7 support in new releases.
Under Python 3.7 `pip` will keep resolving the latest version of the package that supports active interpreter.
This change comes at benefit of using newer versions of B2 CLI dependencies in `b2` standalone binary as well as in the official docker image.
Python 3.8 is now the minimum supported version, until it reaches EOL in October 2024.
1 change: 0 additions & 1 deletion noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
PYTHON_VERSIONS = [
'pypy3.9',
'pypy3.10',
'3.7',
'3.8',
'3.9',
'3.10',
Expand Down
874 changes: 504 additions & 370 deletions pdm.lock

Large diffs are not rendered by default.

4 changes: 1 addition & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ authors = [
{ name = "Backblaze Inc", email = "[email protected]" },
]
dynamic = ["version"]
requires-python = ">=3.7"
requires-python = ">=3.8"
keywords = ["backblaze b2 cloud storage"]
license = {text = "MIT"}
readme = "README.md"
Expand All @@ -15,7 +15,6 @@ classifiers = [
"Topic :: Software Development :: Libraries",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
Expand Down Expand Up @@ -110,7 +109,6 @@ dependencies = true
optional_dependencies = ["doc", "full", "license"]

[tool.ruff]
target-version = "py37" # to be replaced by project:requires-python when we will have that section in here

# TODO add D
select = ["E", "F", "I", "UP"]
Expand Down

0 comments on commit 8192dfc

Please sign in to comment.