Skip to content

Fix loading scripts with non-UTF-8 encodings.#77

Merged
kvas-it merged 1 commit intokvas-it:masterfrom
HexDecimal:script-codecs
May 26, 2023
Merged

Fix loading scripts with non-UTF-8 encodings.#77
kvas-it merged 1 commit intokvas-it:masterfrom
HexDecimal:script-codecs

Conversation

@HexDecimal
Copy link
Copy Markdown
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
Copy Markdown

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