Skip to content

Commit

Permalink
MAINT: Package updates 馃尡 (#1481)
Browse files Browse the repository at this point in the history
* Update docs.txt to 3.7 as https://readthedocs.io/ seems to use 3.7
* Update dev.txt to 3.7 as we cannot expect developers to use a deprecated Python version (although we still keep it in CI and want to keep compatibility if possible)
  • Loading branch information
MartinThoma committed Dec 10, 2022
1 parent f804f3a commit b1938aa
Show file tree
Hide file tree
Showing 7 changed files with 90 additions and 74 deletions.
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# pre-commit run --all-files
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
rev: v4.4.0
hooks:
- id: check-ast
- id: check-byte-order-marker
Expand All @@ -17,7 +17,7 @@ repos:
- id: check-added-large-files
args: ['--maxkb=1000']
- repo: https://github.com/pycqa/flake8
rev: 5.0.4
rev: 6.0.0
hooks:
- id: flake8
args: ["--ignore", "E,W,F"]
Expand All @@ -32,7 +32,7 @@ repos:
name: isort (python)
additional_dependencies: [toml]
- repo: https://github.com/psf/black
rev: 22.10.0
rev: 22.12.0
hooks:
- id: black
args: [--target-version, py36]
Expand All @@ -42,7 +42,7 @@ repos:
- id: blacken-docs
additional_dependencies: [black==22.1.0]
- repo: https://github.com/asottile/pyupgrade
rev: v3.2.2
rev: v3.3.1
hooks:
- id: pyupgrade
args: [--py36-plus]
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
maint:
pyenv local 3.6.15
pre-commit autoupdate
pip-compile -U requirements/ci.in
pyenv local 3.7.15
pip-compile -U requirements/dev.in
pyenv local 3.7.9
pip-compile -U requirements/docs.in

changelog:
Expand Down
4 changes: 3 additions & 1 deletion PyPDF2/filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -603,7 +603,9 @@ def _xobj_to_image(x_object_obj: Dict[str, Any]) -> Tuple[Optional[str], bytes]:

if isinstance(lookup, ByteStringObject):
if base == ColorSpaces.DEVICE_GRAY and len(lookup) == hival + 1:
lookup = b"".join([lookup[i:i + 1] * 3 for i in range(len(lookup))])
lookup = b"".join(
[lookup[i : i + 1] * 3 for i in range(len(lookup))]
)
img.putpalette(lookup)
else:
img.putpalette(lookup.get_data())
Expand Down
2 changes: 1 addition & 1 deletion docs/modules/PaperSize.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ The PaperSize Class
.. autoclass:: PyPDF2.PaperSize
:members:
:undoc-members:
:show-inheritance:
:show-inheritance:
10 changes: 5 additions & 5 deletions requirements/ci.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ flake8==5.0.4
# -r requirements/ci.in
# flake8-bugbear
# flake8-print
flake8-bugbear==22.7.1
flake8-bugbear==22.9.23
# via -r requirements/ci.in
flake8-implicit-str-concat==0.2.0
# via -r requirements/ci.in
Expand All @@ -31,7 +31,7 @@ iniconfig==1.1.1
# via pytest
mccabe==0.7.0
# via flake8
more-itertools==8.13.0
more-itertools==8.14.0
# via flake8-implicit-str-concat
mypy==0.971
# via -r requirements/ci.in
Expand All @@ -45,13 +45,13 @@ pluggy==1.0.0
# via pytest
py==1.11.0
# via pytest
py-cpuinfo==8.0.0
py-cpuinfo==9.0.0
# via pytest-benchmark
pycodestyle==2.9.1
# via
# flake8
# flake8-print
pycryptodome==3.15.0
pycryptodome==3.16.0
# via -r requirements/ci.in
pyflakes==2.5.0
# via flake8
Expand All @@ -75,7 +75,7 @@ typeguard==2.13.3
# via -r requirements/ci.in
types-dataclasses==0.6.6
# via -r requirements/ci.in
types-pillow==9.2.1
types-pillow==9.3.0.4
# via -r requirements/ci.in
typing-extensions==4.1.1
# via
Expand Down
88 changes: 51 additions & 37 deletions requirements/dev.txt
Original file line number Diff line number Diff line change
@@ -1,94 +1,108 @@
#
# This file is autogenerated by pip-compile with python 3.10
# This file is autogenerated by pip-compile with python 3.7
# To update, run:
#
# pip-compile requirements/dev.in
#
attrs==21.4.0
attrs==22.1.0
# via pytest
black==22.6.0
black==22.12.0
# via -r requirements/dev.in
certifi==2022.6.15
build==0.9.0
# via pip-tools
certifi==2022.12.7
# via requests
cfgv==3.3.1
# via pre-commit
charset-normalizer==2.0.12
charset-normalizer==2.1.1
# via requests
click==8.0.4
click==8.1.3
# via
# black
# pip-tools
coverage[toml]==6.2
coverage[toml]==6.5.0
# via pytest-cov
distlib==0.3.5
distlib==0.3.6
# via virtualenv
docutils==0.18.1
docutils==0.19
# via flit
filelock==3.4.1
exceptiongroup==1.0.4
# via pytest
filelock==3.8.2
# via virtualenv
flit==3.7.1
flit==3.8.0
# via -r requirements/dev.in
flit-core==3.7.1
flit-core==3.8.0
# via flit
identify==2.4.4
identify==2.5.9
# via pre-commit
idna==3.3
idna==3.4
# via requests
importlib-metadata==5.1.0
# via
# build
# click
# pre-commit
# pytest
# virtualenv
iniconfig==1.1.1
# via pytest
mypy-extensions==0.4.3
# via black
nodeenv==1.6.0
nodeenv==1.7.0
# via pre-commit
packaging==21.3
# via pytest
pathspec==0.9.0
packaging==22.0
# via
# build
# pytest
pathspec==0.10.3
# via black
pep517==0.12.0
# via pip-tools
pip-tools==6.4.0
pep517==0.13.0
# via build
pip-tools==6.11.0
# via -r requirements/dev.in
platformdirs==2.4.0
platformdirs==2.6.0
# via
# black
# virtualenv
pluggy==1.0.0
# via pytest
pre-commit==2.17.0
# via -r requirements/dev.in
py==1.11.0
# via pytest
pyparsing==3.0.9
# via packaging
pytest==7.0.1
pytest==7.2.0
# via pytest-cov
pytest-cov==3.0.0
pytest-cov==4.0.0
# via -r requirements/dev.in
pyyaml==6.0
# via pre-commit
requests==2.27.1
requests==2.28.1
# via flit
six==1.16.0
# via virtualenv
toml==0.10.2
# via pre-commit
tomli==1.2.3
tomli==2.0.1
# via
# black
# build
# coverage
# flit
# pep517
# pytest
tomli-w==1.0.0
# via flit
urllib3==1.26.10
typed-ast==1.5.4
# via black
typing-extensions==4.4.0
# via
# black
# importlib-metadata
urllib3==1.26.13
# via requests
virtualenv==20.15.1
virtualenv==20.17.1
# via pre-commit
wheel==0.37.1
wheel==0.38.4
# via
# -r requirements/dev.in
# pip-tools
zipp==3.11.0
# via importlib-metadata

# The following packages are considered to be unsafe in a requirements file:
# pip
Expand Down
49 changes: 23 additions & 26 deletions requirements/docs.txt
Original file line number Diff line number Diff line change
@@ -1,66 +1,62 @@
#
# This file is autogenerated by pip-compile with python 3.6
# To update, run:
# This file is autogenerated by pip-compile with Python 3.7
# by the following command:
#
# pip-compile requirements/docs.in
#
alabaster==0.7.12
# via sphinx
attrs==21.4.0
# via markdown-it-py
babel==2.10.3
babel==2.11.0
# via sphinx
certifi==2022.6.15
certifi==2022.12.7
# via requests
charset-normalizer==2.0.12
charset-normalizer==2.1.1
# via requests
docutils==0.17.1
# via
# myst-parser
# sphinx
# sphinx-rtd-theme
idna==3.3
idna==3.4
# via requests
imagesize==1.4.1
# via sphinx
importlib-metadata==4.8.3
importlib-metadata==5.1.0
# via sphinx
jinja2==3.0.3
jinja2==3.1.2
# via
# myst-parser
# sphinx
markdown-it-py==2.0.1
markdown-it-py==2.1.0
# via
# mdit-py-plugins
# myst-parser
markupsafe==2.0.1
markupsafe==2.1.1
# via jinja2
mdit-py-plugins==0.3.0
mdit-py-plugins==0.3.3
# via myst-parser
mdurl==0.1.0
mdurl==0.1.2
# via markdown-it-py
myst-parser==0.16.1
myst-parser==0.18.1
# via -r requirements/docs.in
packaging==21.3
packaging==22.0
# via sphinx
pygments==2.12.0
pygments==2.13.0
# via sphinx
pyparsing==3.0.9
# via packaging
pytz==2022.1
pytz==2022.6
# via babel
pyyaml==6.0
# via myst-parser
requests==2.27.1
requests==2.28.1
# via sphinx
snowballstemmer==2.2.0
# via sphinx
sphinx==4.5.0
sphinx==5.3.0
# via
# -r requirements/docs.in
# myst-parser
# sphinx-rtd-theme
sphinx-rtd-theme==1.0.0
sphinx-rtd-theme==1.1.1
# via -r requirements/docs.in
sphinxcontrib-applehelp==1.0.2
# via sphinx
Expand All @@ -74,11 +70,12 @@ sphinxcontrib-qthelp==1.0.3
# via sphinx
sphinxcontrib-serializinghtml==1.1.5
# via sphinx
typing-extensions==4.1.1
typing-extensions==4.4.0
# via
# importlib-metadata
# markdown-it-py
urllib3==1.26.10
# myst-parser
urllib3==1.26.13
# via requests
zipp==3.6.0
zipp==3.11.0
# via importlib-metadata

0 comments on commit b1938aa

Please sign in to comment.