fix(apitable.py): guard MetaField property=None and relax pydantic pin#128
Merged
paylm merged 2 commits intoJul 8, 2026
Merged
Conversation
- MetaField.__init__ crashed with TypeError when a mapped field type
arrived without a 'property' payload (or with property=None), because
property_model(**None) is not valid. Guard on isinstance(property, dict)
and fall back to data.get('type').
- pyproject.toml: pydantic '2.5.3' -> '^2.5.3' so installs succeed on
Python 3.12+/3.14 where 2.5.3 wheels aren't available.
- setup.py: pydantic '==1.7' -> '>=2.5.3,<3'; the previous pin was
incompatible with the v2 API the code already uses.
- Add unit tests covering the property=None regression and nested
MagicLookUp property parsing.
paylm
approved these changes
Jul 6, 2026
paylm
approved these changes
Jul 6, 2026
Fork PRs cannot activate a 'push'-only workflow, so PR apitable#128 shows no CI status. Add pull_request as an additional trigger so PRs against develop get validated too.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
TypeErrorinMetaField.__init__when a mapped field type is returned without apropertypayload (or withproperty=None). Previously the code didproperty_model(**property)unconditionally, which crashes whenpropertyisNone.pyproject.tomlfrom an exact2.5.3to^2.5.3, so installs succeed on Python 3.12+/3.14 (no 2.5.3 wheels exist for those interpreters).setup.py, which pinnedpydantic==1.7even though the code already uses the pydantic v2 API —pip install .was broken.property=Noneregression and nestedMagicLookUpproperty parsing.Motivation
Follow-up to vikadata/vika.py#62. The reporter is on Python 3.14, where the old vika.py (pydantic v1) can't import at all. They've been pointed at this SDK as the maintained replacement, but the exact
pydantic = "2.5.3"pin here would also block them (no matching wheel on 3.14). Loosening it lets 3.14 users install cleanly, and theMetaFieldguard fixes a latent crash that surfaces whenever the API returns a nullableproperty.Test plan
pytest test/test_meta_field.py test/test_utils.py— all pass locallypy-test.yml) greenfrom apitable import Apitableon Python 3.12Notes