Support for sqlalchemy-mate 2.0.0.1
Opened this issue · 8 comments
Describe the problem
During import the uszipcode package fails with the following error.
module 'sqlalchemy_mate' has no attribute 'ExtendedBase'
A dependent package called sqlalchemy-mate
updated to version 2.0.0.1 last night and the ExtendedBase
attribute is now under sqlalchemy_mate.api
Sample code to reproduce the problem
When executing: import uszipcode
The following command within model.py
errors: class AbstractSimpleZipcode(Base, sam.ExtendedBase):
Potential Solution
Update uszipcode
to leverage the ExtendedBase
attribute from sqlalchemy_mate.api
in version 2.0.0.1.
Maybe you can try talk to the author lively here https://gitter.im/MacHu-GWU-Python-Library-Technical-Support/community
As a workaround until uszipcode is updated, you can pin sqlalchemy-mate==2.0.0.0
(or before) to unblock your workflows.
i am getting following error
- ERROR: Could not find a version that satisfies the requirement sqlalchemey_mate==2.0.0.0 (from versions: none)
ERROR: No matching distribution found for sqlalchemey_mate==2.0.0.0
i am getting following error
- ERROR: Could not find a version that satisfies the requirement sqlalchemey_mate==2.0.0.0 (from versions: none)
ERROR: No matching distribution found for sqlalchemey_mate==2.0.0.0
Heh sorry, did that comment a bit too quickly. I had a typo. It has been edited.
Hi folks and @bdipietro since sqlalchemy 2.X has breaking changes, the sqlalchemy_mate 2.X won't be able to compatible with this library.
You can add sqlalchemy_mate>=1.4.28.3,<2.0.0.0
in your requirements file to fix this issue.
I am working on this to fully adapt sqlalchemy 2.X API, however, it may introduce breaking change in uszipcode
as well, let me figure out a more reasonable way to minimize the impact of the compatibility.
thank you for your help answering question @mdelcambre
@joyjitroy also, the data is still based on census 2010. I found a good resources to crawl 2020 data. I need some time to upgrade this library using the latest data.
This is currently broken out of the box with a pip install.
In a clean venv
pip install uszipcode
then
>>> from uszipcode import SearchEngine
results in
AttributeError: module 'sqlalchemy_mate' has no attribute 'ExtendedBase'
Sure, this can be worked around by also somehow magically knowing to install sqlalchemy_mate==2.0.0.0
, but I think it would be much better to release a version 1.0.2 of uszipcode that does this automatically.
Then the real fix with potential major changes can happen at a later time.