Skip to content

Commit

Permalink
Bump version to 21.2.0-rc1
Browse files Browse the repository at this point in the history
  • Loading branch information
rodrigc committed Feb 15, 2021
1 parent 19cc056 commit c21dbc9
Show file tree
Hide file tree
Showing 15 changed files with 43 additions and 43 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", 20, 3, 0, dev=0)
__version__ = Version("Twisted", 21, 2, 0, release_candidate=1)
__all__ = ["__version__"]
2 changes: 1 addition & 1 deletion src/twisted/cred/credentials.py
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,7 @@ def checkPassword(self, password):
class UsernameHashedPassword:

deprecatedModuleAttribute(
Version("Twisted", "NEXT", 0, 0),
Version("Twisted", 21, 2, 0),
"Use twisted.cred.credentials.UsernamePassword instead.",
"twisted.cred.credentials",
"UsernameHashedPassword",
Expand Down
2 changes: 1 addition & 1 deletion src/twisted/cred/test/test_cred.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@


# The Twisted version in which UsernameHashedPassword is first deprecated.
_uhpVersion = Version("Twisted", "NEXT", 0, 0)
_uhpVersion = Version("Twisted", 21, 2, 0)


class ITestable(Interface):
Expand Down
2 changes: 1 addition & 1 deletion src/twisted/internet/defer.py
Original file line number Diff line number Diff line change
Expand Up @@ -889,7 +889,7 @@ def main(reactor):
react(main)
@since: Twisted NEXT
@since: Twisted 21.2.0
@param coro: The coroutine object to schedule.
@type coro: A Python 3.5+ C{async def} coroutine or a Python 3.4+
Expand Down
2 changes: 1 addition & 1 deletion src/twisted/logger/_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class LoggingFile:

_softspace = 0

@deprecatedProperty(Version("Twisted", "NEXT", 0, 0))
@deprecatedProperty(Version("Twisted", 21, 2, 0))
def softspace(self):
return self._softspace

Expand Down
2 changes: 1 addition & 1 deletion src/twisted/logger/test/test_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def test_softspace(self) -> None:
deprecatedClass = "twisted.logger._io.LoggingFile.softspace"
self.assertEqual(
warningsShown[0]["message"],
"%s was deprecated in Twisted NEXT" % (deprecatedClass),
"%s was deprecated in Twisted 21.2.0" % (deprecatedClass),
)

def test_readOnlyAttributes(self) -> None:
Expand Down
2 changes: 1 addition & 1 deletion src/twisted/mail/pop3client.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
)

warnings.warn(
"twisted.mail.pop3client was deprecated in Twisted NEXT. Use twisted.mail.pop3 instead.",
"twisted.mail.pop3client was deprecated in Twisted 21.2.0. Use twisted.mail.pop3 instead.",
DeprecationWarning,
stacklevel=2,
)
Expand Down
2 changes: 1 addition & 1 deletion src/twisted/mail/test/test_pop3.py
Original file line number Diff line number Diff line change
Expand Up @@ -1599,7 +1599,7 @@ def test_deprecation(self):
self.assertEqual(warningsShown[0]["category"], DeprecationWarning)
self.assertEqual(
warningsShown[0]["message"],
"twisted.mail.pop3client was deprecated in Twisted NEXT. "
"twisted.mail.pop3client was deprecated in Twisted 21.2.0. "
"Use twisted.mail.pop3 instead.",
)
self.assertEqual(len(warningsShown), 1)
Expand Down
2 changes: 1 addition & 1 deletion src/twisted/names/dns.py
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,7 @@ class IEncodableRecord(IEncodable, IRecord):
"""
Interface for DNS records that can be encoded and decoded.
@since: Twisted NEXT
@since: Twisted 21.2.0
"""


Expand Down
54 changes: 27 additions & 27 deletions src/twisted/python/compat.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,102 +59,102 @@

FileType = IOBase
deprecatedModuleAttribute(
Version("Twisted", "NEXT", 0, 0),
Version("Twisted", 21, 2, 0),
"Obsolete alias for io.IOBase",
__name__,
"FileType",
)

frozenset = frozenset
deprecatedModuleAttribute(
Version("Twisted", "NEXT", 0, 0),
Version("Twisted", 21, 2, 0),
"Obsolete alias for frozenset builtin type",
__name__,
"frozenset",
)

InstanceType = object
deprecatedModuleAttribute(
Version("Twisted", "NEXT", 0, 0),
Version("Twisted", 21, 2, 0),
"Old-style classes don't exist in Python 3",
__name__,
"InstanceType",
)

izip = zip
deprecatedModuleAttribute(
Version("Twisted", "NEXT", 0, 0),
Version("Twisted", 21, 2, 0),
"Obsolete alias for zip() builtin",
__name__,
"izip",
)

long = int
deprecatedModuleAttribute(
Version("Twisted", "NEXT", 0, 0),
Version("Twisted", 21, 2, 0),
"Obsolete alias for int builtin type",
__name__,
"long",
)

range = range
deprecatedModuleAttribute(
Version("Twisted", "NEXT", 0, 0),
Version("Twisted", 21, 2, 0),
"Obsolete alias for range() builtin",
__name__,
"range",
)

raw_input = input
deprecatedModuleAttribute(
Version("Twisted", "NEXT", 0, 0),
Version("Twisted", 21, 2, 0),
"Obsolete alias for input() builtin",
__name__,
"raw_input",
)

set = set
deprecatedModuleAttribute(
Version("Twisted", "NEXT", 0, 0),
Version("Twisted", 21, 2, 0),
"Obsolete alias for set builtin type",
__name__,
"set",
)

StringType = str
deprecatedModuleAttribute(
Version("Twisted", "NEXT", 0, 0),
Version("Twisted", 21, 2, 0),
"Obsolete alias for str builtin type",
__name__,
"StringType",
)

unichr = chr
deprecatedModuleAttribute(
Version("Twisted", "NEXT", 0, 0),
Version("Twisted", 21, 2, 0),
"Obsolete alias for chr() builtin",
__name__,
"unichr",
)

unicode = str
deprecatedModuleAttribute(
Version("Twisted", "NEXT", 0, 0),
Version("Twisted", 21, 2, 0),
"Obsolete alias for str builtin type",
__name__,
"unicode",
)

xrange = range
deprecatedModuleAttribute(
Version("Twisted", "NEXT", 0, 0),
Version("Twisted", 21, 2, 0),
"Obsolete alias for range() builtin",
__name__,
"xrange",
)


@deprecated(Version("Twisted", "NEXT", 0, 0), replacement="d.items()")
@deprecated(Version("Twisted", 21, 2, 0), replacement="d.items()")
def iteritems(d):
"""
Return an iterable of the items of C{d}.
Expand All @@ -165,7 +165,7 @@ def iteritems(d):
return d.items()


@deprecated(Version("Twisted", "NEXT", 0, 0), replacement="d.values()")
@deprecated(Version("Twisted", 21, 2, 0), replacement="d.values()")
def itervalues(d):
"""
Return an iterable of the values of C{d}.
Expand All @@ -176,7 +176,7 @@ def itervalues(d):
return d.values()


@deprecated(Version("Twisted", "NEXT", 0, 0), replacement="list(d.items())")
@deprecated(Version("Twisted", 21, 2, 0), replacement="list(d.items())")
def items(d):
"""
Return a list of the items of C{d}.
Expand Down Expand Up @@ -386,7 +386,7 @@ def _matchingString(constantString, inputString):


@deprecated(
Version("Twisted", "NEXT", 0, 0),
Version("Twisted", 21, 2, 0),
replacement="raise exception.with_traceback(traceback)",
)
def reraise(exception, traceback):
Expand Down Expand Up @@ -417,7 +417,7 @@ def iterbytes(originalBytes):
yield originalBytes[i : i + 1]


@deprecated(Version("Twisted", "NEXT", 0, 0), replacement="b'%d'")
@deprecated(Version("Twisted", 21, 2, 0), replacement="b'%d'")
def intToBytes(i: int) -> bytes:
"""
Convert the given integer into C{bytes}, as ASCII-encoded Arab numeral.
Expand Down Expand Up @@ -471,7 +471,7 @@ def networkString(s: str) -> bytes:
return s.encode("ascii")


@deprecated(Version("Twisted", "NEXT", 0, 0), replacement="os.environb")
@deprecated(Version("Twisted", 21, 2, 0), replacement="os.environb")
def bytesEnviron():
"""
Return a L{dict} of L{os.environ} where all text-strings are encoded into
Expand Down Expand Up @@ -566,57 +566,57 @@ def fromFDWithoutModifyingFlags(fd, family, type, proto=None):


deprecatedModuleAttribute(
Version("Twisted", "NEXT", 0, 0),
Version("Twisted", 21, 2, 0),
"Use functools.reduce() directly",
__name__,
"reduce",
)

deprecatedModuleAttribute(
Version("Twisted", "NEXT", 0, 0),
Version("Twisted", 21, 2, 0),
"Use io.StringIO directly",
__name__,
"NativeStringIO",
)

deprecatedModuleAttribute(
Version("Twisted", "NEXT", 0, 0),
Version("Twisted", 21, 2, 0),
"Import urllib.parse directly",
__name__,
"urllib_parse",
)

deprecatedModuleAttribute(
Version("Twisted", "NEXT", 0, 0), "Use html.escape directly", __name__, "escape"
Version("Twisted", 21, 2, 0), "Use html.escape directly", __name__, "escape"
)

deprecatedModuleAttribute(
Version("Twisted", "NEXT", 0, 0),
Version("Twisted", 21, 2, 0),
"Use urllib.parse.quote() directly",
__name__,
"urlquote",
)

deprecatedModuleAttribute(
Version("Twisted", "NEXT", 0, 0),
Version("Twisted", 21, 2, 0),
"Use urllib.parse.unquote() directly",
__name__,
"urlunquote",
)

deprecatedModuleAttribute(
Version("Twisted", "NEXT", 0, 0),
Version("Twisted", 21, 2, 0),
"Use http.cookiejar directly",
__name__,
"cookielib",
)

deprecatedModuleAttribute(
Version("Twisted", "NEXT", 0, 0), "Use sys.intern() directly", __name__, "intern"
Version("Twisted", 21, 2, 0), "Use sys.intern() directly", __name__, "intern"
)

deprecatedModuleAttribute(
Version("Twisted", "NEXT", 0, 0),
Version("Twisted", 21, 2, 0),
"Use collections.abc.Sequence directly",
__name__,
"Sequence",
Expand Down
2 changes: 1 addition & 1 deletion src/twisted/python/deprecate.py
Original file line number Diff line number Diff line change
Expand Up @@ -786,7 +786,7 @@ def deprecatedKeywordParameter(
@param replacement: Optional text indicating what should be used in
place of the deprecated parameter.
@since: Twisted NEXT
@since: Twisted 21.2.0
"""

def wrapper(wrappee: _Tc) -> _Tc:
Expand Down
4 changes: 2 additions & 2 deletions src/twisted/python/test/test_win32.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def test_deprecation_FakeWindowsError(self):

self.assertWarns(
DeprecationWarning,
"twisted.python.win32.FakeWindowsError was deprecated in Twisted NEXT: "
"twisted.python.win32.FakeWindowsError was deprecated in Twisted 21.2.0: "
"Catch OSError and check presence of 'winerror' attribute.",
reflect.__file__,
lambda: reflect.namedAny("twisted.python.win32.FakeWindowsError"),
Expand All @@ -57,7 +57,7 @@ def test_deprecation_WindowsError(self):

self.assertWarns(
DeprecationWarning,
"twisted.python.win32.WindowsError was deprecated in Twisted NEXT: "
"twisted.python.win32.WindowsError was deprecated in Twisted 21.2.0: "
"Catch OSError and check presence of 'winerror' attribute.",
reflect.__file__,
lambda: reflect.namedAny("twisted.python.win32.WindowsError"),
Expand Down
2 changes: 1 addition & 1 deletion src/twisted/python/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ def iteritems(self):
def pop(self, key, default=_notFound):
"""
@see: L{dict.pop}
@since: Twisted NEXT
@since: Twisted 21.2.0
"""
try:
return self.data.pop(self._lowerOrReturn(key))[1]
Expand Down
4 changes: 2 additions & 2 deletions src/twisted/python/win32.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class FakeWindowsError(OSError):


deprecatedModuleAttribute(
Version("Twisted", "NEXT", 0, 0),
Version("Twisted", 21, 2, 0),
"Catch OSError and check presence of 'winerror' attribute.",
"twisted.python.win32",
"FakeWindowsError",
Expand All @@ -50,7 +50,7 @@ class FakeWindowsError(OSError):
WindowsError = FakeWindowsError # type: ignore[misc,assignment]

deprecatedModuleAttribute(
Version("Twisted", "NEXT", 0, 0),
Version("Twisted", 21, 2, 0),
"Catch OSError and check presence of 'winerror' attribute.",
"twisted.python.win32",
"WindowsError",
Expand Down
2 changes: 1 addition & 1 deletion src/twisted/trial/_synctest.py
Original file line number Diff line number Diff line change
Expand Up @@ -1211,7 +1211,7 @@ def getDeprecatedModuleAttribute(self, moduleName, name, version, message=None):
please-use-something-else message that is standard for Twisted
deprecations according to the given version and replacement.
@since: Twisted NEXT
@since: Twisted 21.2.0
"""
fqpn = moduleName + "." + name
module = sys.modules[moduleName]
Expand Down

0 comments on commit c21dbc9

Please sign in to comment.