Comments (2)
It'll be because before v2.7 we just called the enum with the value so MultiValueEnum
took care of validating that the value was allowed.
As of 2.7 we check the value is valid in rust before returning associated the enum value. I've no idea how hard it is to get multiple input values to map to a single enum member, but we can try.
from pydantic.
Yeah likely on our end, we made some major changes to enum handling in 2.7. Will look into a fix for this!
from pydantic.
Related Issues (20)
- unittest.mock.autospec and hastattr() HOT 1
- Pydantic throws errors on its own 'alias' and 'validation_alias' attibutes in the Field module HOT 2
- `pydantic` weekly project plan (Sydney Runkle) - July 22nd, 2024 HOT 3
- Multiple tags for variant of discriminated union HOT 1
- pydantic.mypy `from_attributes` config check does not work with deprecated `.from_orm()` and gives false positives for `v1.BaseModel` HOT 3
- Typing error when trying to use field name that conflicts with deprecated pydantic fields HOT 1
- TypeError: mypy.types.TypeVarId object expected; got int HOT 1
- Incorrect "raises" documentation for `BaseModel.model_validate_json` HOT 2
- maximum recursion depth error when model's field has a recursive type HOT 2
- default_factory passed in annotation Field silently ignored HOT 3
- Nested Discriminated Union + TypeAdapter HOT 5
- Clarification Needed: Differentiation Between Types and Constraints in Documentation HOT 1
- PydanticSerializationError on IPv4Network (Standard Library Type) HOT 3
- Add class name to "has conflict" warnings HOT 2
- Tracking `_generate_schema.py` refactoring HOT 1
- (🐞) `Literal` with `Enum`s aren't validated consistently HOT 4
- KeyError when inhering from a self-referencing generic model HOT 2
- Customize Pydantic Error Type (AKA subclassing PydanticCustomError)
- Using $ref" in examples raises KeyError on .model_json_schema() generation HOT 8
- pydantic v2 memory usage with hundreds of complicated models HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pydantic.