gtalarico / pyairtable

Python Api Client for Airtable
https://pyairtable.readthedocs.io
MIT License
786 stars 139 forks source link

Workaround for pydantic v2 #288

Closed xl0 closed 1 year ago

xl0 commented 1 year ago

It's a bit heavier than expected to make mypy happy on both pydantic versions.

codecov[bot] commented 1 year ago

Codecov Report

Merging #288 (762b1bc) into main (d775b64) will decrease coverage by 0.29%. The diff coverage is 75.00%.

@@            Coverage Diff             @@
##             main     #288      +/-   ##
==========================================
- Coverage   95.80%   95.51%   -0.29%     
==========================================
  Files          19       20       +1     
  Lines         929      937       +8     
==========================================
+ Hits          890      895       +5     
- Misses         39       42       +3     
Files Changed Coverage Δ
pyairtable/_compat.py 62.50% <62.50%> (ø)
pyairtable/api/types.py 100.00% <100.00%> (ø)
pyairtable/models/_base.py 97.77% <100.00%> (ø)
xl0 commented 1 year ago

Agree re tox, I'll add it later today.

xl0 commented 1 year ago

@mesozoic I updated the PR to

xl0 commented 1 year ago

@mesozoic , any idea what's up with the docs failing?

mesozoic commented 1 year ago

@mesozoic , any idea what's up with the docs failing?

I think you might've forgotten to git add the new file. Can we call it _compat.py, though, (1) to make it clear that it's internal and not part of the public API, and (2) to avoid any confusion arising from the module and its contents having the same name?

xl0 commented 1 year ago

@mesozoic , heh, my bad. Ok, renamed it to _compat.py.

mesozoic commented 1 year ago

@xl0 One more request, could you rebase the branch with signed commits? Easiest way is with SSH, in my experience, but the repo requires it before we merge. I could rebase and merge it on your behalf, but then you won't get any credit. 😁

xl0 commented 1 year ago

Ok, I'll check it later today.

xl0 commented 1 year ago

@mesozoic , done

mesozoic commented 1 year ago

Thanks very much for solving this!