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

ExtendedBase is missing #5

Closed
jhanley634 opened this issue May 21, 2024 · 2 comments
Closed

ExtendedBase is missing #5

jhanley634 opened this issue May 21, 2024 · 2 comments

Comments

@jhanley634
Copy link

Upon updating to 2.0.0.0.1 I started seeing this diagnostic:

$ python -c 'from uszipcode import SearchEngine'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/Users/jhanley/miniconda3/envs/problems/lib/python3.12/site-packages/uszipcode/__init__.py", line 21, in <module>
    from .search import (
  File "/Users/jhanley/miniconda3/envs/problems/lib/python3.12/site-packages/uszipcode/search.py", line 26, in <module>
    from .model import ZipcodeTypeEnum, SimpleZipcode, ComprehensiveZipcode
  File "/Users/jhanley/miniconda3/envs/problems/lib/python3.12/site-packages/uszipcode/model.py", line 30, in <module>
    class AbstractSimpleZipcode(Base, sam.ExtendedBase):
                                      ^^^^^^^^^^^^^^^^
AttributeError: module 'sqlalchemy_mate' has no attribute 'ExtendedBase'

I am using cPython 3.12.3 with uszipcode 1.0.1 and SQLAlchemy 2.0.30.

Downgrading immediately fixes the problem:

$ pip install 'sqlalchemy_mate < 2.0.0.1'
Collecting sqlalchemy_mate<2.0.0.1
  Downloading sqlalchemy_mate-2.0.0.0-py3-none-any.whl.metadata (11 kB)
Requirement already satisfied: sqlalchemy<3.0.0,>=2.0.0 in /Users/jhanley/miniconda3/envs/problems/lib/python3.12/site-packages (from sqlalchemy_mate<2.0.0.1) (2.0.30)
Requirement already satisfied: prettytable<4.0.0,>=3.0.0 in /Users/jhanley/miniconda3/envs/problems/lib/python3.12/site-packages (from sqlalchemy_mate<2.0.0.1) (3.10.0)
Requirement already satisfied: wcwidth in /Users/jhanley/miniconda3/envs/problems/lib/python3.12/site-packages (from prettytable<4.0.0,>=3.0.0->sqlalchemy_mate<2.0.0.1) (0.2.13)
Requirement already satisfied: typing-extensions>=4.6.0 in /Users/jhanley/miniconda3/envs/problems/lib/python3.12/site-packages (from sqlalchemy<3.0.0,>=2.0.0->sqlalchemy_mate<2.0.0.1) (4.11.0)
Requirement already satisfied: greenlet!=0.4.17 in /Users/jhanley/miniconda3/envs/problems/lib/python3.12/site-packages (from sqlalchemy<3.0.0,>=2.0.0->sqlalchemy_mate<2.0.0.1) (3.0.3)
Downloading sqlalchemy_mate-2.0.0.0-py3-none-any.whl (36 kB)
Installing collected packages: sqlalchemy_mate
  Attempting uninstall: sqlalchemy_mate
    Found existing installation: sqlalchemy_mate 2.0.0.1
    Uninstalling sqlalchemy_mate-2.0.0.1:
      Successfully uninstalled sqlalchemy_mate-2.0.0.1
Successfully installed sqlalchemy_mate-2.0.0.0
$
$ python -c 'from uszipcode import SearchEngine'
$
@mdelcambre
Copy link

This was an intentional breaking change.
https://github.com/MacHu-GWU/sqlalchemy_mate-project/blob/master/release-history.rst#2001-2024-05-17

uszipcode has an unpinned dependency so is picking up the new version and breaking. Unfortunately, that library hasn't been updated for the new api yet. In the meantime, I recommend just pinning sqlalchemy_mate to an earlier version.

@jhanley634
Copy link
Author

jhanley634 commented May 21, 2024

It appears I tried to pin blame on the wrong component, and the bug should be logged against the uszipcode package. This issue #5 can be closed out with WONTFIX.

Some very nice code improvements are available in uszipcode PR 81, awaiting maintainer approval for merge / pypi release.

@jhanley634 jhanley634 closed this as not planned Won't fix, can't repro, duplicate, stale May 21, 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

No branches or pull requests

2 participants