Skip to content

Commit

Permalink
* Drop Python 3.7
Browse files Browse the repository at this point in the history
* Update CI
  • Loading branch information
jschwartzentruber committed Jul 8, 2023
1 parent 93d4002 commit 69f9c73
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 32 deletions.
12 changes: 6 additions & 6 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ repos:
hooks:
- id: isort
- repo: https://github.com/asottile/yesqa
rev: v1.4.0
rev: v1.5.0
hooks:
- id: yesqa
- repo: https://github.com/asottile/pyupgrade
rev: v3.3.1
rev: v3.8.0
hooks:
- id: pyupgrade
args: ['--py37-plus']
args: ['--py38-plus']
- repo: https://github.com/ambv/black
rev: 23.3.0
hooks:
Expand All @@ -37,17 +37,17 @@ repos:
args: ['--django']
- id: check-json
- repo: https://github.com/codespell-project/codespell
rev: v2.2.4
rev: v2.2.5
hooks:
- id: codespell
exclude_types: [json]
exclude: ^tests/mock-+
- repo: https://github.com/marco-c/taskcluster_yml_validator
rev: v0.0.9
rev: v0.0.10
hooks:
- id: taskcluster_yml
- repo: https://github.com/MozillaSecurity/orion
rev: v0.0.6
rev: v0.0.7
hooks:
- id: orion_ci
- repo: meta
Expand Down
4 changes: 0 additions & 4 deletions .taskcluster.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,6 @@ tasks:
- tox; tox -e codecov
jobs:
include:
- name: tests python 3.7
version: "3.7"
env:
TOXENV: py37
- name: tests python 3.8
version: "3.8"
env:
Expand Down
7 changes: 1 addition & 6 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@ classifiers =
Intended Audience :: Developers
License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)
Programming Language :: Python :: 3
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Topic :: Security
Topic :: Software Development :: Testing
description = Downloader for firefox/jsshell builds.
Expand All @@ -23,15 +19,14 @@ url = https://github.com/MozillaSecurity/fuzzfetch

[options]
install_requires =
importlib_metadata; python_version < '3.8'
pytz
requests
package_dir =
= src
packages =
fuzzfetch
zip_safe = False
python_requires = >=3.7
python_requires = >=3.8

[options.entry_points]
console_scripts =
Expand Down
20 changes: 7 additions & 13 deletions src/fuzzfetch/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
import shutil
import tempfile
from datetime import datetime, timedelta
from importlib.metadata import PackageNotFoundError, version
from pathlib import Path
from sys import version_info
from typing import Any, Dict, Optional, Sequence, Tuple, Union

from pytz import timezone
Expand All @@ -25,18 +25,11 @@
from .path import PathArg
from .path import rmtree as junction_rmtree

if version_info[:2] < (3, 8):
# pylint: disable=import-error
from importlib_metadata import PackageNotFoundError, version
else:
# pylint: disable=import-error
from importlib.metadata import PackageNotFoundError, version

try:
__version__ = version("fuzzfetch")
except PackageNotFoundError:
# package is not installed
__version__ = None
__version__ = "unknown"

LOG = logging.getLogger("fuzzfetch")
BUG_URL = "https://github.com/MozillaSecurity/fuzzfetch/issues/"
Expand Down Expand Up @@ -745,12 +738,13 @@ def from_args(
"""
parser = FetcherArgs()
parser.parser.add_argument(
"-V", "--version", action="store_true", help="print version and exit"
"-V",
"--version",
action="version",
version=__version__,
help="print version and exit",
)
args = parser.parse_args(argv)
if args.version:
print(f"fuzzfetch {__version__}")
raise SystemExit(0)

# do this default manually so we can error if combined with --build namespace
# parser.set_defaults(branch='central')
Expand Down
6 changes: 3 additions & 3 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tox]
envlist = py{37,38,39,310,311},lint
envlist = py{38,39,310,311},lint
minversion = 3.2
skip_missing_interpreters = true
tox_pip_extensions_ext_venv_update = true
Expand Down Expand Up @@ -43,14 +43,14 @@ skip_install = true
commands =
mypy --install-types --non-interactive {posargs}
deps =
mypy==v1.2.0
mypy==v1.3.0
usedevelop = true

[testenv:pylint]
commands =
pylint {posargs}
deps =
pylint==2.17.2
pylint==2.17.4
usedevelop = true

[testenv:pypi]
Expand Down

0 comments on commit 69f9c73

Please sign in to comment.