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

Allow specifying encodings #239

Merged
merged 2 commits into from Dec 5, 2018
Merged

Allow specifying encodings #239

merged 2 commits into from Dec 5, 2018

Conversation

@flying-sheep
Copy link
Contributor

flying-sheep commented Dec 5, 2018

This e.g. allows using future-fstrings, which I’d like to use in flying-sheep/get_version#3

You can check that this works via:

#!/usr/bin/env python3.5
import ast
st = ast.parse(b"# coding: future-fstrings\nprint(f'hi {ast}')")
exec(compile(st, filename="", mode="exec"))
# hi <module 'ast' from '/usr/lib64/python3.5/ast.py'>
This e.g. allows using [future-fstrings](https://github.com/asottile/future-fstrings)
@takluyver

This comment has been minimized.

Copy link
Owner

takluyver commented Dec 5, 2018

The Path.read_bytes() method was new in 3.5, so there's a test failure on 3.4. However, I think we can move the minimum supported version to 3.5 at this point.

@flying-sheep

This comment has been minimized.

Copy link
Contributor Author

flying-sheep commented Dec 5, 2018

well, or we can open the file in binary mode. as you wish.

@takluyver

This comment has been minimized.

Copy link
Owner

takluyver commented Dec 5, 2018

I'm OK with dropping 3.4, but I don't feel a strong need to, so since you've made it work with 3.4...

@takluyver takluyver merged commit 9691171 into takluyver:master Dec 5, 2018
2 checks passed
2 checks passed
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@flying-sheep flying-sheep deleted the flying-sheep:patch-1 branch Dec 5, 2018
@flying-sheep

This comment has been minimized.

Copy link
Contributor Author

flying-sheep commented Dec 5, 2018

Great, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.