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 Python 3.8, SQLAlchemy 1.4 and MySQL 8 #1147

Merged
merged 7 commits into from
Jun 30, 2021

Conversation

tobias-urdin
Copy link
Contributor

@tobias-urdin tobias-urdin commented Jun 28, 2021

This PR fixes multiple issues.

  • Fix new flake8 lint issues that breaks CI (ignore H216 that enforces usage of builtin unittest.mock instead of mock)
  • Fix Python3.8 support by utf-8 decoding bytes to strings in Authorization header
  • Fix SQLAlchemy 1.4 support by not trying to modify immutable URL, use query(Model) when performing delete()
  • Fix MySQL 8 migration by modifying old revision to drop constraints before dropping any column
  • Unpin SQLALchemy completely

@tobias-urdin
Copy link
Contributor Author

@gnocchixyz/devs please verify.

@tobias-urdin
Copy link
Contributor Author

Fixes #1146

gnocchi/amqp1d.py Outdated Show resolved Hide resolved
jd
jd previously requested changes Jun 30, 2021
gnocchi/rest/auth_helper.py Outdated Show resolved Hide resolved
tox.ini Outdated Show resolved Hide resolved
@mergify mergify bot dismissed jd’s stale review June 30, 2021 12:55

Pull request has been modified.

gnocchi/rest/auth_helper.py Show resolved Hide resolved
setup.cfg Outdated Show resolved Hide resolved
@tobias-urdin tobias-urdin force-pushed the py38-sqla1.4 branch 2 times, most recently from 2f768a5 to fffb2b0 Compare June 30, 2021 13:21
Trying to alter drop a table that has a check constraint
is not allowed.
* Fix list_metrics in amqp1d not properly
  validating list/set is not empty.

* Dont set database or drivername on  the
  new immutable SQLAlchemy URL object.

* Validate values is not None before using.
We need to move to unittest.mock before enabling it.
jd
jd previously approved these changes Jun 30, 2021
@mergify mergify bot dismissed jd’s stale review June 30, 2021 13:23

Pull request has been modified.

@tobias-urdin tobias-urdin changed the title Fix SQLAlchemy 1.4 and Python 3.8 Fix Python 3.8, SQLAlchemy 1.4 and MySQL 8 Jun 30, 2021
@tobias-urdin tobias-urdin merged commit a5c82b1 into gnocchixyz:master Jun 30, 2021
@tobias-urdin tobias-urdin deleted the py38-sqla1.4 branch June 30, 2021 13:37
@tobias-urdin
Copy link
Contributor Author

@Mergifyio backport stable/4.4

@mergify
Copy link
Contributor

mergify bot commented Jun 30, 2021

Command backport stable/4.4: success

Backports have been created

tobias-urdin added a commit that referenced this pull request Jun 30, 2021
Fix Python 3.8, SQLAlchemy 1.4 and MySQL 8 (backport #1147)
tobias-urdin added a commit that referenced this pull request Jun 30, 2021
Fix Python 3.8, SQLAlchemy 1.4 and MySQL 8 (backport #1147) (backport #1151)
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

2 participants