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

Fix some random unicode problems #609

Merged
merged 5 commits into from
Dec 18, 2019
Merged

Conversation

mdellweg
Copy link
Member

@mdellweg mdellweg commented Nov 21, 2019

Fixes: #608

@evgeni
Copy link
Member

evgeni commented Nov 22, 2019

looking at other modules in ansible/ansible, it seems that's the right-ish way to do it.

we also should replace all str(e) with to_native(e) so that our exceptions are proper too

@evgeni
Copy link
Member

evgeni commented Nov 22, 2019

and reading files should be to_bytes on the filename too.

@mdellweg
Copy link
Member Author

Yet still, this does not work everywhere, and i cannot really pin it down.

@evgeni evgeni added the triaged label Nov 22, 2019
@@ -14,6 +14,7 @@
from functools import wraps

from ansible.module_utils.basic import AnsibleModule
from ansible.module_utils._text import to_bytes
Copy link
Member Author

Choose a reason for hiding this comment

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

Is this meant seriously? I need a private interface to do the simple things in 'the right way'?

@mdellweg mdellweg changed the title Fix passwords with non-ASCII characters Fix some random unicode problems Nov 25, 2019
@mdellweg mdellweg marked this pull request as ready for review November 25, 2019 15:18
@mdellweg
Copy link
Member Author

Not entirely convinced here... But this is the best i could come up with.
If this does not look right as a whole, please consider the individual commits.

@evgeni evgeni self-assigned this Nov 26, 2019
@mdellweg mdellweg added this to the unicode support milestone Dec 2, 2019
@evgeni evgeni mentioned this pull request Dec 17, 2019
8 tasks
@evgeni
Copy link
Member

evgeni commented Dec 17, 2019

@mdellweg shall this be squashed or rebased?

@mdellweg
Copy link
Member Author

It can be merged. The commits were only separate in case we only wanted them selectively.

@evgeni evgeni merged commit 6c5efb6 into theforeman:master Dec 18, 2019
@mdellweg mdellweg deleted the unicode_fixes branch January 2, 2020 15:40
@m-bucher
Copy link
Contributor

m-bucher commented Jan 3, 2020

I believe https://github.com/psf/requests/pull/3673/files also plays a part in this.
Without this fix I did not manage to get it running

@evgeni
Copy link
Member

evgeni commented Jan 3, 2020

Probably. Seems to be part of requests v2.12.2.

@evgeni evgeni mentioned this pull request Apr 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Several unicode problems all around
3 participants