Opened 4 years ago

Closed 4 years ago

#5917 enhancement closed fixed (fixed)

Port twisted.python.versions to Python 3

Reported by: exarkun Owned by: exarkun
Priority: normal Milestone: Python 3.3 Minimal
Component: core Keywords:
Cc: Branch: branches/versions-python3-5917-3
branch-diff, diff-cov, branch-cov, buildbot
Author: exarkun


twisted/ would like this. Also, `twisted.python.deprecate` depends on twisted.python.versions.

Change History (10)

comment:1 Changed 4 years ago by exarkun

  • Author set to exarkun
  • Branch set to branches/versions-python3-5917

(In [35386]) Branching to 'versions-python3-5917'

comment:2 Changed 4 years ago by exarkun

  • Branch changed from branches/versions-python3-5917 to branches/versions-python3-5917-2

(In [35406]) Branching to 'versions-python3-5917-2'

comment:3 Changed 4 years ago by exarkun

(In [35409]) Switch to byte literals in a bunch of places. Do a little messing about with encodings. Close files instead of relying on the gc to do it. Add twisted.python.versions and twisted.python.test.test_versions to the ported list.

refs #5917

comment:4 Changed 4 years ago by exarkun

  • Branch changed from branches/versions-python3-5917-2 to branches/versions-python3-5917-3

(In [35417]) Branching to 'versions-python3-5917-3'

comment:5 Changed 4 years ago by exarkun

  • Keywords review added
  • Owner changed from exarkun to itamar

Some stuff done, build results (may they be favorable).

comment:6 Changed 4 years ago by itamar

  • Keywords review removed
  • Owner changed from itamar to exarkun

Sorry for the late review.

  1. Close #5785 as a duplicate.
  2. Given #5886 is pretty trivial, maybe add it to this branch.
  3. Needs news file.
  4. Having the SVN revision as bytes means you get funny looking str(), e.g.
>>> str(v)
"[twisted, version 1.0.0+rb'35423']"

So you probably want to nativeString it at some point in the code.

Fix those and merge.

comment:7 Changed 4 years ago by exarkun

(In [35426]) re-enable twisted.version

refs #5917 refs #5886

comment:8 Changed 4 years ago by exarkun

(In [35427]) Add a test for getVersionString result including an svn revision number, and make it pass on Python 3.x

refs #5917

comment:9 Changed 4 years ago by exarkun

(In [35428]) Fix pyflakes warning

refs #5917

comment:10 Changed 4 years ago by exarkun

  • Resolution set to fixed
  • Status changed from new to closed

(In [35431]) Merge versions-python3-5917-3

Author: exarkun Reviewer: itamar Fixes: #5917 Fixes: #5785 Fixes: #5886

Port twisted.python.versions to Python 3. Also add a bit of missing test coverage and restore the definition of twisted.__version__ on Python 3.

Note: See TracTickets for help on using tickets.