Opened 5 years ago

Closed 5 years ago

#5917 enhancement closed fixed (fixed)

Port twisted.python.versions to Python 3

Reported by: Jean-Paul Calderone Owned by: Jean-Paul Calderone
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

Description

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

Change History (10)

comment:1 Changed 5 years ago by Jean-Paul Calderone

Author: exarkun
Branch: branches/versions-python3-5917

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

comment:2 Changed 5 years ago by Jean-Paul Calderone

Branch: branches/versions-python3-5917branches/versions-python3-5917-2

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

comment:3 Changed 5 years ago by Jean-Paul Calderone

(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 5 years ago by Jean-Paul Calderone

Branch: branches/versions-python3-5917-2branches/versions-python3-5917-3

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

comment:5 Changed 5 years ago by Jean-Paul Calderone

Keywords: review added
Owner: changed from Jean-Paul Calderone to Itamar Turner-Trauring

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

comment:6 Changed 5 years ago by Itamar Turner-Trauring

Keywords: review removed
Owner: changed from Itamar Turner-Trauring to Jean-Paul Calderone

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 5 years ago by Jean-Paul Calderone

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

refs #5917 refs #5886

comment:8 Changed 5 years ago by Jean-Paul Calderone

(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 5 years ago by Jean-Paul Calderone

(In [35428]) Fix pyflakes warning

refs #5917

comment:10 Changed 5 years ago by Jean-Paul Calderone

Resolution: fixed
Status: newclosed

(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.