getpelican / feedgenerator

Standalone version of Django's feedgenerator module
BSD 3-Clause "New" or "Revised" License
52 stars 23 forks source link

Replace non-ASCII character in README #18

Closed neirbowj closed 3 years ago

neirbowj commented 4 years ago

This patch enables running setup.py in environments in which locale.getpreferredencoding(False) returns 'ASCII' or any ASCII-compatible encoding.

Fixes #19

justinmayer commented 4 years ago

While I think the word "gratuitous" here is unnecessarily judgmental, I'm happy to entertain a more detailed description of the types of environments where the proper apostrophe poses a problem, as well as a more detailed description of what said problem is.

neirbowj commented 4 years ago

Thank you for that feedback. I have removed the objectionable word and will open a corresponding bug report to which this PR could become a candidate resolution.

neirbowj commented 4 years ago

An arguably superior alternative, which some other projects have adopted, would be to explicitly pass the encoding parameter to open. To retain backward compatibility with Python 2, it has to be passed conditionally, e.g. via **kwargs.

avaris commented 4 years ago

An arguably superior alternative, which some other projects have adopted, would be to explicitly pass the encoding parameter to open.

Yes, let's do that please.

To retain backward compatibility with Python 2, it has to be passed conditionally, e.g. via **kwargs.

from io import open

then you can use encoding in both python2 and python3

neirbowj commented 4 years ago

@avaris Great tip! See competing PR in #20.

justinmayer commented 3 years ago

Closing in favor of #20, which has been merged.