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

Drop Python 3.6 and add some type hints #282

Merged
merged 5 commits into from
Nov 18, 2021
Merged

Drop Python 3.6 and add some type hints #282

merged 5 commits into from
Nov 18, 2021

Conversation

hugovk
Copy link
Owner

@hugovk hugovk commented Oct 31, 2021

We need to drop 3.6 to use from __future__ import annotations. Could use 3.6 compatible things like from typing import Tuple, Union, but 3.6 is soon EOL:

cycle latest release eol
3.10 3.10.0 2021-10-04 2026-10-04
3.9 3.9.7 2020-10-05 2025-10-05
3.8 3.8.12 2019-10-14 2024-10-14
3.7 3.7.12 2018-06-27 2023-06-27
3.6 3.6.15 2016-12-23 2021-12-23

And has lowest of the (quite low anyway) pip installs from PyPI for September 2021:

category percent downloads
3.8 35.78% 307
3.7 23.43% 201
null 20.40% 175
3.9 12.94% 111
3.6 7.46% 64
Total 858

Source: pip install -U pypistats && pypistats python_minor pypistats --last-month

Plus refactor some tests to use pytest.mark.parametrize and add pytest.param(..., id=...) to make nicer verbose output.

@hugovk hugovk added the changelog: Removed For now removed features label Oct 31, 2021
@codecov
Copy link

codecov bot commented Oct 31, 2021

Codecov Report

Merging #282 (83eadc0) into main (13b1e52) will decrease coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #282      +/-   ##
==========================================
- Coverage   99.60%   99.59%   -0.01%     
==========================================
  Files           8        8              
  Lines         754      740      -14     
==========================================
- Hits          751      737      -14     
  Misses          3        3              
Flag Coverage Δ
GHA_Ubuntu 99.59% <100.00%> (-0.01%) ⬇️
GHA_Windows 99.59% <100.00%> (-0.01%) ⬇️
GHA_macOS 99.59% <100.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/pypistats/__init__.py 99.26% <100.00%> (+<0.01%) ⬆️
src/pypistats/cli.py 98.80% <100.00%> (+0.01%) ⬆️
tests/test_cli.py 100.00% <100.00%> (ø)
tests/test_pypistats.py 100.00% <100.00%> (ø)
tests/test_pypistats_cache.py 100.00% <100.00%> (ø)
tests/test_pypistats_print.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 13b1e52...83eadc0. Read the comment docs.

@hugovk
Copy link
Owner Author

hugovk commented Oct 31, 2021

Coverage percentage dropped because (covered) lines were removed in the refactoring. The number of missed lines (3) didn't change.

@hugovk hugovk merged commit 1cb8555 into main Nov 18, 2021
@hugovk hugovk deleted the type-hints branch November 18, 2021 21:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog: Removed For now removed features
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant