Skip to content

Conversation

@dutyrok
Copy link
Contributor

@dutyrok dutyrok commented Dec 6, 2025

The test_json_schema function in tests/test_coordinate.py and tests/test_json_schema.py has been failing fails since the feature introduced in the pydantic/pydantic@4057cd2 commit.

…chema

The test_json_schema function in tests/test_coordinate.py and
tests/test_json_schema.py has been failing fails since the feature introduced
in the pydantic/pydantic@4057cd2 commit.

Signed-off-by: Alexandr Shashkin <[email protected]>
@dutyrok
Copy link
Contributor Author

dutyrok commented Dec 6, 2025

These changes are applied when using pydantic >= 2.12.0.

Comment on lines +221 to +224
'anyOf': [
{'maximum': 90.0, 'minimum': -90.0, 'type': 'number'},
{'type': 'string','pattern': '^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$'}
],
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you @dutyrok make a separated test specifying the python version

@yezz123 yezz123 changed the base branch from main to dev December 26, 2025 23:12
@yezz123 yezz123 merged commit bbad404 into pydantic:dev Dec 26, 2025
2 of 10 checks passed
yezz123 added a commit that referenced this pull request Dec 26, 2025
* Add mime_types.py (#348)

* add mime_types.py

* Revert formatting

* Re-run formatting

* Remove coverage check for StrEnums

* Update the mime_types

---------

Co-authored-by: Yasser Tahiri <[email protected]>

* tests: Add regex patterns to the expected JSON schema for test_json_schema (#358)

The test_json_schema function in tests/test_coordinate.py and
tests/test_json_schema.py has been failing fails since the feature introduced
in the pydantic/pydantic@4057cd2 commit.

Signed-off-by: Alexandr Shashkin <[email protected]>

* Update Python version requirements and classifiers in pyproject.toml and uv.lock

- Updated the required Python version from 3.8 to 3.9 in both pyproject.toml and uv.lock.
- Added support for Python 3.14 in the classifiers section of pyproject.toml.
- Adjusted the target version for Ruff from 'py38' to 'py39'.
- Cleaned up unnecessary resolution markers and dependencies in uv.lock.

These changes ensure compatibility with newer Python versions and streamline dependency management.

* Refactor type hints to use built-in tuple syntax and improve code consistency

- Updated type hints in color.py, coordinate.py, and mime_types.py to use the built-in `tuple` syntax instead of `Tuple` from typing.
- Adjusted the CronSeeker class in cron.py to include a proper method definition.
- Cleaned up import statements in several files to remove unnecessary imports and ensure compatibility with Python 3.11.
- Enhanced test cases in test_coordinate.py, test_json_schema.py, and test_mime_types.py for better readability and consistency.

These changes improve code clarity and maintainability across the codebase.

* Update CI configuration and Makefile for Python 3.14 support

- Added support for Python 3.14 in the Makefile to run tests with the new version.
- Updated the CI workflow to include Python 3.14 in the matrix of versions for testing.

These changes ensure compatibility with the latest Python version and enhance the testing framework.

* Enhance coordinate type handling and JSON schema generation

- Introduced a new annotation for handling float and Decimal types in coordinates, ensuring proper JSON schema representation.
- Updated the CoordinateType to utilize the new annotation for better serialization.
- Added JSON schema methods to Latitude and Longitude classes to support decimal string validation.
- Updated the uv.lock file to reflect changes in package versions and dependencies, including coverage and typing-extensions.

These changes improve the handling of coordinate values and enhance the overall schema generation process.

* Refactor cron.py and pendulum_dt.py for improved type handling and validation

- Removed unnecessary type checking for CronSeeker in cron.py, simplifying the import structure.
- Updated the schedule and next_after methods to directly return the expected types without casting.
- Added validation in pendulum_dt.py to raise a ValueError for invalid ISO 8601 duration strings.

These changes enhance code clarity and ensure proper type handling in the affected modules.

* Update HISTORY.md for version 2.10.6 release

- Added new features including credit card brand updates, time parsing for `pendulum`, and a new cron type.
- Fixed various documentation issues and improved validation logic for `mac_address` and `phone_numbers`.
- Enhanced test coverage for DomainStr validation and added usage examples for the `PhoneNumber` class.
- Updated dependencies and fixed issues related to relative path creation on Windows.

These changes enhance functionality, improve documentation, and ensure better validation across the codebase.

---------

Signed-off-by: Alexandr Shashkin <[email protected]>
Co-authored-by: Nitzan Bresler <[email protected]>
Co-authored-by: Alexandr Shashkin <[email protected]>
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.

2 participants