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

Replace pkg_resources with importlib.metadata #1674

Merged
merged 8 commits into from
Dec 20, 2021
Merged

Conversation

michaelgrund
Copy link
Member

Description of proposed changes

Address #1672

If I understood it correctly this PR should not be merged before we drop Python 3.7 suppoort next week on Dec. 26, 2021.

Reminders

  • Run make format and make check to make sure the code follows the style guide.
  • Add tests for new features or tests that would have caught the bug that you're fixing.
  • Add new public functions/methods/classes to doc/api/index.rst.
  • Write detailed docstrings for all functions/methods.
  • If wrapping a new module, open a 'Wrap new GMT module' issue and submit reasonably-sized PRs.
  • If adding new functionality, add an example to docstrings or tutorials.

Slash Commands

You can write slash commands (/command) in the first line of a comment to perform
specific operations. Supported slash commands are:

  • /format: automatically format and lint the code
  • /test-gmt-dev: run full tests on the latest GMT development version

Address #1672 

If I understood it correctly this PR should not be merged before we drop Python 3.7 suppoort next week on Dec. 26, 2021.
@michaelgrund michaelgrund added the maintenance Boring but important stuff for the core devs label Dec 19, 2021
@michaelgrund michaelgrund added this to the 0.6.0 milestone Dec 19, 2021
@michaelgrund michaelgrund marked this pull request as draft December 19, 2021 11:56
@seisman
Copy link
Member

seisman commented Dec 19, 2021

If I understood it correctly this PR should not be merged before we drop Python 3.7 suppoort next week on Dec. 26, 2021.

Yes, do you want to open two PRs dropping supports of old Python and NumPy versions.

@michaelgrund michaelgrund marked this pull request as ready for review December 20, 2021 12:37
pygmt/__init__.py Outdated Show resolved Hide resolved
Damn missed that. Thanks @seisman.

Co-authored-by: TIAN Dongdong <[email protected]>
pygmt/__init__.py Outdated Show resolved Hide resolved
pygmt/__init__.py Outdated Show resolved Hide resolved
pygmt/__init__.py Outdated Show resolved Hide resolved
pygmt/__init__.py Outdated Show resolved Hide resolved
@seisman seisman added the final review call This PR requires final review and approval from a second reviewer label Dec 20, 2021
Copy link
Member

@weiji14 weiji14 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

@weiji14 weiji14 merged commit 1e10b03 into main Dec 20, 2021
@weiji14 weiji14 deleted the repl-pkg-resources branch December 20, 2021 21:44
@weiji14 weiji14 linked an issue Dec 20, 2021 that may be closed by this pull request
@seisman seisman removed the final review call This PR requires final review and approval from a second reviewer label Dec 21, 2021
sixy6e pushed a commit to sixy6e/pygmt that referenced this pull request Dec 21, 2022
Use `importlib.metadata` from the standard library
(added in Python 3.8) to retrieve the package version
at runtime. A bit faster than using the `pkg_resources`
which adds some overhead and sets a runtime
dependency on `setuptools`.

* rename version variables in __init__.py

Co-authored-by: TIAN Dongdong <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance Boring but important stuff for the core devs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Replace pkg_resources with importlib.metadata
3 participants