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

add_to_dict(): Fix mapping of to_dict() #325

Merged
merged 3 commits into from
Dec 10, 2023
Merged

add_to_dict(): Fix mapping of to_dict() #325

merged 3 commits into from
Dec 10, 2023

Conversation

tony
Copy link
Member

@tony tony commented Dec 10, 2023

Extracted from #322

unihan-db-tpeMWywt-py3.12/lib/python3.12/site-packages/sqlalchemy/event/registry.py:291: in listen
    dispatch_collection = getattr(target.dispatch, identifier)
E   AttributeError: 'registry' object has no attribute 'dispatch'

See also: https://docs.sqlalchemy.org/en/20/orm/events.html#sqlalchemy.orm.MapperEvents.after_configured

Copy link

codecov bot commented Dec 10, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (5f90cea) 69.21% compared to head (1a52329) 69.77%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #325      +/-   ##
==========================================
+ Coverage   69.21%   69.77%   +0.55%     
==========================================
  Files           9        9              
  Lines         653      655       +2     
  Branches       87       88       +1     
==========================================
+ Hits          452      457       +5     
+ Misses        195      192       -3     
  Partials        6        6              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@tony tony marked this pull request as ready for review December 10, 2023 13:44
src/unihan_db/bootstrap.py Outdated Show resolved Hide resolved
@tony
Copy link
Member Author

tony commented Dec 10, 2023

Note: The current iteration raises this issue: https://github.com/cihai/unihan-db/pull/325/files#r1421758684

unihan-db-tpeMWywt-py3.12/lib/python3.12/site-packages/sqlalchemy/event/registry.py:291: in listen
    dispatch_collection = getattr(target.dispatch, identifier)
E   AttributeError: 'registry' object has no attribute 'dispatch'

See also: https://docs.sqlalchemy.org/en/20/orm/events.html#sqlalchemy.orm.MapperEvents.after_configured

!squash
@tony tony merged commit b7d1c84 into master Dec 10, 2023
9 checks passed
@tony tony changed the title add_to_dict(): Move to Mapper add_to_dict(): Fix mapping of to_dict() Dec 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant