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 cgi dependency from Client #195

Merged
merged 1 commit into from
Jan 1, 2024

Conversation

mdujava
Copy link
Member

@mdujava mdujava commented Dec 23, 2023

No description provided.

@mdujava mdujava force-pushed the remove_cgi branch 2 times, most recently from d0c1d24 to 7cc9447 Compare December 23, 2023 19:00
Copy link
Contributor

@p3ck p3ck left a 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)

@mdujava mdujava force-pushed the remove_cgi branch 3 times, most recently from 340dc5b to 0eb25e4 Compare December 26, 2023 23:52
@mdujava mdujava marked this pull request as ready for review December 28, 2023 22:18
@mdujava mdujava force-pushed the remove_cgi branch 2 times, most recently from 13d452a to 0eb25e4 Compare December 29, 2023 13:59
@mdujava
Copy link
Member Author

mdujava commented Dec 29, 2023

Problem is when defining subclass like class SensitiveUnicode(unicode):

But this is not problem with the removal of the cgi dependency. Not sure why MR introducing github action did pass.

@StykMartin
Copy link
Contributor

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.

@@ -100,7 +101,8 @@ def run(self):
self.finished.clear()


class SensitiveUnicode(unicode):
@python_2_unicode_compatible
class SensitiveUnicode():
Copy link
Collaborator

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 ?

Suggested change
class SensitiveUnicode():
class SensitiveUnicode(str):

Copy link
Collaborator

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 ☹️ So never mind.

Copy link
Member Author

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.

@mdujava mdujava force-pushed the remove_cgi branch 3 times, most recently from 759e682 to 54836eb Compare December 29, 2023 21:53
@mdujava
Copy link
Member Author

mdujava commented Dec 29, 2023

/packit build

@StykMartin StykMartin merged commit 0f6a798 into beaker-project:release-29 Jan 1, 2024
13 checks passed
@mdujava mdujava deleted the remove_cgi branch September 26, 2024 18:08
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