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

Update validataclass requirement from ~=0.10.0 to ~=0.11.0 #85

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

dependabot[bot]
Copy link

@dependabot dependabot bot commented on behalf of github Jan 27, 2025

Updates the requirements on validataclass to permit the latest version.

Release notes

Sourced from validataclass's releases.

0.11.0

Full changelog

This release makes the library PEP 561 compatible by adding a py.typed file. It also fixes some mypy issues that were previously ignored.

While there is still some work necessary to make the library fully compatible with mypy (see #116), this release enables mypy to detect the type annotations in the library without the need for stub files.

Important note / breaking changes

This update was originally released as patch version 0.10.1, but was then yanked and later re-released as a new minor version instead.

The update does not introduce any breaking changes in the code. However, it may result in mypy errors in your project which have previously not been discovered by mypy, thus leading to failing CI pipelines. Keep this in mind when updating the library.

Some of the issues found by mypy currently need to be ignored using # type: ignore comments, until the library is fully compatible with mypy (#116). Examples:

  • Return type "X" of "validate" incompatible with return type "Y" in supertype "SomeBaseValidator" [override]: This can happen when you subclass a validator and change the return type of the validate method, which technically violates the Liskov substitution principle. However, in the case of validators, that's intentional.
  • Item "UnsetValueType" of "X | UnsetValueType" has no attribute "Y": This can happen despite of conditions like if some_field is not UnsetValue:, because mypy doesn't know that UnsetValue is a sentinel object, thus not being able to narrow down the type. A possible workaround that doesn't require # type: ignore would be to define a Type Guard](https://mypy.readthedocs.io/en/stable/type_narrowing.html#user-defined-type-guards) and use that instead of the bare condition.

We will hopefully find better solutions for these problems in the future.

Added

  • Add py.typed file to make the package PEP 561 compatible. #125

Fixed

  • Explicitly re-export imports in __init__.py by defining __all__ to fix mypy issues. #125

#116: binary-butterfly/validataclass#116 #125: binary-butterfly/validataclass#125

Changelog

Sourced from validataclass's changelog.

0.11.0 - 2024-08-12

Full changelog

This release makes the library PEP 561 compatible by adding a py.typed file. It also fixes some mypy issues that were previously ignored.

While there is still some work necessary to make the library fully compatible with mypy (see #116), this release enables mypy to detect the type annotations in the library without the need for stub files.

Important note / breaking changes

This update was originally released as patch version 0.10.1, but was then yanked and later re-released as a new minor version instead.

The update does not introduce any breaking changes in the code. However, it may result in mypy errors in your project which have previously not been discovered by mypy, thus leading to failing CI pipelines. Keep this in mind when updating the library.

Some of the issues found by mypy currently need to be ignored using # type: ignore comments, until the library is fully compatible with mypy (#116). Examples:

  • Return type "X" of "validate" incompatible with return type "Y" in supertype "SomeBaseValidator" [override]: This can happen when you subclass a validator and change the return type of the validate method, which technically violates the Liskov substitution principle. However, in the case of validators, that's intentional.
  • Item "UnsetValueType" of "X | UnsetValueType" has no attribute "Y": This can happen despite of conditions like if some_field is not UnsetValue:, because mypy doesn't know that UnsetValue is a sentinel object, thus not being able to narrow down the type. A possible workaround that doesn't require # type: ignore would be to define a Type Guard and use that instead of the bare condition.

We will hopefully find better solutions for these problems in the future.

Added

  • Add py.typed file to make the package PEP 561 compatible. #125

Fixed

  • Explicitly re-export imports in __init__.py by defining __all__ to fix mypy issues. #125

#116: binary-butterfly/validataclass#116 #125: binary-butterfly/validataclass#125

0.10.1 - 2024-08-08 [YANKED]

This release was yanked from PyPI and re-released as 0.11.0. (See release notes above.)

_Reason: Starting with this release, the library is PEP 561 compatible, which means that mypy recognized it as a typed

... (truncated)

Commits
  • eb5f934 Merge pull request #127 from binary-butterfly/release-0.11.0
  • 50eb657 Prepare release of 0.11.0; add note about yanked version 0.10.1
  • 787a497 Merge pull request #126 from binary-butterfly/release-0.10.1
  • c487452 Prepare release of 0.10.1
  • 2b601de Merge pull request #125 from binary-butterfly/pep561-typed-package
  • faf22b6 Fix import loop in validataclass.validators
  • 1694bbb Explicitly re-export imports using all
  • 779710c Add py.typed file to make the package PEP 561 compatible
  • 3880aac Makefile: Fix phony target docker-test-all
  • See full diff in compare view

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 <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Updates the requirements on [validataclass](https://github.com/binary-butterfly/validataclass) to permit the latest version.
- [Release notes](https://github.com/binary-butterfly/validataclass/releases)
- [Changelog](https://github.com/binary-butterfly/validataclass/blob/main/CHANGELOG.md)
- [Commits](binary-butterfly/validataclass@0.10.0...0.11.0)

---
updated-dependencies:
- dependency-name: validataclass
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
@dependabot dependabot bot added dependencies Pull requests that update a dependency file python Pull requests that update Python code labels Jan 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file python Pull requests that update Python code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants