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

Python3+PyQt4 QNetworkCookie problem #201

Closed
sebmos opened this issue Dec 11, 2014 · 1 comment
Closed

Python3+PyQt4 QNetworkCookie problem #201

sebmos opened this issue Dec 11, 2014 · 1 comment

Comments

@sebmos
Copy link

sebmos commented Dec 11, 2014

I'm using Ghost.py using Python 3 with PyQt4. It works perfectly, except for one detail:
When a QNetworkCookie is initialized, it converts the str object to a byte array, takes the string representation of that and puts it in a QByteArray object.

>>> from PyQt4 import QtNetwork
>>> c = QtNetwork.QNetworkCookie("cookie_name", "cookie_value")
>>> print(c.toRawForm())
b'cookie_name=cookie_value'
>>> print(repr(c.toRawForm()))
PyQt4.QtCore.QByteArray(b'cookie_name=cookie_value')```
>>> print(c.name())
b'cookie_name'
>>> print(repr(c.name()))
PyQt4.QtCore.QByteArray(b'cookie_name')

The same does not happen with PyQt4 on Python 2.7, or with PySide/Python 3.
I hope I'm doing something wrong and there's a way to work around that.
If not, here's a caveat for Python 3 support: Don't use it with PyQt4!

@EvaSDK
Copy link
Collaborator

EvaSDK commented Mar 2, 2018

It should have been fixed in commit ccaeb2f but if it's not the case, feel free to re-open.

@EvaSDK EvaSDK closed this as completed Mar 2, 2018
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

No branches or pull requests

2 participants