Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for sqlalchemy-mate 2.0.0.1 #79

Open
bdipietro opened this issue May 17, 2024 · 8 comments · May be fixed by #80 or #81
Open

Support for sqlalchemy-mate 2.0.0.1 #79

bdipietro opened this issue May 17, 2024 · 8 comments · May be fixed by #80 or #81

Comments

@bdipietro
Copy link

bdipietro commented May 17, 2024

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

@bdipietro bdipietro linked a pull request May 17, 2024 that will close this issue
@mdelcambre mdelcambre linked a pull request May 17, 2024 that will close this issue
@mdelcambre
Copy link

mdelcambre commented May 21, 2024

As a workaround until uszipcode is updated, you can pin sqlalchemy-mate==2.0.0.0 (or before) to unblock your workflows.

@joyjitroy
Copy link

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

@mdelcambre
Copy link

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.

@MacHu-GWU
Copy link
Owner

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
Copy link

joyjitroy commented May 23, 2024 via email

@MacHu-GWU
Copy link
Owner

@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.

@joyjitroy
Copy link

joyjitroy commented May 23, 2024 via email

@Yossi
Copy link

Yossi commented Jun 7, 2024

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.

holdenk added a commit to totallylegitco/fighthealthinsurance that referenced this issue Jul 17, 2024
holdenk added a commit to totallylegitco/fighthealthinsurance that referenced this issue Jul 19, 2024
* Update TOS

* Update privacy policy, use absolute url to resolve to the remove data page.

* Add in missing load of absolute tag.

* Pin back MacHu-GWU/uszipcode-project#79
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants