Skip to content

Commit

Permalink
Merge pull request twisted#545 from twisted/8817-incremental
Browse files Browse the repository at this point in the history
Author: hawkowl
Reviewer: glyph, markrwilliams
Fixes: twisted#8817

Replace t.p.versions with incremental
  • Loading branch information
markrwilliams authored Oct 10, 2016
2 parents ec42d72 + 09f61d5 commit 5c17777
Show file tree
Hide file tree
Showing 66 changed files with 158 additions and 1,277 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
*.egg-info/
.eggs/
*.o
*.py[co]
*.so
Expand Down
20 changes: 0 additions & 20 deletions bin/admin/change-versions

This file was deleted.

37 changes: 20 additions & 17 deletions docs/core/development/policy/release-process.rst
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,9 @@ How to do a pre-release

1. Check ​buildbot to make sure all supported platforms are green (wait for pending builds if necessary).
2. If a previously supported platform does not currently have a buildbot, move from supported platforms to "expected to work" in ``INSTALL.rst``.
3. In your Git-SVN-enabled Git repo, fetch and check out the new release branch.
4. Run ``./bin/admin/change-versions --prerelease``
5. Commit the changes made by change-versions
3. In your Git repo, fetch and check out the new release branch.
4. Run ``python -m incremental.update Twisted --newversion $RELEASErc1``
5. Commit the changes made by Incremental.
6. Run ``./bin/admin/build-news .``
7. Commit the changes made by build-news - this automatically removes the NEWS topfiles (see #4315)
8. Bump copyright dates in ``LICENSE``, ``twisted/copyright.py``, and ``README.rst`` if required
Expand Down Expand Up @@ -138,7 +138,7 @@ Pre-release announcement

The pre-release announcement should mention the important changes since the last release, and exhort readers to test this pre-release.

Here's what the $RELEASEpre1 release announcement might look like::
Here's what the $RELEASErc1 release announcement might look like::

Live from PyCon Atlanta, I'm pleased to herald the approaching
footsteps of the $API release.
Expand Down Expand Up @@ -175,16 +175,18 @@ Prepare the branch
~~~~~~~~~~~~~~~~~~

1. Have the release branch, previously used to generate a pre-release, checked out
2. Run ``./bin/admin/change-versions``
3. Add the quote of the release to the ``README.rst``
4. Make a new quote file for the next version
2. Run ``python -m incremental.update Twisted``.
3. Revert the prerelease newsfile changes, in order.
4. Run ``./bin/admin/build-news .`` to make the final newsfile.
5. Add the quote of the release to the ``README.rst``
6. Make a new quote file for the next version

- ``git mv docs/fun/Twisted.Quotes docs/historic/Quotes/Twisted-$API; echo '' > docs/fun/Twisted.Quotes; git add docs/fun/Twisted.Quotes``

5. Commit the version and ``README.rst`` changes.
6. Submit the ticket for review
7. Pause until the ticket is reviewed and accepted.
8. Tag the release.
7. Commit the version and ``README.rst`` changes.
8. Submit the ticket for review
9. Pause until the ticket is reviewed and accepted.
10. Tag the release.

- ``git tag -s twisted-$RELEASE -m "Tag $RELEASE release"``
- ``git push --tags``
Expand Down Expand Up @@ -214,8 +216,7 @@ Update documentation

1. Get the dependencies

- Pydoctor (use the branch "twisted" from ​https://github.com/twisted/pydoctor)
- Epydoc
- PyDoctor (from PyPI)

2. Build the documentation

Expand Down Expand Up @@ -281,9 +282,11 @@ Announce
- Twitter, if you feel like it
- ``#twisted`` topic on IRC (you'll need ops)

5. Merge the release branch into trunk, closing the release ticket at the same time.
6. Close the release milestone (which should have no tickets in it).
7. Open a milestone for the next release.
5. Run ``python -m incremental Twisted --dev`` to add a `dev0` postfix.
6. Commit the dev0 update change.
7. Merge the release branch into trunk, closing the release ticket at the same time.
8. Close the release milestone (which should have no tickets in it).
9. Open a milestone for the next release.


Release announcement
Expand Down Expand Up @@ -365,7 +368,7 @@ This section goes over doing these "point" releases.
3. Cherry-pick the merge commits that merge the bugfixes into trunk, onto the new release branch.
4. Go through the rest of the process for a full release from "How to do a pre-release", merging the release branch into trunk as normal as the end of the process.

- Instead of just ``--prerelease`` when running the change-versions script, add the patch flag, making it ``--patch --prerelease``.
- Instead of just ``--rc`` when running the change-versions script, add the patch flag, making it ``--patch --rc``.
- Instead of waiting a week, a shorter pause is acceptable for a patch release.


Expand Down
16 changes: 5 additions & 11 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,13 @@
import sys
import setuptools


# Tell Twisted not to enforce zope.interface requirement on import, since
# we're going to have to import twisted.python._setup and can rely on
# setuptools to install dependencies.
setuptools._TWISTED_NO_CHECK_REQUIREMENTS = True

if __name__ == "__main__":
# Make sure we can import the setup helpers.
if os.path.exists('src/twisted/'):
sys.path.insert(0, 'src')

from twisted.python._setup import getSetupArgs
_setup = {}
with open('src/twisted/python/_setup.py') as f:
exec(f.read(), _setup)

try:
setuptools.setup(**getSetupArgs())
setuptools.setup(**_setup["getSetupArgs"]())
except KeyboardInterrupt:
sys.exit(1)
42 changes: 1 addition & 41 deletions src/twisted/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
# Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.


"""
Twisted: The Framework Of Your Internet.
"""
Expand All @@ -17,48 +16,9 @@ def _checkRequirements():
raise ImportError("Twisted requires Python 2.7 or later.")
elif version >= (3, 0) and version < (3, 3):
raise ImportError("Twisted on Python 3 requires Python 3.3 or later.")
if version < (3, 0):
required = "3.6.0"
else:
required = "4.0.0"

if ("setuptools" in sys.modules and
getattr(sys.modules["setuptools"],
"_TWISTED_NO_CHECK_REQUIREMENTS", None) is not None):
# Skip requirement checks, setuptools ought to take care of installing
# the dependencies.
return

# Don't allow the user to run with a version of zope.interface we don't
# support.
required = "Twisted requires zope.interface %s or later" % (required,)
try:
from zope import interface
except ImportError:
# It isn't installed.
raise ImportError(required + ": no module named zope.interface.")
except:
# It is installed but not compatible with this version of Python.
raise ImportError(required + ".")
try:
# Try using the API that we need, which only works right with
# zope.interface 3.6 (or 4.0 on Python 3)
class IDummy(interface.Interface):
pass
@interface.implementer(IDummy)
class Dummy(object):
pass
except TypeError:
# It is installed but not compatible with this version of Python.
raise ImportError(required + ".")

_checkRequirements()

# Ensure compat gets imported
from twisted.python import compat

# setup version
from twisted._version import version
from twisted._version import __version__ as version
__version__ = version.short()

del compat
14 changes: 7 additions & 7 deletions src/twisted/_version.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.

# This is an auto-generated file. Do not edit it.

"""
Provides Twisted version information.
"""

from twisted.python import versions
version = versions.Version('twisted', 16, 4, 1)
# This file is auto-generated! Do not edit!
# Use `python -m incremental.update Twisted` to change this file.

from incremental import Version

__version__ = Version('Twisted', 16, 4, 1)
__all__ = ["__version__"]
5 changes: 3 additions & 2 deletions src/twisted/application/strports.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,11 @@

import warnings

from incremental import Version

from twisted.application.internet import StreamServerEndpointService
from twisted.internet import endpoints
from twisted.python.deprecate import deprecatedModuleAttribute
from twisted.python.versions import Version
from twisted.application.internet import StreamServerEndpointService



Expand Down
4 changes: 2 additions & 2 deletions src/twisted/conch/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
Twisted Conch: The Twisted Shell. Terminal emulation, SSHv2 and telnet.
"""

from twisted.python.versions import Version
from incremental import Version
from twisted.python.deprecate import deprecatedModuleAttribute

from twisted._version import version
from twisted._version import __version__ as version
__version__ = version.short()

deprecatedModuleAttribute(
Expand Down
4 changes: 3 additions & 1 deletion src/twisted/conch/checkers.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@

from zope.interface import providedBy, implementer, Interface

from incremental import Version

from twisted.conch import error
from twisted.conch.ssh import keys
from twisted.cred.checkers import ICredentialsChecker
Expand All @@ -37,7 +39,7 @@
from twisted.python.deprecate import deprecatedModuleAttribute
from twisted.python.util import runAsEffectiveUser
from twisted.python.filepath import FilePath
from twisted.python.versions import Version




Expand Down
3 changes: 2 additions & 1 deletion src/twisted/conch/insults/helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,12 @@

from zope.interface import implementer

from incremental import Version

from twisted.internet import defer, protocol, reactor
from twisted.python import log, _textattributes
from twisted.python.compat import iterbytes
from twisted.python.deprecate import deprecated, deprecatedModuleAttribute
from twisted.python.versions import Version
from twisted.conch.insults import insults

FOREGROUND = 30
Expand Down
3 changes: 2 additions & 1 deletion src/twisted/conch/insults/text.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,11 @@
@author: Jp Calderone
"""

from incremental import Version

from twisted.conch.insults import helper, insults
from twisted.python import _textattributes
from twisted.python.deprecate import deprecatedModuleAttribute
from twisted.python.versions import Version



Expand Down
3 changes: 2 additions & 1 deletion src/twisted/conch/ssh/keys.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
from hashlib import md5, sha256
import base64

from incremental import Version

from cryptography.exceptions import InvalidSignature
from cryptography.hazmat.backends import default_backend
from cryptography.hazmat.primitives import hashes, serialization
Expand All @@ -41,7 +43,6 @@
_b64decodebytes as decodebytes, _b64encodebytes as encodebytes)
from twisted.python.constants import NamedConstant, Names
from twisted.python.deprecate import deprecated, getDeprecationWarningString
from twisted.python.versions import Version



Expand Down
2 changes: 1 addition & 1 deletion src/twisted/conch/test/test_keys.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
from twisted.python import randbytes
from twisted.trial import unittest
from twisted.python.compat import long, _PY3
from twisted.python.versions import Version
from incremental import Version
from twisted.python.filepath import FilePath


Expand Down
11 changes: 0 additions & 11 deletions src/twisted/conch/topfiles/README

This file was deleted.

2 changes: 1 addition & 1 deletion src/twisted/internet/_sslverify.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,7 @@ def _selectVerifyImplementation(lib):

from zope.interface import Interface, implementer
from constantly import Flags, FlagConstant
from incremental import Version

from twisted.internet.defer import Deferred
from twisted.internet.error import VerifyError, CertificateError
Expand All @@ -220,7 +221,6 @@ def _selectVerifyImplementation(lib):
from twisted.python.util import FancyEqMixin

from twisted.python.deprecate import deprecated
from twisted.python.versions import Version


def _sessionCounter(counter=itertools.count()):
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 @@ -29,7 +29,7 @@
from twisted.python import lockfile, failure
from twisted.logger import Logger
from twisted.python.deprecate import warnAboutFunction, deprecated
from twisted.python.versions import Version
from incremental import Version

log = Logger()

Expand Down
2 changes: 1 addition & 1 deletion src/twisted/internet/error.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import socket

from twisted.python import deprecate
from twisted.python.versions import Version
from incremental import Version



Expand Down
2 changes: 1 addition & 1 deletion src/twisted/internet/task.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
from twisted.python import reflect
from twisted.python.deprecate import _getDeprecationWarningString
from twisted.python.failure import Failure
from twisted.python.versions import Version
from incremental import Version

from twisted.internet import base, defer
from twisted.internet.interfaces import IReactorTime
Expand Down
4 changes: 2 additions & 2 deletions src/twisted/mail/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
Twisted Mail: Servers and clients for POP3, ESMTP, and IMAP.
"""

from twisted.python.versions import Version
from incremental import Version
from twisted.python.deprecate import deprecatedModuleAttribute

from twisted._version import version
from twisted._version import __version__ as version
__version__ = version.short()

deprecatedModuleAttribute(
Expand Down
6 changes: 0 additions & 6 deletions src/twisted/mail/topfiles/README

This file was deleted.

4 changes: 2 additions & 2 deletions src/twisted/names/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
Twisted Names: DNS server and client implementations.
"""

from twisted.python.versions import Version
from incremental import Version
from twisted.python.deprecate import deprecatedModuleAttribute

from twisted._version import version
from twisted._version import __version__ as version
__version__ = version.short()

deprecatedModuleAttribute(
Expand Down
Loading

0 comments on commit 5c17777

Please sign in to comment.