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

Fix tests with latest dependencies #2332

Closed
wants to merge 11 commits into from
Closed

Conversation

cjmayo
Copy link
Contributor

@cjmayo cjmayo commented Feb 4, 2023

The commits tested with latest dependencies in #2328.

@cjmayo
Copy link
Contributor Author

cjmayo commented Oct 16, 2023

Rebased on master as a couple of the changes have been merged from other PRs.

Tests of current master are passing in GitHub Actions because the latest versions of some dependencies are not being used , #2327 is an attempt to fix that (plus test the minimum requirements). The commits in this PR are to get the tests working with the latest versions of dependencies. #2328 was to illustrate that this PR works.

@cjmayo cjmayo mentioned this pull request Oct 16, 2023
@cjmayo cjmayo force-pushed the fixtests branch 2 times, most recently from c05029a to bd49ad2 Compare October 19, 2023 18:48
@cjmayo cjmayo marked this pull request as draft October 20, 2023 16:47
dgilman and others added 11 commits October 20, 2023 19:21
"AssertionError: The setup method 'register_blueprint' can no longer be called on the application. It has already handled its first request, any changes will not be applied consistently. Make sure all imports, decorators, functions, etc. needed to set up the application are done before running it."
FAILED tests/test_model.py::test_export_csv - AssertionError: assert 'Col1,Col2\r\..._3,col2_3\r\n' == 'Col1,Col2\r\...,–utf8_2–\r\n'
sqlalchemy.exc.UnboundExecutionError: Bind key 'other' is not in 'SQLALCHEMY_BINDS' config.
 >       assert model.test == ''
 E       AssertionError: assert None == ''
 E        +  where None = <Model test

WTForms 3 changed StringField data default value.
 >           db.engine.execute('CREATE EXTENSION IF NOT EXISTS citext')
 E           AttributeError: 'Engine' object has no attribute 'execute'
SQLAlchemy 2.0.2 removed the invocation of registry.configure() from
Mapper.iterate_properties causing this problem.

sqlalchemy.orm.registry.configure() was added in 1.4.0b2.

Observed as test failures in:

flask_admin/tests/sqla/test_basic.py
flask_admin/tests/sqla/test_form_rules.py
flask_admin/tests/sqla/test_inlineform.py
LegacyAPIWarning: The Query.get() method is considered legacy as of the
1.x series of SQLAlchemy and becomes a legacy construct in 2.0.
The method is now available as Session.get() (deprecated since: 2.0)
@cjmayo
Copy link
Contributor Author

cjmayo commented Oct 29, 2023

Is #2398 better than aee829a here? See also #2357.

@samuelhwilliams
Copy link
Contributor

I am going to close this as outdated as we've just updated the testing framework for flask-admin after it was incorporated into the pallets-eco project.

I do think we need to address the testing situation to have better variant testing on some key dependencies, however that may be best to look at from a fresh slate now. Please don't take this as discouragement from helping tighten this up, but as this PR is fairly stale now I think a reboot would be best.

@cjmayo cjmayo deleted the fixtests branch July 25, 2024 18:46
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 9, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants