-
Notifications
You must be signed in to change notification settings - Fork 43
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 cgi dependency from Client #195
Conversation
d0c1d24
to
7cc9447
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we will need the following to make it happy on both python2 and python3
# Fix Python 2.x.
try:
UNICODE_EXISTS = bool(type(unicode))
except NameError:
unicode = lambda s: str(s)
340dc5b
to
0eb25e4
Compare
13d452a
to
0eb25e4
Compare
Problem is when defining subclass like But this is not problem with the removal of the cgi dependency. Not sure why MR introducing github action did pass. |
This is the first reference to the Python 3 codebase (common->client). All other uses of bkr.common.helpers were in labcontroller and server. This is why we never caught this problem. |
Common/bkr/common/helpers.py
Outdated
@@ -100,7 +101,8 @@ def run(self): | |||
self.finished.clear() | |||
|
|||
|
|||
class SensitiveUnicode(unicode): | |||
@python_2_unicode_compatible | |||
class SensitiveUnicode(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be derived from str
?
class SensitiveUnicode(): | |
class SensitiveUnicode(str): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually that doesn't change the error
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did not find a way how to make it compatible, so I put it into separate file for now.
759e682
to
54836eb
Compare
/packit build |
No description provided.