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

Bumps #57

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from
Draft

Bumps #57

wants to merge 4 commits into from

Conversation

jtojnar
Copy link

@jtojnar jtojnar commented Sep 22, 2024

  • Switch to poetry-core
  • Upgrade to Pydantic 2
  • Fix typing error

Current issues:

  • need to update lockfile
  • parso 0.8 no longer supports Python ≤ 3.5: https://github.com/davidhalter/parso/blob/v0.8.4/CHANGELOG.rst#080-2020-08-05
  • Whatever this is:
    >       assert val == expected
    E       AssertionError: assert '# type: (Cal...-> Types.NONE' == '# type: (Cal...int]) -> None'
    E         
    E         - # type: (Callable[[], int]) -> None
    E         ?                                 ^^^
    E         + # type: (Callable[[], int]) -> Types.NONE
    E         ?                                ++++++ ^^^
    
    tests/refactor/test_utils.py:149: AssertionError
    
  • waterloo/refactor/annotations.py:59: DeprecationWarning: `structlog.threadlocal` is deprecated, please use `structlog.contextvars` instead.
    

- Used `bump-pydantic`
- `BaseModel.__fields__` and `copy()` were deprecated in favour of `model_fields` and `model_copy()` respectively.
- `BaseSettings` has been moved to the `pydantic-settings` package:
  https://docs.pydantic.dev/2.7/migration/#basesettings-has-moved-to-pydantic-settings
- `FieldInfo.type_` is no longer available, must use `FieldInfo.annotation`:
  https://www.github.com/pydantic/pydantic/issues/7220
For some reason `@_repr_type_arg.register` annotation for `_` would fail:

    NameError: name 'ImportStrategy' is not defined
@jtojnar jtojnar marked this pull request as draft September 22, 2024 21:58
- Numbers are no longer coerced to strings by default, let’s revert that in config for now.
  https://docs.pydantic.dev/2.7/migration/#validator-behavior-changes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant