Opened 2 years ago

Closed 2 years ago

#5810 enhancement closed wontfix (wontfix)

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

Reported by: thijs Owned by: thijs
Priority: normal Milestone:
Component: names Keywords: easy
Cc: thijs Branch: branches/names-filepath-5810-2
(diff, github, buildbot, log)
Author: thijs Launchpad Bug:

Description (last modified by thijs)

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 2 years ago.

Download all attachments as: .zip

Change History (11)

Changed 2 years ago by thijs

comment:1 Changed 2 years ago by thijs

  • Keywords review added

comment:2 Changed 2 years ago by antoine

  • Keywords review removed
  • Owner set to thijs

Patch looks fine to me.

comment:3 Changed 2 years ago by thijs

  • Description modified (diff)
  • Summary changed from replace usage of file with open in twisted.names to replace usage of file with FilePath in twisted.names

comment:4 Changed 2 years ago by thijs

  • Author set to thijs
  • Branch set to branches/names-filepath-5810

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

comment:5 Changed 2 years ago by thijs

  • Description modified (diff)
  • Status changed from new to assigned
  • Summary changed from replace usage of file with FilePath in twisted.names to replace usage of file/open with FilePath in twisted.names

comment:6 Changed 2 years ago by thijs

  • Branch changed from branches/names-filepath-5810 to branches/names-filepath-5810-2

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

comment:7 Changed 2 years ago by thijs

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

comment:8 Changed 2 years ago by thijs

  • Keywords review added
  • Owner thijs deleted
  • Status changed from assigned to new

Up for review.

comment:9 Changed 2 years ago by therve

  • Keywords review removed
  • Owner set to thijs

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 2 years ago by therve

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

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

Note: See TracTickets for help on using tickets.