Skip to content

Conversation

@gasman
Copy link
Collaborator

@gasman gasman commented Dec 14, 2024

Fixes #71. Incorporates #75

@gasman
Copy link
Collaborator Author

gasman commented Dec 16, 2024

The API changes from the airtable-python-wrapper package to pyairtable 2.x are summarised at https://pyairtable.readthedocs.io/en/stable/migrations.html#api-changes-in-1-0 - essentially rather than retrieving a client object with Airtable(base_key, table_name, api_key) there's an extra level of indirection to create an Api object and then retrieve a Table from it - after that things work mostly as before, just with some renames and search being a special case of all.

This means some fiddly changes in mock_airtable.py, but we expose the table object as _table so that we can continue fiddling with return_value as before.

Copy link

@laymonage laymonage left a comment

Choose a reason for hiding this comment

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

I code-searched the API changes and they seem to have been handled here, thanks!

@gasman gasman force-pushed the pyairtable-2-upgrade branch from c95da2a to 897dd90 Compare December 16, 2024 11:42
@gasman gasman merged commit 0aac47e into wagtail-nest:main Dec 16, 2024
5 checks passed
gasman added a commit that referenced this pull request Dec 16, 2024
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.

The Python Airtable Package needs to get updated

2 participants