Opened 5 years ago

Closed 4 years ago

#5808 enhancement closed wontfix (wontfix)

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

Reported by: Thijs Triemstra Owned by:
Priority: low Milestone: Python-3.x
Component: core Keywords:
Cc: Thijs Triemstra, Nam Nguyen Branch: branches/checkers-filepath-5808
branch-diff, diff-cov, branch-cov, buildbot
Author: thijs

Description (last modified by Thijs Triemstra)

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

Download all attachments as: .zip

Change History (11)

Changed 5 years ago by Thijs Triemstra

Attachment: cred-open-5808.patch added

comment:1 Changed 5 years ago by Thijs Triemstra

Cc: Thijs Triemstra added
Keywords: review added

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

comment:2 Changed 5 years ago by Thijs Triemstra

Description: modified (diff)
Summary: replace usage of file with open in twisted.cred.checkersreplace usage of file with FilePath in twisted.cred.checkers

Changed 5 years ago by Thijs Triemstra

Attachment: cred-open-5808-2.patch added

comment:3 Changed 5 years ago by Nam Nguyen

Cc: Nam Nguyen 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 5 years ago by Thijs Triemstra

Keywords: review removed
Owner: set to Thijs Triemstra
Status: newassigned

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 5 years ago by Thijs Triemstra

Author: thijs
Branch: branches/checkers-filepath-5808

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

comment:6 Changed 5 years ago by Thijs Triemstra

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

comment:7 Changed 5 years ago by Thijs Triemstra

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

comment:8 Changed 5 years ago by Thijs Triemstra

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

comment:9 Changed 4 years ago by therve

Keywords: review removed
Resolution: wontfix
Status: newclosed

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

Note: See TracTickets for help on using tickets.