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

QRegExp becomes QRegularExpression in PySide6 #288

Closed
wants to merge 1 commit into from

Conversation

stonebig
Copy link
Contributor

(used per guidata)

CAM-Gerlach
CAM-Gerlach previously approved these changes Nov 28, 2021
Copy link
Member

@CAM-Gerlach CAM-Gerlach left a comment

Choose a reason for hiding this comment

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

LGTM, thanks @stonebig !

@CAM-Gerlach
Copy link
Member

Related #233

@CAM-Gerlach
Copy link
Member

@stonebig Browsing winpython/winpython#1030 I see you mentioned the fix for guidata; will you be sending a PR for that as well?

Also, definitely looking forward to @impact27 's significant performance optimizations in 5.2.1; they only barely missed the cut for 5.2.0.

@CAM-Gerlach CAM-Gerlach requested a review from dalthviz November 28, 2021 18:42
@stonebig
Copy link
Contributor Author

To get guidata truly working on python-3.10 on pyside6-6.2.1 , I needed that simple fix and re-adding py3compat.py file.

Guidata has not yet dropped python-2.7, so this temporary gymnastic.

@kumattau
Copy link
Contributor

QRegularExpression is not compatible with QRegExp.

https://doc.qt.io/qt-5/qregularexpression.html#notes-for-qregexp-users

I think this mapping may cause a surprised error when a user application which use QRegExp runs with QT_API=pyside6.

@CAM-Gerlach CAM-Gerlach dismissed their stale review November 29, 2021 10:13

Seems it is incompatible with QRegExp

@CAM-Gerlach
Copy link
Member

CAM-Gerlach commented Nov 29, 2021

Thanks very much, @kumattau . @stonebig , given per the above docs QRegularExpression is supported in Qt5 (and Qt6), since QtPy 2.x will only officially support PyQt >=5.9 and PySide2 >= 5.12, if those versions support QRegularExpression, would it make sense to just support that with QtPy and update your dependent code accordingly (and maybe raise a DeprecationWarning/PythonQtWarning if using the deprecated methods, to nudge users to switch to ones compatible with all versions of Qt supported by their current QtPy version?) I'm not sure how else we could handle this, aside from patching the new version to try to emulate the API of the old, or with a set of wrapper functions/methods, etc.

@dalthviz
Copy link
Member

Hi @stonebig , checking this seems like guidata imports QRegExp but it doesn't use it. Here the line:

https://github.com/PierreRaybaut/guidata/blob/76e4bfdc08991b293ad32ec2786f7a7fbdfa9955/guidata/widgets/codeeditor.py#L58

Maybe then the QRegExp import could be removed and in that way prevent the error with QtPy 2.0.0.dev0? I'm not totally sure what could we do from the QtPy side but if you have any idea or suggestion let us know!

Also, thanks @kumattau and @CAM-Gerlach for taking the time to review this 👍

@stonebig
Copy link
Contributor Author

A yes, it seems just imported...

@stonebig
Copy link
Contributor Author

Will try to get guidata cleaned from that and py3compat.py, so.

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.

4 participants