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 importlib_metadata.__version__. - [merged] #248

Closed
jaraco opened this issue Oct 22, 2020 · 7 comments
Closed

Remove importlib_metadata.__version__. - [merged] #248

jaraco opened this issue Oct 22, 2020 · 7 comments

Comments

@jaraco
Copy link
Member

jaraco commented Oct 22, 2020

In GitLab by @jaraco on Jun 14, 2020, 16:58

Merges bugfix/remove-dunder-version -> master

As discussed in importlib_resources#100, there's little value in exposing a __version__, despite PEP 396 recommending one.

What do you think, Barry? Are we on the cusp of a post-PEP-396 world? Should we create a new pep to supersede 396 that recommends against __version__ and recommends instead that packages not present a __version__ if they are part of a distribution package (i.e. have metadata)?

@jaraco
Copy link
Member Author

jaraco commented Oct 22, 2020

In GitLab by @jaraco on Jun 14, 2020, 17:02

added 1 commit

Compare with previous version

@jaraco
Copy link
Member Author

jaraco commented Oct 22, 2020

In GitLab by @codecov on Jun 14, 2020, 17:08

Codecov Report

Merging #125 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##            master      #125   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            2         2           
  Lines          282       281    -1     
  Branches        21        21           
=========================================
- Hits           282       281    -1     
Impacted Files Coverage Δ
importlib_metadata/__init__.py 100.00% <ø> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3610d14...af471bc. Read the comment docs.

@jaraco
Copy link
Member Author

jaraco commented Oct 22, 2020

In GitLab by @warsaw on Jun 15, 2020, 24:40

We might be! Have you seen this blog post by Brett?

It's true that module version numbers have weird semantics for standalone packages of stdlib libraries. IIRC the standalone email package ditched its version numbers (at least inside the stdlib) years after inclusion.

It's also true that __version__ has just been a total PITA to maintain because it usually means editing more than one file to bump a version number, or elaborate and problematic mechanisms to automatically assign them or sync them from some other file.

I do think it's better in the long run to promote package metadata and using these APIs to get at the version numbers, so +1 if you want to remove them here!

@jaraco
Copy link
Member Author

jaraco commented Oct 22, 2020

In GitLab by @jaraco on Jun 26, 2020, 22:42

approved this merge request

@jaraco
Copy link
Member Author

jaraco commented Oct 22, 2020

In GitLab by @jaraco on Jun 26, 2020, 22:42

mentioned in commit a274bcc

@jaraco
Copy link
Member Author

jaraco commented Oct 22, 2020

In GitLab by @jaraco on Jun 26, 2020, 22:42

merged

@jaraco
Copy link
Member Author

jaraco commented Oct 22, 2020

In GitLab by @nzbuu on Oct 22, 2020, 14:30

This seems like as good a place as any to ask, but it might not be.

@warsaw, given what you said here, should PEP 396 be "withdrawn" rather than "deferred"?

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

No branches or pull requests

1 participant