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

Remove usage of werkzeug.urls.url_encode #1911

Merged
merged 2 commits into from
Aug 28, 2023

Conversation

matrss
Copy link
Collaborator

@matrss matrss commented Aug 18, 2023

Replaces it with urllib.parse.urlencode. Fixes #1910.

@matrss matrss marked this pull request as draft August 18, 2023 14:16
@matrss
Copy link
Collaborator Author

matrss commented Aug 19, 2023

I don't get why this "AttributeError: module 'PyQt5.QtCore' has no attribute 'Slot'" is happening here, but not on develop. I did not change anything remotely related to that and PyQt5.QtCore simply does not have this attribute. See: https://stackoverflow.com/questions/50459672/attributeerror-module-pyqt5-qtcore-has-no-attribute-slot

Both CI runs report the same pyqt version though...

@matrss
Copy link
Collaborator Author

matrss commented Aug 19, 2023

OK, so it looks like the Slot attribute must be coming from

lib/python3.10/site-packages/matplotlib/backends/qt_compat.py
94:        QtCore.Slot = QtCore.pyqtSlot
106:        QtCore.Slot = QtCore.pyqtSlot

in the CI run on develop. I am not sure why that is used in develop but not in this PR pipeline though.

Anyway, I think we should change all occurrences of QtCore.Slot to QtCore.pyqtSlot.

@matrss
Copy link
Collaborator Author

matrss commented Aug 22, 2023

>>> werkzeug.urls.url_encode({"test": None})
''
>>> urllib.parse.urlencode({"test": None})
'test=None'

That's the difference causing our tests to fail.

@matrss matrss marked this pull request as ready for review August 22, 2023 15:39
Copy link
Member

@ReimarBauer ReimarBauer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see comment.

related to #1614

mslib/msui/mscolab_version_history.py Show resolved Hide resolved
@ReimarBauer
Copy link
Member

>>> werkzeug.urls.url_encode({"test": None})
''
>>> urllib.parse.urlencode({"test": None})
'test=None'

That's the difference causing our tests to fail.

Good catch !

Copy link
Member

@ReimarBauer ReimarBauer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thx

@ReimarBauer
Copy link
Member

@joernu76 when this is merged we need to patch our server

@ReimarBauer ReimarBauer merged commit 1327ede into Open-MSS:develop Aug 28, 2023
4 checks passed
@matrss matrss deleted the fix-werkzeug-deprecation branch February 16, 2024 09:51
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

Successfully merging this pull request may close these issues.

Fix DeprecationWarning from usage of werkzeug.urls.url_encode
2 participants