Rename PIL.version to PIL._version and remove it from module#3083
Merged
homm merged 1 commit intopython-pillow:masterfrom Apr 11, 2018
Merged
Rename PIL.version to PIL._version and remove it from module#3083homm merged 1 commit intopython-pillow:masterfrom
homm merged 1 commit intopython-pillow:masterfrom
Conversation
Member
|
I get a slightly different result for the first import: Python 3.6.4 (default, Mar 1 2018, 18:36:50)
[GCC 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.39.2)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from PIL import _version
>>> _version.__version__
'5.2.0.dev0'
>>> import PIL
>>> PIL._version
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: module 'PIL' has no attribute '_version' |
Member
Author
|
Hmm, looks like python 2 vs 3 difference. Anyway, |
Member
|
@wiredfool will be the one to convince here, probably. I definitely don't care … assuming we are moving from "really confusing" to "less or confusing" or even better "no confusion anymore". |
Member
|
Whatever. Don't break the single version in c & python, and don't break the world by removing the PIL 1.1.7 version until we do a major release. |
Member
Author
Check
Check |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Partially fixes #3082.
It is really confusing for people to find three different constants in PIL module:
VERSION,PILLOW_VERSION,__version__andversion. WhileVERSIONis here for historical reasons and does matter,versionis module is not required to end user at all. My suggestion is to hide it from users by removing from namespace: