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

remove unused __version__ from mock.py #17977

Merged
merged 1 commit into from Jan 13, 2020
Merged

remove unused __version__ from mock.py #17977

merged 1 commit into from Jan 13, 2020

Conversation

@cjw296
Copy link
Contributor

cjw296 commented Jan 13, 2020

This isn't included in __all__ and could be a source of confusion.

This isn't included in `__all__` and could be a source of confusion.
@cjw296

This comment has been minimized.

Copy link
Contributor Author

cjw296 commented Jan 13, 2020

@tirkarthi / @mariocj89 - can you see any problems with this?

@tirkarthi

This comment has been minimized.

Copy link
Contributor

tirkarthi commented Jan 13, 2020

My username in GitHub is @tirkarthi :) Regarding the __version__ value I think it's left as it is when mock was merged to stdlib in Python 3. There is an open issue around removing __version__ for standard library at https://bugs.python.org/issue31826 and there are several notes like library being maintained externally, decimal module having it for standard etc. There are many modules with similar value like argparse that were merged to stdlib. I don't think anyone is using __version__ for this change to be a breakage. I am +0 on this.

rg "__version__ =\s['\"]\d+." Lib | grep -v '/test/'
Lib/imaplib.py:__version__ = "2.58"
Lib/optparse.py:__version__ = "1.5.3"
Lib/cgi.py:__version__ = "2.6"
Lib/argparse.py:__version__ = '1.1'
Lib/unittest/mock.py:__version__ = '1.0'
Lib/tabnanny.py:__version__ = "6"
Lib/ipaddress.py:__version__ = '1.0'
Lib/socketserver.py:__version__ = "0.4"
Lib/re.py:__version__ = "2.2.1"
Lib/_pydecimal.py:__version__ = '1.70'    # Highest version of the spec this complies with
Lib/platform.py:__version__ = '1.0.8'
Lib/logging/__init__.py:__version__ = "0.5.1.2"
Lib/json/__init__.py:__version__ = '2.0.9'
Lib/http/server.py:__version__ = "0.6"
Lib/tkinter/font.py:__version__ = "0.9"
Lib/tkinter/ttk.py:__version__ = "0.3.1"
Lib/ctypes/__init__.py:__version__ = "1.1.0"
Lib/wsgiref/simple_server.py:__version__ = "0.2"
Lib/ctypes/macholib/__init__.py:__version__ = '1.0'
@cjw296 cjw296 requested a review from tirkarthi Jan 13, 2020
@cjw296

This comment has been minimized.

Copy link
Contributor Author

cjw296 commented Jan 13, 2020

Cool, I'm comfortable removing this as you're +0. It's now confusing because it clashes with the version that the backport needs to have for sensible release to pypi.

@cjw296 cjw296 merged commit 31d6de5 into master Jan 13, 2020
8 checks passed
8 checks passed
Windows (x86)
Details
Windows (x64)
Details
macOS
Details
Ubuntu
Details
Azure Pipelines PR #20200113.3 succeeded
Details
bedevere/issue-number Issue report skipped
bedevere/news "skip news" label found
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@cjw296 cjw296 deleted the cjw296-patch-1 branch Jan 13, 2020
@bedevere-bot

This comment has been minimized.

Copy link

bedevere-bot commented Jan 13, 2020

@cjw296: Please replace # with GH- in the commit message next time. Thanks!

sthagen added a commit to sthagen/cpython that referenced this pull request Jan 13, 2020
remove unused __version__ from mock.py (python#17977)
petdance added a commit to petdance/cpython that referenced this pull request Jan 17, 2020
This isn't included in `__all__` and could be a source of confusion.
petdance added a commit to petdance/cpython that referenced this pull request Jan 17, 2020
This isn't included in `__all__` and could be a source of confusion.
petdance added a commit to petdance/cpython that referenced this pull request Jan 17, 2020
This isn't included in `__all__` and could be a source of confusion.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.