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

Custom Deprecation Warning classes. #1545

Merged
merged 4 commits into from Oct 29, 2018

Conversation

4 participants
@robinjhuang
Contributor

robinjhuang commented Oct 27, 2018

Added custom deprecation warning classes because DeprecationWarning is not visible unless the user opts in.

Closes Issue #159

@robinjhuang robinjhuang changed the title from Added Custom Deprecation Warning classes. to Custom Deprecation Warning classes. Oct 27, 2018

@robinjhuang

This comment has been minimized.

Contributor

robinjhuang commented Oct 27, 2018

Added unit tests, so the previous code coverage issue should be resolved now. Let us know if you want anything else changed :)

@martonp and I are interested in Python events in New York. Please let us know about future events. We had a lot of fun at this hackathon.

Our emails:
marci93@gmail.com
robin.j.huang@gmail.com

CHANGES.rst Outdated
@@ -1,6 +1,13 @@
v40.5.0
-------
* #1545: Added custom deprecation warning classes because DeprecationWarning is not visible unless the user opts in.

This comment has been minimized.

@jaraco

jaraco Oct 28, 2018

Member

There's a better way to add changelog entries. Please see these docs on how to use towncrier to author changelog entries.

This comment has been minimized.

@robinjhuang

robinjhuang Oct 28, 2018

Contributor

Thanks Jason. I'm a bit confused, should we be commiting the news fragment file? Or should we run towncrier to add the changes to the CHANGES.rst?

This comment has been minimized.

@benoit-pierre

benoit-pierre Oct 28, 2018

Member

Commit the news fragment: one of the reasons for using towncrier is to avoid merge conflicts in CHANGES.rst.

This comment has been minimized.

@robinjhuang

robinjhuang Oct 28, 2018

Contributor

Ohhhh I see. Let me change that. Thank you!

Show resolved Hide resolved setuptools/setup_tools_deprecation_warning.py Outdated

@robinjhuang robinjhuang force-pushed the robinjhuang:custom-deprecation-warnings branch from 71abc91 to 67124b3 Oct 28, 2018

@pganssle pganssle force-pushed the robinjhuang:custom-deprecation-warnings branch 4 times, most recently from 5c795d0 to d3b9c97 Oct 28, 2018

Junhan Huang and others added some commits Oct 27, 2018

Add custom deprecation warning classes
`DeprecationWarning` is not visible by default in the latest versions of
CPython, so this switches the deprecation warnings in setuptools and
pkg_resources over to custom classes derived from `Warning` instead.

Fixes issue github issue #159

Co-authored-by: Junhan Huang <robin.j.huang@gmail.com>
Co-authored-by: Marton Pono <marci93@gmail.com>
Add unit tests for setuptools deprecation warnings
These are tests to ensure that the specified deprecation warnings are
raised when the functions are called.

Co-authored-by: Junhan Huang <robin.j.huang@gmail.com>
Co-authored-by: Marton Pono <marci93@gmail.com>

@pganssle pganssle force-pushed the robinjhuang:custom-deprecation-warnings branch from d3b9c97 to 3a9dc2b Oct 28, 2018

@pganssle

I have tweaked some of the details of this implementation and cleaned up the git commit history a bit, so it's ready to merge.

@pganssle pganssle moved this from Submitted PRs to Approved PRs in PyPA Sprint Weekend at Bloomberg (2018) Oct 28, 2018

@pganssle pganssle merged commit 566f3aa into pypa:master Oct 29, 2018

5 checks passed

codecov/patch 100% of diff hit (target 81.45%)
Details
codecov/project 81.63% (+0.18%) compared to 29f9cb0
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
deploy/netlify Deploy preview ready!
Details

PyPA Sprint Weekend at Bloomberg (2018) automation moved this from Approved PRs to Merged PRs Oct 29, 2018

@pganssle pganssle referenced this pull request Nov 11, 2018

Closed

Cutting a new release #1585

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