Skip to content

Commit

Permalink
incremental
Browse files Browse the repository at this point in the history
  • Loading branch information
hawkowl committed Mar 31, 2018
1 parent f778c0e commit fa80058
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/twisted/_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@

from incremental import Version

__version__ = Version('Twisted', 17, 9, 1, dev=0)
__version__ = Version('Twisted', 18, 4, 0, release_candidate=1)
__all__ = ["__version__"]
2 changes: 1 addition & 1 deletion src/twisted/web/http.py
Original file line number Diff line number Diff line change
Expand Up @@ -1558,7 +1558,7 @@ def __hash__(self):


Request.getClientIP = deprecated(
Version("Twisted", "NEXT", 0, 0),
Version('Twisted', 18, 4, 0, release_candidate=1),
replacement="getClientAddress",
)(Request.getClientIP)

Expand Down
4 changes: 2 additions & 2 deletions src/twisted/web/tap.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def opt_port(self, port):
Strports description of port to start the server on
"""
msg = deprecate.getDeprecationWarningString(
self.opt_port, incremental.Version("Twisted", "NEXT", 0, 0))
self.opt_port, incremental.Version('Twisted', 18, 4, 0, release_candidate=1))
warnings.warn(msg, category=DeprecationWarning, stacklevel=2)
self['port'] = port

Expand All @@ -87,7 +87,7 @@ def opt_https(self, port):
Port to listen on for Secure HTTP.
"""
msg = deprecate.getDeprecationWarningString(
self.opt_https, incremental.Version("Twisted", "NEXT", 0, 0))
self.opt_https, incremental.Version('Twisted', 18, 4, 0, release_candidate=1))
warnings.warn(msg, category=DeprecationWarning, stacklevel=2)
self['https'] = port

Expand Down
4 changes: 2 additions & 2 deletions src/twisted/web/test/requesthelper.py
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,7 @@ def redirect(self, url):


DummyRequest.getClientIP = deprecated(
Version("Twisted", "NEXT", 0, 0),
Version('Twisted', 18, 4, 0, release_candidate=1),
replacement="getClientAddress",
)(DummyRequest.getClientIP)

Expand Down Expand Up @@ -434,7 +434,7 @@ def test_getClientIPDeprecated(self):
self.assertEqual(
warning.get("message"),
("twisted.web.test.requesthelper.DummyRequest.getClientIP "
"was deprecated in Twisted NEXT; "
"was deprecated in Twisted 18.4.0rc1; "
"please use getClientAddress instead"),
)

Expand Down
2 changes: 1 addition & 1 deletion src/twisted/web/test/test_http.py
Original file line number Diff line number Diff line change
Expand Up @@ -3408,7 +3408,7 @@ def test_getClientIP(self):
"category": DeprecationWarning,
"message": (
"twisted.web.http.Request.getClientIP was deprecated "
"in Twisted NEXT; please use getClientAddress instead")},
"in Twisted 18.4.0rc1; please use getClientAddress instead")},
sub(["category", "message"], warnings[0]))


Expand Down

0 comments on commit fa80058

Please sign in to comment.