Add conversion.convert_svg2png image conversion function + support for SVG in probing.format_for#113
Add i18n.Lang class used as typed result of i18n operations #151
Changed
BREAKING Renamed zimscraperlib.image.convertion to zimscraperlib.image.conversion to fix typo
BREAKING Many changes in type hints to match the real underlying code
BREAKING Force all boolean arguments (and some other non-obvious parameters) to be keyword-only in function calls for clarity / disambiguation (see ruff rule FBT002)
Prefer to use IO[bytes] to io.BytesIO when possible since it is more generic
BREAKINGi18n.NotFound renamed i18n.NotFoundError
BREAKINGtypes.get_mime_for_name now returns str | None
BREAKINGcreator.Creator.add_metadata and creator.Creator.validate_metadata now only accepts bytes | str as value (it must have been converted before call)
BREAKING second argument of creator.Creator.add_metadata has been renamed to value instead of content to align with other methods
When a type issue arises in metadata checks, wrong value type is displayed in exception
BREAKINGi18n.get_language_details(), i18n.get_iso_lang_data(), i18n.find_language_names() and i18n.update_with_macro now process / return a new typed Lang class #151
BREAKING Rename i18.NotFound to i18n.NotFoundError
Removed
BREAKING Remove translation features in i18n: Locale class + _ and setlocale functions #134
Fixed
Metadata length validation is buggy for unicode strings #158
Pillow 10.4.0 reveals improper type hints for image probing functions #177
Add conversion.convert_svg2png image conversion function + support for SVG in probing.format_for#113
Add i18n.Lang class used as typed result of i18n operations #151
Changed
BREAKING Renamed zimscraperlib.image.convertion to zimscraperlib.image.conversion to fix typo
BREAKING Many changes in type hints to match the real underlying code
BREAKING Force all boolean arguments (and some other non-obvious parameters) to be keyword-only in function calls for clarity / disambiguation (see ruff rule FBT002)
Prefer to use IO[bytes] to io.BytesIO when possible since it is more generic
BREAKINGi18n.NotFound renamed i18n.NotFoundError
BREAKINGtypes.get_mime_for_name now returns str | None
BREAKINGcreator.Creator.add_metadata and creator.Creator.validate_metadata now only accepts bytes | str as value (it must have been converted before call)
BREAKING second argument of creator.Creator.add_metadata has been renamed to value instead of content to align with other methods
When a type issue arises in metadata checks, wrong value type is displayed in exception
BREAKINGi18n.get_language_details(), i18n.get_iso_lang_data(), i18n.find_language_names() and i18n.update_with_macro now process / return a new typed Lang class #151
BREAKING Rename i18.NotFound to i18n.NotFoundError
Removed
BREAKING Remove translation features in i18n: Locale class + _ and setlocale functions #134
Fixed
Metadata length validation is buggy for unicode strings #158
Pillow 10.4.0 reveals improper type hints for image probing functions #177
[flake8-simplify] Extend open-file-with-context-handler to work with dbm.sqlite3 (SIM115) (#13104)
[pycodestyle] Disable E741 in stub files (.pyi) (#13119)
[pydoclint] Avoid DOC201 on explicit returns in functions that only return None (#13064)
Rule changes
[flake8-async] Disable check for asyncio before Python 3.11 (ASYNC109) (#13023)
Bug fixes
[FastAPI] Avoid introducing invalid syntax in fix for fast-api-non-annotated-dependency (FAST002) (#13133)
[flake8-implicit-str-concat] Normalize octals before merging concatenated strings in single-line-implicit-string-concatenation (ISC001) (#13118)
[flake8-pytest-style] Improve help message for pytest-incorrect-mark-parentheses-style (PT023) (#13092)
[pylint] Avoid autofix for calls that aren't min or max as starred expression (PLW3301) (#13089)
[ruff] Add datetime.time, datetime.tzinfo, and datetime.timezone as immutable function calls (RUF009) (#13109)
[ruff] Extend comment deletion for RUF100 to include trailing text from noqa directives while preserving any following comments on the same line, if any (#13105)
Fix dark theme on initial page load for the Ruff playground (#13077)
[flake8-simplify] Extend open-file-with-context-handler to work with dbm.sqlite3 (SIM115) (#13104)
[pycodestyle] Disable E741 in stub files (.pyi) (#13119)
[pydoclint] Avoid DOC201 on explicit returns in functions that only return None (#13064)
Rule changes
[flake8-async] Disable check for asyncio before Python 3.11 (ASYNC109) (#13023)
Bug fixes
[FastAPI] Avoid introducing invalid syntax in fix for fast-api-non-annotated-dependency (FAST002) (#13133)
[flake8-implicit-str-concat] Normalize octals before merging concatenated strings in single-line-implicit-string-concatenation (ISC001) (#13118)
[flake8-pytest-style] Improve help message for pytest-incorrect-mark-parentheses-style (PT023) (#13092)
[pylint] Avoid autofix for calls that aren't min or max as starred expression (PLW3301) (#13089)
[ruff] Add datetime.time, datetime.tzinfo, and datetime.timezone as immutable function calls (RUF009) (#13109)
[ruff] Extend comment deletion for RUF100 to include trailing text from noqa directives while preserving any following comments on the same line, if any (#13105)
Fix dark theme on initial page load for the Ruff playground (#13077)
0.6.2
Preview features
[flake8-simplify] Extend open-file-with-context-handler to work with other standard-library IO modules (SIM115) (#12959)
[ruff] Avoid unused-async for functions with FastAPI route decorator (RUF029) (#12938)
[ruff] Ignore fstring-missing-syntax (RUF027) for fastAPI paths (#12939)
[ruff] Implement check for Decimal called with a float literal (RUF032) (#12909)
Rule changes
[flake8-bugbear] Update diagnostic message when expression is at the end of function (B015) (#12944)
[flake8-pyi] Skip type annotations in string-or-bytes-too-long (PYI053) (#13002)
[flake8-type-checking] Always recognise relative imports as first-party (#12994)
[flake8-unused-arguments] Ignore unused arguments on stub functions (ARG001) (#12966)
[pylint] Ignore augmented assignment for self-cls-assignment (PLW0642) (#12957)
[pep8-naming] Don't flag from imports following conventional import names (N817) (#12946)
[pylint] - Allow __new__ methods to have cls as their first argument even if decorated with @staticmethod for bad-staticmethod-argument (PLW0211) (#12958)
#12652: Resolve regression [conda]{.title-ref} environments where no longer being automatically detected.
-- by RonnyPfannschmidt{.interpreted-text role="user"}
8.3.1
pytest 8.3.1 (2024-07-20)
The 8.3.0 release failed to include the change notes and docs for the release. This patch release remedies this. There are no other changes.
8.3.0
pytest 8.3.0 (2024-07-20)
New features
#12231: Added [--xfail-tb]{.title-ref} flag, which turns on traceback output for XFAIL results.
If the [--xfail-tb]{.title-ref} flag is not given, tracebacks for XFAIL results are NOT shown.
The style of traceback for XFAIL is set with [--tb]{.title-ref}, and can be [auto|long|short|line|native|no]{.title-ref}.
Note: Even if you have [--xfail-tb]{.title-ref} set, you won't see them if [--tb=no]{.title-ref}.
Some history:
With pytest 8.0, [-rx]{.title-ref} or [-ra]{.title-ref} would not only turn on summary reports for xfail, but also report the tracebacks for xfail results. This caused issues with some projects that utilize xfail, but don't want to see all of the xfail tracebacks.
This change detaches xfail tracebacks from [-rx]{.title-ref}, and now we turn on xfail tracebacks with [--xfail-tb]{.title-ref}. With this, the default [-rx]{.title-ref}/ [-ra]{.title-ref} behavior is identical to pre-8.0 with respect to xfail tracebacks. While this is a behavior change, it brings default behavior back to pre-8.0.0 behavior, which ultimately was considered the better course of action.
#12281: Added support for keyword matching in marker expressions.
Now tests can be selected by marker keyword arguments.
Supported values are int{.interpreted-text role="class"}, (unescaped) str{.interpreted-text role="class"}, bool{.interpreted-text role="class"} & None{.interpreted-text role="data"}.
See marker examples <marker_keyword_expression_example>{.interpreted-text role="ref"} for more information.
-- by lovetheguitar{.interpreted-text role="user"}
#12567: Added --no-fold-skipped command line option.
If this option is set, then skipped tests in short summary are no longer grouped
by reason but all tests are printed individually with their nodeid in the same
way as other statuses.
Fix: coverage used to fail when measuring code using :func:runpy.run_path <python:runpy.run_path> with a :class:Path <python:pathlib.Path> argument.
This is now fixed, thanks to Ask Hjorth Larsen <pull 1819_>_.
Fix: backslashes preceding a multi-line backslashed string could confuse the
HTML report. This is now fixed, thanks to LiuYinCarl <pull 1828_>_.
Now we publish wheels for Python 3.13, both regular and free-threaded.
Exclusion patterns can now be multi-line, thanks to Daniel Diniz <pull 1807_>. This enables many interesting exclusion use-cases, including those
requested in issues 118 <issue 118_> (entire files), 996 <issue 996_>_ (multiple lines only when appearing together), 1741 <issue 1741_>_ (remainder of a function), and 1803 <issue 1803_>_
(arbitrary sequence of marked lines). See the :ref:multi_line_exclude
section of the docs for more details and examples.
The JSON report now includes per-function and per-class coverage information.
Thanks to Daniel Diniz <pull 1809_>_ for getting the work started. This
closes issue 1793_ and issue 1532_.
Fixed an incorrect calculation of "(no class)" lines in the HTML classes
report.
To simplify command line usage, an entry point has been added to the debugpy package.
If you install debugpy into an environment via pip, you can just run debugpy from that environment, instead of running python -m debugpy
If you install debugpy into an isolated directory, the debugpy executable can be found in the bin directory inside of the install directory. In this case, you need to add the install directory to your PYTHONPATH in order for the imports to work.
To simply command line usage, switches can now be read from the environment.
To do this, use the variable DEBUGPY_EXTRA_ARGV and add whatever command-line switches you like.
For example, set DEBUGPY_EXTRA_ARGV=--connect 5678 will allow you to omit the --connect switch from the command line.
If the same switch is found on both the command line and the environment, the one from the environment is ignored.
The switch that specifies the "target" MUST be on the command line (filename, -m <module>, -c <code>, or --pid <id>)
debugpy v1.8.2
Fixed an issue where ApiScan couldn't scan some of our binaries correctly. This involved changing some linker flags and re-compiling/re-linking some of the pydevd executables and dlls.
This doesn't affect debugpy logic in any way.
Commits
a68a804 Merge pull request #1646 from microsoft/remove_vendored_info
ae01f96 remove extra dist-info folder causing issues when uploading to pypi
dc58df1 Merge pull request #1549 from wmvanvliet/qt6
7b3dfb8 Merge pull request #1639 from microsoft/add_entry_point
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependab...
_Description has been truncated_
Bumps the production-dependencies group in /scraper with 9 updates:
3.4.0
4.0.0
2.7.2
2.8.2
24.4.2
24.8.0
0.4.10
0.6.3
1.1.371
1.1.378
8.2.2
8.3.2
7.5.3
7.6.1
3.7.1
3.8.0
1.8.1
1.8.5
Updates
zimscraperlib
from 3.4.0 to 4.0.0Release notes
Sourced from zimscraperlib's releases.
Changelog
Sourced from zimscraperlib's changelog.
Commits
6489f2a
Release 4.0.029931fb
Merge pull request #187 from openzim/remove_i18n_translation2a03e81
Remove i18n translation featuresb1a432a
Merge pull request #183 from openzim/i18_typingac9249c
Process / return a new typed Lang class in i18n methods0573638
Merge pull request #185 from openzim/fix_coverage1583e4f
Add missing test in PR#178 to remain at 100% coverage6eb77a5
Merge pull request #181 from openzim/svg_support2321eba
Add support for probing SVG images79aa7d4
Add svg2png image conversion functionUpdates
pydantic
from 2.7.2 to 2.8.2Release notes
Sourced from pydantic's releases.
... (truncated)
Changelog
Sourced from pydantic's changelog.
... (truncated)
Commits
4978ee2
update history0345929
v bumpd390a04
Fix issue with assertion caused by pluggable schema validator (#9838)040865f
update history5a33e3b
bump version2f9abb2
Bumppydantic-core
tov2.20.1
,pydantic-extra-types
tov2.9.0
(#9832)ce9c5f7
Remove spooky meetings file (#9824)6bdd6d1
Pedantic typo correction within explanation of Pydantic's root in 'pedantic' ...701ccde
Fix list constraint json schema application (#9818)2a066a2
Bumpruff
tov0.5.0
andpyright
tov1.1.369
(#9801)Updates
black
from 24.4.2 to 24.8.0Release notes
Sourced from black's releases.
Changelog
Sourced from black's changelog.
Commits
b965c2a
Prepare release 24.8.0 (#4426)9ccf279
Documentfind_project_root
ignoringpyproject.toml
without[tool.black]
...14b6e61
fix: Enhace black efficiently to skip directories listed in .gitignore (#4415)b1c4dd9
fix: respect braces better in f-string parsing (#4422)4b4ae43
Fix incorrect linenos on fstring tokens with escaped newlines (#4423)7fa1faf
docs: fix the installation command of extra for blackd (#4413)8827acc
Bump sphinx from 7.3.7 to 7.4.0 in /docs (#4404)b0da11d
Bump furo from 2024.5.6 to 2024.7.18 in /docs (#4409)721dff5
fix: avoid formatting backslash strings inside f-strings (#4401)7e2afc9
Updateactions/checkout
to v4 to stop node deprecation warnings (#4379)Updates
ruff
from 0.4.10 to 0.6.3Release notes
Sourced from ruff's releases.
... (truncated)
Changelog
Sourced from ruff's changelog.
... (truncated)
Commits
ee258ca
Bump version to 0.6.3 (#13152)b4d9d26
Update faq.md to highlight changes to src (#13145)a998320
[ruff
] - extend comment deletions for unused-noqa (RUF100
) (#13105)770ef2a
[red-knot] support deferred evaluation of type expressions (#13131)c6023c0
[red-knot] Add docs on usingRAYON_NUM_THREADS
for better logging (#13140)df694ca
[FastAPI
] Avoid introducing invalid syntax in fix for `fast-api-non-annotat...2e75cfb
FormatPYI
examples in docs as.pyi
-file snippets (#13116)cfafaa7
[red-knot] Remove very noisy tracing call when resolvingImportFrom
stateme...3e9c7ad
Replace crates by dependi for VS Code Dev Container (#13125)81cd438
red-knot: infer and display ellipsis type (#13124)Updates
pyright
from 1.1.371 to 1.1.378Commits
0fde3cf
[pyright updated to 1.1.378] Update Version (#290)5a98910
Pyright NPM Package update to 1.1.377 (#289)ae9a6c1
Pyright NPM Package update to 1.1.376 (#288)ec0e68a
[pyright updated to 1.1.375] Update Version (#287)c35c2ee
[pyright updated to 1.1.374] Update Version (#286)5d315f9
[pyright updated to 1.1.373] Update Version (#284)59a4bdf
[pyright updated to 1.1.372] Update Version (#283)Updates
pytest
from 8.2.2 to 8.3.2Release notes
Sourced from pytest's releases.
... (truncated)
Commits
bbcec9c
Prepare release version 8.3.278fe8b6
Merge pull request #12657 from pytest-dev/patchback/backports/8.3.x/6c806b499...238bad2
Merge pull request #12656 from RonnyPfannschmidt/fix-12652-detect-conda-envae6034a
Merge pull request #12641 from pytest-dev/patchback/backports/8.3.x/c03989cee...31337ab
Merge pull request #12640 from pytest-dev/update-userca3070b
Merge pull request #12637 from pytest-dev/release-8.3.1de98446
Prepare release version 8.3.1bd0a042
Merge pull request #12636 from pytest-dev/update-release-notes664325b
doc/changelog: update 8.3.0 notes19d225d
Merge pull request #12635 from pytest-dev/release-8.3.0Updates
coverage
from 7.5.3 to 7.6.1Changelog
Sourced from coverage's changelog.
... (truncated)
Commits
29f5898
docs: sample HTML for 7.6.19b829f1
docs: prep for 7.6.1ebbb6a2
build: wheels for 3.13rc13872525
chore: make upgrade7a27f40
test: fix a test on free-threading, use abiflags to get site-packages path co...2b53664
build: include gil/nogil in the version bannerda1682f
docs: changelog and contributor for #1828dc819ff
test: two tests for #18289aaa404
fix: properly handle backslash before multi-line string (#1828)9c50270
chore: make upgradeUpdates
pre-commit
from 3.7.1 to 3.8.0Release notes
Sourced from pre-commit's releases.
Changelog
Sourced from pre-commit's changelog.
Commits
d46423f
v3.8.08133abd
Merge pull request #3265 from lorenzwalthert/issue-3206da0c1d0
implement health check for language:rf641f6a
Merge pull request #3264 from pre-commit/pre-commit-ci-update-configa68a19d
fixes for mypy 1.1188317dd
[pre-commit.ci] pre-commit autoupdatefaa6f8c
Merge pull request #3244 from pre-commit/pre-commit-ci-update-configf632459
[pre-commit.ci] pre-commit autoupdate0252908
Merge pull request #3240 from pre-commit/pre-commit-ci-update-config69b5dce
[pre-commit.ci] pre-commit autoupdateUpdates
debugpy
from 1.8.1 to 1.8.5Release notes
Sourced from debugpy's releases.
Commits
a68a804
Merge pull request #1646 from microsoft/remove_vendored_infoae01f96
remove extra dist-info folder causing issues when uploading to pypidc58df1
Merge pull request #1549 from wmvanvliet/qt67b3dfb8
Merge pull request #1639 from microsoft/add_entry_pointaaab993
fix comments and remove unneeded logic1245e8e
fix indent bugbcab469
Allow the user to specify debugpy path via the environment820d21e
Merge pull request #1624 from microsoft/extra_argv_envvar7abb9cc
PR Feedback0274b12
PR feedbackDependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase
.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependab... _Description has been truncated_