pydantic / pydantic-core

Core validation logic for pydantic written in rust
MIT License
1.44k stars 247 forks source link

Bump the python-packages group across 1 directory with 9 updates #1518

Closed dependabot[bot] closed 3 weeks ago

dependabot[bot] commented 3 weeks ago

Updates the requirements on coverage, hypothesis, pytest, pytest-codspeed, tzdata, griffe, pyright, ruff and mypy to permit the latest version. Updates coverage from 7.6.1 to 7.6.4

Changelog

Sourced from coverage's changelog.

Version 7.6.4 — 2024-10-20

  • fix: multi-line with statements could cause contained branches to be incorrectly marked as missing (issue 1880_). This is now fixed.

.. _issue 1880: nedbat/coveragepy#1880

.. _changes_7-6-3:

Version 7.6.3 — 2024-10-13

  • Fix: nested context managers could incorrectly be analyzed to flag a missing branch on the last context manager, as described in issue 1876_. This is now fixed.

  • Fix: the missing branch message about not exiting a module had an extra "didn't," as described in issue 1873_. This is now fixed.

.. _issue 1873: nedbat/coveragepy#1873 .. _issue 1876: nedbat/coveragepy#1876

.. _changes_7-6-2:

Version 7.6.2 — 2024-10-09

  • Dropped support for Python 3.8 and PyPy 3.8.

  • Fix: a final wildcard match/case clause assigning to a name (case _ as value) was incorrectly marked as a missing branch. This is now fixed, closing issue 1860_.

  • Fewer things are considered branches now. Lambdas, comprehensions, and generator expressions are no longer marked as missing branches if they don't complete execution. Closes issue 1852_.

  • Fix: the HTML report didn't properly show multi-line f-strings that end with a backslash continuation. This is now fixed, closing issue 1836, thanks to LiuYinCarl and Marco Ricci <pull 1838_>.

  • Fix: the LCOV report now has correct line numbers (fixing issue 1846) and better branch descriptions for BRDA records (fixing issue 1850). There are other changes to lcov also, including a new configuration option :ref:line_checksums <config_lcov_line_checksums> to control whether line checksums are included in the lcov report. The default is false. To keep checksums set it to true. All this work is thanks to Zack Weinberg

... (truncated)

Commits
  • f24f76b docs: sample HTML for 7.6.4
  • 96e10f7 docs: prep for 7.6.4
  • b8c236a fix: multi-line with-statements exit correctly. #1880
  • 64b7a45 docs: another discord reference
  • 68d7427 docs: Python Discord
  • 43adcea build: include 3.14 in the usual Pythons
  • fb2b49f build: github_releases can update older releases, and pauses to get the sorti...
  • ca550ca 3.0b2 wasn't correctly titled
  • debcc77 build: bump version
  • 342a4cb docs: sample HTML for 7.6.3
  • Additional commits viewable in compare view


Updates hypothesis from 6.111.2 to 6.116.0

Release notes

Sourced from hypothesis's releases.

Hypothesis for Python - version 6.116.0

Hypothesis now detects if it is running on a CI server and provides better default settings for running on CI in this case.

The canonical version of these notes (with links) is on readthedocs.

Hypothesis for Python - version 6.115.6

This patch changes the priority order of pretty printing logic so that a user provided pretty printing method will always be used in preference to e.g. printing it like a dataclass.

The canonical version of these notes (with links) is on readthedocs.

Commits
  • d16b183 Bump hypothesis-python version to 6.116.0 and update changelog
  • 4a702a9 Merge pull request #4152 from HypothesisWorks/DRMacIver/ci-config
  • 13c3785 Default to CI-appropriate settings when running on CI
  • 8d88e01 Bump hypothesis-python version to 6.115.6 and update changelog
  • 3c128e7 Merge pull request #4150 from tybug/fix-deploy-docs
  • 3b088c0 simplify
  • 4b9d34e proper bearer token format
  • 9880b85 only build changes.rst when parsing changelog
  • 21502ba Merge pull request #4148 from HypothesisWorks/DRMacIver/use-provided-pretty
  • 558db3c Always use a repr_pretty if provided
  • Additional commits viewable in compare view


Updates pytest from 8.3.2 to 8.3.3

Release notes

Sourced from pytest's releases.

8.3.3

pytest 8.3.3 (2024-09-09)

Bug fixes

  • #12446: Avoid calling @property (and other instance descriptors) during fixture discovery -- by asottile{.interpreted-text role="user"}

  • #12659: Fixed the issue of not displaying assertion failure differences when using the parameter --import-mode=importlib in pytest>=8.1.

  • #12667: Fixed a regression where type change in [ExceptionInfo.errisinstance]{.title-ref} caused [mypy]{.title-ref} to fail.

  • #12744: Fixed typing compatibility with Python 3.9 or less -- replaced [typing.Self]{.title-ref} with [typing_extensions.Self]{.title-ref} -- by Avasam{.interpreted-text role="user"}

  • #12745: Fixed an issue with backslashes being incorrectly converted in nodeid paths on Windows, ensuring consistent path handling across environments.

  • #6682: Fixed bug where the verbosity levels where not being respected when printing the "msg" part of failed assertion (as in assert condition, msg).

  • #9422: Fix bug where disabling the terminal plugin via -p no:terminal would cause crashes related to missing the verbose option.

    -- by GTowers1{.interpreted-text role="user"}

Improved documentation

  • #12663: Clarify that the [pytest_deselected]{.title-ref} hook should be called from [pytest_collection_modifyitems]{.title-ref} hook implementations when items are deselected.
  • #12678: Remove erroneous quotes from [tmp_path_retention_policy]{.title-ref} example in docs.

Miscellaneous internal changes

  • #12769: Fix typos discovered by codespell and add codespell to pre-commit hooks.
Commits


Updates pytest-codspeed to 3.0.0

Release notes

Sourced from pytest-codspeed's releases.

v3.0.0

What's Changed

This new release includes a new wall time instrument that allows measurement of real execution timings. This will be very useful for macro benchmarks running on properly isolated machines. You can now use our CodSpeed Macro runners without changing anything to your existing CI workflows.

Find more info on our Walltime instrument here.

image

Breaking changes

  • Dropped support for Python 3.8 since it reached its EOL

Features

Fixes

Internals

New Contributors

Full Changelog: https://github.com/CodSpeedHQ/pytest-codspeed/compare/v2.2.1...v3.0.0

Commits
  • 4f45b41 Release v3.0.0 🚀
  • c7fca17 fix: fix compatibility with pytest-benchmark 5.0.0
  • 630a6cd chore: drop support for python3.8
  • 68a950a chore: expose type information (#53)
  • 8ed280f chore: run the CI with ubuntu 24.04
  • 9e11fea chore: improve naming in workflow examples
  • 2adda63 ci: bump actions/checkout to v4 (#47)
  • d1c3db8 Release v3.0.0b4 🚀
  • 9a2186e feat: send more outlier data
  • de252c7 test: add benches for various syscalls
  • Additional commits viewable in compare view


Updates tzdata from 2024.1 to 2024.2

Release notes

Sourced from tzdata's releases.

2024.2: Release of upstream tzdata 2024b

Version 2024.2

Upstream version 2024b released 2024-09-04T19:27:47+00:00

Briefly:

Improve historical data for Mexico, Mongolia, and Portugal. System V names are now obsolescent. The main data form now uses %z. The code now conforms to RFC 8536 for early timestamps. Support POSIX.1-2024, which removes asctime_r and ctime_r. Assume POSIX.2-1992 or later for shell scripts. SUPPORT_C89 now defaults to 1.

Changes to past timestamps

Asia/Choibalsan is now an alias for Asia/Ulaanbaatar rather than being a separate Zone with differing behavior before April 2008. This seems better given our wildly conflicting information about Mongolia's time zone history. (Thanks to Heitor David Pinto.)

Historical transitions for Mexico have been updated based on official Mexican decrees. The affected timestamps occur during the years 1921-1927, 1931, 1945, 1949-1970, and 1981-1997. The affected zones are America/Bahia_Banderas, America/Cancun, America/Chihuahua, America/Ciudad_Juarez, America/Hermosillo, America/Mazatlan, America/Merida, America/Mexico_City, America/Monterrey, America/Ojinaga, and America/Tijuana. (Thanks to Heitor David Pinto.)

Historical transitions for Portugal, represented by Europe/Lisbon, Atlantic/Azores, and Atlantic/Madeira, have been updated based on a close reading of old Portuguese legislation, replacing previous data mainly originating from Whitman and Shanks & Pottenger. These changes affect a few transitions in 1917-1921, 1924, and 1940 throughout these regions by a few hours or days, and various timestamps between 1977 and 1993 depending on the region. In particular, the Azores and Madeira did not observe DST from 1977 to 1981. Additionally, the adoption of standard zonal time in former Portuguese colonies have been adjusted: Africa/Maputo in 1909, and Asia/Dili by 22 minutes at the start of 1912. (Thanks to Tim Parenti.)

Changes to past tm_isdst flags

The period from 1966-04-03 through 1966-10-02 in Portugal is now modeled as DST, to more closely reflect how contemporaneous changes in law entered into force.

Changes to data

Names present only for compatibility with UNIX System V (last released in the 1990s) have been moved to 'backward'. These names, which for post-1970 timestamps mostly just duplicate data of geographical names, were confusing downstream uses. Names moved to 'backward' are now links to geographical names. This affects behavior for TZ='EET' for some pre-1981 timestamps, for TZ='CET' for some pre-1947 timestamps, and for TZ='WET' for some pre-1996 timestamps.

... (truncated)

Changelog

Sourced from tzdata's changelog.

Version 2024.2

Upstream version 2024b released 2024-09-04T19:27:47+00:00

Briefly:

Improve historical data for Mexico, Mongolia, and Portugal. System V names are now obsolescent. The main data form now uses %z. The code now conforms to RFC 8536 for early timestamps. Support POSIX.1-2024, which removes asctime_r and ctime_r. Assume POSIX.2-1992 or later for shell scripts. SUPPORT_C89 now defaults to 1.

Changes to past timestamps

Asia/Choibalsan is now an alias for Asia/Ulaanbaatar rather than being a separate Zone with differing behavior before April 2008. This seems better given our wildly conflicting information about Mongolia's time zone history. (Thanks to Heitor David Pinto.)

Historical transitions for Mexico have been updated based on official Mexican decrees. The affected timestamps occur during the years 1921-1927, 1931, 1945, 1949-1970, and 1981-1997. The affected zones are America/Bahia_Banderas, America/Cancun, America/Chihuahua, America/Ciudad_Juarez, America/Hermosillo, America/Mazatlan, America/Merida, America/Mexico_City, America/Monterrey, America/Ojinaga, and America/Tijuana. (Thanks to Heitor David Pinto.)

Historical transitions for Portugal, represented by Europe/Lisbon, Atlantic/Azores, and Atlantic/Madeira, have been updated based on a close reading of old Portuguese legislation, replacing previous data mainly originating from Whitman and Shanks & Pottenger. These changes affect a few transitions in 1917-1921, 1924, and 1940 throughout these regions by a few hours or days, and various timestamps between 1977 and 1993 depending on the region. In particular, the Azores and Madeira did not observe DST from 1977 to 1981. Additionally, the adoption of standard zonal time in former Portuguese colonies have been adjusted: Africa/Maputo in 1909, and Asia/Dili by 22 minutes at the start of 1912. (Thanks to Tim Parenti.)

Changes to past tm_isdst flags

The period from 1966-04-03 through 1966-10-02 in Portugal is now modeled as DST, to more closely reflect how contemporaneous changes in law entered into force.

Changes to data

Names present only for compatibility with UNIX System V (last released in the 1990s) have been moved to 'backward'. These names, which for post-1970 timestamps mostly just duplicate data of geographical names, were confusing downstream uses. Names moved to 'backward' are now links to geographical names. This affects behavior for TZ='EET' for some pre-1981 timestamps, for TZ='CET' for some pre-1947 timestamps, and for TZ='WET' for some pre-1996 timestamps. Also, TZ='MET' now behaves like TZ='CET' and so uses the abbreviation "CET"

... (truncated)

Commits


Updates griffe from 1.2.0 to 1.5.1

Release notes

Sourced from griffe's releases.

1.5.1

1.5.1 - 2024-10-18

Compare with 1.5.0

Bug Fixes

  • Sort Git tags using creatordate field, which works with both lightweight and annotated tags (3bfa401 by Timothée Mazzucotelli). Issue-327

1.5.0

1.5.0 - 2024-10-18

Compare with 1.4.1

Features

  • Allow setting and deleting parameters within container (19f354d by Timothée Mazzucotelli).

1.4.1

1.4.1 - 2024-10-12

Compare with 1.4.0

Code Refactoring

  • Drop support for Python 3.8 (f2d39b8 by Timothée Mazzucotelli).

1.4.0

1.4.0 - 2024-10-11

Compare with 1.3.2

Features

  • Add Markdown and GitHub output formats to the griffe check command (806805c by Timothée Mazzucotelli).

1.3.2

1.3.2 - 2024-10-01

Compare with 1.3.1

Bug Fixes

  • Normalize paths of temporary Git worktrees (0821e67 by Timothée Mazzucotelli). Issue-324

1.3.1

1.3.1 - 2024-09-12

Compare with 1.3.0

... (truncated)

Changelog

Sourced from griffe's changelog.

1.5.1 - 2024-10-18

Compare with 1.5.0

Bug Fixes

  • Sort Git tags using creatordate field, which works with both lightweight and annotated tags (3bfa401 by Timothée Mazzucotelli). Issue-327

1.5.0 - 2024-10-18

Compare with 1.4.1

Features

  • Allow setting and deleting parameters within container (19f354d by Timothée Mazzucotelli).

1.4.1 - 2024-10-12

Compare with 1.4.0

Code Refactoring

  • Drop support for Python 3.8 (f2d39b8 by Timothée Mazzucotelli).

1.4.0 - 2024-10-11

Compare with 1.3.2

Features

  • Add Markdown and GitHub output formats to the griffe check command (806805c by Timothée Mazzucotelli).

1.3.2 - 2024-10-01

Compare with 1.3.1

Bug Fixes

  • Normalize paths of temporary Git worktrees (0821e67 by Timothée Mazzucotelli). Issue-324

1.3.1 - 2024-09-12

Compare with 1.3.0

Bug Fixes

  • Refactor and fix logic again for fetching returns/yields/receives annotation from parents (a80bd3c by Timothée Mazzucotelli). Follow-up-of-PR-322
  • Don't crash on invalid signature given "Receives" section (1cb8f51 by Timothée Mazzucotelli).

1.3.0 - 2024-09-10

... (truncated)

Commits
  • 4ef4649 chore: Prepare release 1.5.1
  • 3bfa401 fix: Sort Git tags using creatordate field, which works with both lightweig...
  • 65e3cdb chore: Prepare release 1.5.0
  • 19f354d feat: Allow setting and deleting parameters within container
  • e71e541 docs: Add how-to selectively inspect objects
  • bc454d0 docs: Add main extensions page
  • 7486612 docs: Add mkdocstrings-python to downstream projects
  • af66c98 docs: Show extensions in tables
  • 4f0463e docs: Fix breadcrumbs
  • 3636b7d docs: Remove sponsors only mention for griffe-pydantic
  • Additional commits viewable in compare view


Updates pyright from 1.1.378 to 1.1.387

Release notes

Sourced from pyright's releases.

v1.1.387

No release notes provided.

v1.1.386

No release notes provided.

v1.1.385

No release notes provided.

v1.1.384

No release notes provided.

v1.1.383

No release notes provided.

v1.1.382.post1

No release notes provided.

v1.1.382.post0

This release fixes a regression with nodeenv support in the v1.1.382 release

v1.1.382

No release notes provided.

v1.1.381

No release notes provided.

v1.1.380

No release notes provided.

v1.1.379

No release notes provided.

Commits


Updates ruff from 0.6.3 to 0.7.1

Release notes

Sourced from ruff's releases.

0.7.1

Release Notes

Preview features

  • Fix E221 and E222 to flag missing or extra whitespace around == operator (#13890)
  • Formatter: Alternate quotes for strings inside f-strings in preview (#13860)
  • Formatter: Join implicit concatenated strings when they fit on a line (#13663)
  • [pylint] Restrict iteration-over-set to only work on sets of literals (PLC0208) (#13731)

Rule changes

  • [flake8-type-checking] Support auto-quoting when annotations contain quotes (#11811)

Server

  • Avoid indexing the workspace for single-file mode (#13770)

Bug fixes

  • Make ARG002 compatible with EM101 when raising NotImplementedError (#13714)

Other changes

  • Introduce more Docker tags for Ruff (similar to uv) (#13274)

Contributors

Install ruff 0.7.1

Install prebuilt binaries via shell script

... (truncated)

Changelog

Sourced from ruff's changelog.

0.7.1

Preview features

  • Fix E221 and E222 to flag missing or extra whitespace around == operator (#13890)
  • Formatter: Alternate quotes for strings inside f-strings in preview (#13860)
  • Formatter: Join implicit concatenated strings when they fit on a line (#13663)
  • [pylint] Restrict iteration-over-set to only work on sets of literals (PLC0208) (#13731)

Rule changes

  • [flake8-type-checking] Support auto-quoting when annotations contain quotes (#11811)

Server

  • Avoid indexing the workspace for single-file mode (#13770)

Bug fixes

  • Make ARG002 compatible with EM101 when raising NotImplementedError (#13714)

Other changes

  • Introduce more Docker tags for Ruff (similar to uv) (#13274)

0.7.0

Check out the blog post for a migration guide and overview of the changes!

Breaking changes

  • The pytest rules PT001 and PT023 now default to omitting the decorator parentheses when there are no arguments (#12838, #13292). This was a change that we attempted to make in Ruff v0.6.0, but only partially made due to an error on our part. See the blog post for more details.
  • The useless-try-except rule (in our tryceratops category) has been recoded from TRY302 to TRY203 (#13502). This ensures Ruff's code is consistent with the same rule in the tryceratops linter.
  • The lint.allow-unused-imports setting has been removed (#13677). Use lint.pyflakes.allow-unused-imports instead.

Formatter preview style

  • Normalize implicit concatenated f-string quotes per part (#13539)

Preview linter features

  • [refurb] implement hardcoded-string-charset (FURB156) (#13530)
  • [refurb] Count codepoints not bytes for slice-to-remove-prefix-or-suffix (FURB188) (#13631)

... (truncated)

Commits
  • 337af83 Bump version to 0.7.1 (#13913)
  • 113ce84 Fix normalize arguments when fstring_formatting is disabled (#13910)
  • 7272f83 Fix preview style name in can_omit_parentheses to is_f_string_formatting_en...
  • 3eb4546 [red-knot] Format mdtest Python snippets more concisely (#13905)
  • 77ae0cc [red-knot] Infer subscript expression types for bytes literals (#13901)
  • 73ee72b Join implicit concatenated strings when they fit on a line (#13663)
  • e402e27 Use referencial equality in traversal helper methods (#13895)
  • de4181d Remove "default" remark from ruff check (#13900)
  • 2c57c2d [red-knot] Type narrowing for isinstance checks (#13894)
  • 72c18c8 Fix E221 and E222 to flag missing or extra whitespace around == operator (#...
  • Additional commits viewable in compare view


Updates mypy from 1.11.2 to 1.13.0

Changelog

Sourced from mypy's changelog.

Mypy Release Notes

Next release

Change to enum membership semantics

As per the updated typing specification for enums, enum members must be left unannotated.

class Pet(Enum):
    CAT = 1  # Member attribute
    DOG = 2  # Member attribute
    WOLF: int = 3  # New error: Enum members must be left unannotated
species: str  # Considered a non-member attribute

In particular, the specification change can result in issues in type stubs (.pyi files), since historically it was common to leave the value absent:

# In a type stub (.pyi file)

class Pet(Enum):
# Change in semantics: previously considered members, now non-member attributes
CAT: int
DOG: int

# Mypy will now issue a warning if it detects this situation in type stubs:
# &gt; Detected enum &quot;Pet&quot; in a type stub with zero members.
# &gt; There is a chance this is due to a recent change in the semantics of enum membership.
# &gt; If so, use `member = value` to mark an enum member, instead of `member: type`

class Pet(Enum):
# As per the specification, you should now do one of the following:
DOG = 1 # Member attribute with value 1 and known type
WOLF = cast(int, ...) # Member attribute with unknown value but known type
LION = ... # Member attribute with unknown value and unknown type

Contributed by Terence Honles in PR 17207 and Shantanu Jain in PR 18068.

Mypy 1.13

We’ve just uploaded mypy 1.13 to the Python Package Index (PyPI). Mypy is a static type checker for Python. You can install it as follows:

python3 -m pip install -U mypy

... (truncated)

Commits


Most Recent Ignore Conditions Applied to This Pull Request | Dependency Name | Ignore Conditions | | --- | --- | | hypothesis | [>= 6.82.a, < 6.83] | | hypothesis | [>= 6.81.a, < 6.82] | | hypothesis | [>= 6.80.a, < 6.81] | | coverage | [>= 7.3.a, < 7.4] | | hypothesis | [>= 6.84.a, < 6.85] | | hypothesis | [>= 6.83.a, < 6.84] | | hypothesis | [>= 6.86.a, < 6.87] | | hypothesis | [>= 6.87.a, < 6.88] | | hypothesis | [>= 6.85.a, < 6.86] | | hypothesis | [>= 6.88.a, < 6.89] | | hypothesis | [>= 6.91.a, < 6.92] |

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 - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore major version` will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself) - `@dependabot ignore minor version` will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself) - `@dependabot ignore ` will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself) - `@dependabot unignore ` will remove all of the ignore conditions of the specified dependency - `@dependabot unignore ` will remove the ignore condition of the specified dependency and ignore conditions
codspeed-hq[bot] commented 3 weeks ago

CodSpeed Performance Report

Merging #1518 will improve performances by 41.58%

Comparing dependabot/pip/python-packages-7f649866f9 (0eb66a1) with main (5dd2992)

:tada: Hooray! pytest-codspeed just leveled up to 3.0.0!

A heads-up, this is a breaking change and it might affect your current performance baseline a bit. But here's the exciting part - it's packed with new, cool features and promises improved result stability :partying_face:! Curious about what's new? Visit our releases page to delve into all the awesome details about this new version.

Summary

⚡ 14 improvements ✅ 141 untouched benchmarks

Benchmarks breakdown

Benchmark main dependabot/pip/python-packages-7f649866f9 Change
test_core_python 29.6 µs 26 µs +13.87%
test_model_core_json 35.4 µs 30.1 µs +17.79%
test_core_python 29.4 µs 25.5 µs +14.9%
test_model_core_json 46.6 µs 41.6 µs +12.08%
test_arguments 25 µs 22.1 µs +13.07%
test_core_root_model 38.2 µs 33.7 µs +13.27%
test_definition_model_core 1.2 ms 1.1 ms +12.04%
test_generator_python 25.8 µs 22.3 µs +15.46%
test_generator_rust 20.2 µs 18 µs +12.2%
test_list_of_dict_models_core 125.2 µs 88.5 µs +41.58%
test_many_models_core_dict 1,177 µs 953.7 µs +23.42%
test_many_models_core_model 3.1 ms 2.4 ms +26.13%
test_nested_schema_inlined 20.2 ms 16 ms +25.98%
test_nested_schema_using_defs 19.8 ms 15.4 ms +28.2%
dependabot[bot] commented 3 weeks ago

Superseded by #1525.