Opened 2 years ago

Closed 21 months ago

#5808 enhancement closed wontfix (wontfix)

replace usage of file with FilePath in twisted.cred.checkers

Reported by: thijs Owned by:
Priority: low Milestone: Python-3.x
Component: core Keywords:
Cc: thijs, bitsink@… Branch: branches/checkers-filepath-5808
(diff, github, buildbot, log)
Author: thijs Launchpad Bug:

Description (last modified by thijs)

The usage of file should be replaced with FilePath in twisted.cred.checkers and it's tests for Python 3 compatibility.

twisted/cred/checkers.py:196:            f = file(self.filename)
twisted/test/test_newcred.py:184:        f = file(dbfile, 'w')
twisted/test/test_newcred.py:196:        f = file(dbfile, 'w')
twisted/test/test_newcred.py:207:        f = file(dbfile, 'w')
twisted/test/test_newcred.py:220:        f = file(dbfile, 'w')
twisted/test/test_newcred.py:246:        f = file(dbfile, 'w')
twisted/test/test_newcred.py:408:            fObj = file(fn, 'w')
twisted/test/test_newcred.py:415:            fObj = file(fn, 'w')
twisted/test/test_newcred.py:422:            fObj = file(fn, 'w')

Attachments (2)

cred-open-5808.patch (7.9 KB) - added by thijs 2 years ago.
cred-open-5808-2.patch (11.3 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

  • Cc thijs added
  • Keywords review added

Attached patch replaces file with with open(...) as f and also applies some coding standards.

comment:2 Changed 2 years ago by thijs

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

Changed 2 years ago by thijs

comment:3 follow-up: Changed 23 months ago by namn

  • Cc bitsink@… added

setUp and test_userLookup in OnDiskDatabaseTestCase.py should be separated by two blank lines.

setUp is defined in two places, one at line 247, one at 184. The later definition does not assign dbfile to self.

comment:4 in reply to: ↑ 3 Changed 22 months ago by thijs

  • Keywords review removed
  • Owner set to thijs
  • Status changed from new to assigned

Replying to namn:

setUp and test_userLookup in OnDiskDatabaseTestCase.py should be separated by two blank lines.

setUp is defined in two places, one at line 247, one at 184. The later definition does not assign dbfile to self.

Thanks for the review. Make sure to remove the 'review' keyword when you've done a review, as described on ReviewProcess.

comment:5 Changed 22 months ago by thijs

  • Author set to thijs
  • Branch set to branches/checkers-filepath-5808

(In [35910]) Branching to 'checkers-filepath-5808'

comment:6 Changed 22 months ago by thijs

(In [35911]) apply cred-open-5808-2.patch, refs #5808

comment:7 Changed 22 months ago by thijs

(In [35919]) address review comments, add news file. refs #5808

comment:8 Changed 22 months ago by thijs

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

comment:9 Changed 21 months ago by therve

  • Keywords review removed
  • 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.