-
Notifications
You must be signed in to change notification settings - Fork 122
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Remove incremental * Add news fragment * Update tutorial for accuracy around detecting versions * review findings and fixes * review findings * revert RELEASE.rst * fix rtd build * Update src/towncrier/test/test_project.py * fix coverage gaps * fix coverage gap * update RELEASE.rst * Use 19.9.0 as an example to demonstrate how zero padding is used --------- Co-authored-by: Chris Beaven <smileychris@gmail.com> Co-authored-by: Hynek Schlawack <hs@ox.cx> Co-authored-by: Adi Roiban <adiroiban@gmail.com>
- Loading branch information
1 parent
4b58be5
commit 0fa7b48
Showing
12 changed files
with
122 additions
and
138 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file was deleted.
Oops, something went wrong.
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
Remove incremental dependency from towncrier. | ||
|
||
Towncrier can still read incremental versions, it just doesn't rely on the package itself any more. |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,26 @@ | ||
# Copyright (c) Amber Brown, 2015 | ||
# See LICENSE for details. | ||
|
||
from incremental import Version | ||
from twisted.trial.unittest import TestCase | ||
|
||
from towncrier._version import _hatchling_version | ||
import towncrier | ||
|
||
|
||
class TestPackaging(TestCase): | ||
def test_version_warning(self): | ||
def test_version_attr(self): | ||
""" | ||
Import __version__ from towncrier returns an Incremental version object | ||
and raises a warning. | ||
towncrier.__version__ was deprecated, but still exists for now. | ||
""" | ||
with self.assertWarnsRegex( | ||
DeprecationWarning, "Accessing towncrier.__version__ is deprecated.*" | ||
): | ||
from towncrier import __version__ | ||
|
||
self.assertIsInstance(__version__, Version) | ||
self.assertEqual(_hatchling_version, __version__.short()) | ||
def access__version(): | ||
return towncrier.__version__ | ||
|
||
expected_warning = ( | ||
"Accessing towncrier.__version__ is deprecated and will be " | ||
"removed in a future release. Use importlib.metadata directly " | ||
"to query for towncrier's packaging metadata." | ||
) | ||
|
||
self.assertWarns( | ||
DeprecationWarning, expected_warning, __file__, access__version | ||
) |
Oops, something went wrong.