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 loading scripts with non-UTF-8 encodings. #77

Merged
merged 1 commit into from
May 26, 2023

Conversation

HexDecimal
Copy link
Collaborator

I noticed an issue with the in-process script loader where some scripts would fail to load with encoding errors.

Instead of assuming that a script is UTF-8, a bytes string can be passed to compile() which will detect the encoding automatically.

I noticed an issue in the in-process script loader where some scripts
would fail to load with encoding errors.

Instead of assuming that a script is UTF-8, a bytes string can be passed
to `compile()` which will detect the encoding automatically.
@HexDecimal HexDecimal requested a review from kvas-it May 24, 2023 11:46
@codecov
Copy link

codecov bot commented May 24, 2023

Codecov Report

Merging #77 (64de3c5) into master (db5bf30) will decrease coverage by 0.01%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master      #77      +/-   ##
==========================================
- Coverage   99.53%   99.53%   -0.01%     
==========================================
  Files           1        1              
  Lines         214      213       -1     
==========================================
- Hits          213      212       -1     
  Misses          1        1              
Impacted Files Coverage Δ
pytest_console_scripts/__init__.py 99.53% <100.00%> (-0.01%) ⬇️

@kvas-it kvas-it merged commit 6bc9212 into kvas-it:master May 26, 2023
@HexDecimal HexDecimal deleted the script-codecs branch May 26, 2023 13:49
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.

2 participants