Opened 4 years ago

Closed 4 years ago

#5810 enhancement closed wontfix (wontfix)

replace usage of file/open with FilePath in twisted.names

Reported by: Thijs Triemstra Owned by: Thijs Triemstra
Priority: normal Milestone:
Component: names Keywords: easy
Cc: Thijs Triemstra Branch: branches/names-filepath-5810-2
branch-diff, diff-cov, branch-cov, buildbot
Author: thijs

Description (last modified by Thijs Triemstra)

The usage of file() and open() should be replaced with FilePath in twisted.names and it's tests (also for Python 3 compatibility).

twisted/names/test/test_names.py:635:        fObj = file(resolvConf, 'w')
twisted/names/client.py:151:            resolvConf = file(self.resolv)
twisted/names/authority.py:30:            f = file(filename, 'w')
twisted/names/authority.py:36:    serialFile = file(filename, 'r')
twisted/names/authority.py:40:    serialFile = file(filename, 'w')

Attachments (1)

names-open-5810.patch (3.5 KB) - added by Thijs Triemstra 4 years ago.

Download all attachments as: .zip

Change History (11)

Changed 4 years ago by Thijs Triemstra

Attachment: names-open-5810.patch added

comment:1 Changed 4 years ago by Thijs Triemstra

Keywords: review added

comment:2 Changed 4 years ago by Antoine Pitrou

Keywords: review removed
Owner: set to Thijs Triemstra

Patch looks fine to me.

comment:3 Changed 4 years ago by Thijs Triemstra

Description: modified (diff)
Summary: replace usage of file with open in twisted.namesreplace usage of file with FilePath in twisted.names

comment:4 Changed 4 years ago by Thijs Triemstra

Author: thijs
Branch: branches/names-filepath-5810

(In [35920]) Branching to 'names-filepath-5810'

comment:5 Changed 4 years ago by Thijs Triemstra

Description: modified (diff)
Status: newassigned
Summary: replace usage of file with FilePath in twisted.namesreplace usage of file/open with FilePath in twisted.names

comment:6 Changed 4 years ago by Thijs Triemstra

Branch: branches/names-filepath-5810branches/names-filepath-5810-2

(In [36318]) Branching to 'names-filepath-5810-2'

comment:7 Changed 4 years ago by Thijs Triemstra

(In [36319]) replace file with FilePath, add news file. refs #5810

comment:8 Changed 4 years ago by Thijs Triemstra

Keywords: review added
Owner: Thijs Triemstra deleted
Status: assignednew

Up for review.

comment:9 Changed 4 years ago by therve

Keywords: review removed
Owner: set to Thijs Triemstra

I'm not sure I'm following, but as far as I understand this branch doesn't help creating more tests that pass under py3. twisted/names/authority.py is still unimportable for example. I think the porting strategy has changed from "change some bits to be compatible" to "port a module and its tests". If I get that right this ticket should be closed as invalid.

comment:10 Changed 4 years ago by therve

Resolution: wontfix
Status: newclosed

Following Plan/Python3 I'm closing this ticket. Sorry for the inconvenience.

Note: See TracTickets for help on using tickets.