Ticket #4711 defect closed fixed

Opened 3 years ago

Last modified 5 days ago

Remove usage of FilePath.statinfo in twisted

Reported by: cyli Owned by: cyli
Priority: normal Milestone:
Component: core Keywords:
Cc: Branch: branches/remove-statinfo-in-ftp-4711
(diff, github, buildbot, log)
Author: cyli Launchpad Bug:

Description

FilePath.statinfo should be deprecated (see #4450) and thus it should no longer be used in Twisted.

It is still used in twisted.protocols.ftp, and twisted.web2.static

Change History

1

Changed 3 years ago by cyli

  • branch set to branches/remove-usages-of-filepath-statinfo-4711
  • branch_author set to cyli

(In [30173]) Branching to 'remove-usages-of-filepath-statinfo-4711'

2

Changed 3 years ago by cyli

Usage of FilePath.statinfo cannot be removed yet because FilePath does not provide accessors for some of the fields. So this ticket is on hold until #4712 is resolved.

3

Changed 3 years ago by cyli

  • branch changed from branches/remove-usages-of-filepath-statinfo-4711 to branches/begin-convert-usages-of-filepath-statinfo-4711

(In [30516]) Branching to 'begin-convert-usages-of-filepath-statinfo-4711'

4

Changed 3 years ago by cyli

(In [30517]) Added a test to ensure that the new accessors for statinfo will work in place of statinfo in twisted/web2/static.py

refs #4711

5

Changed 3 years ago by cyli

(In [30537]) Changed FTP to (mostly) use the new accessor methods in t.p.filepath. However, an accessor for permissions is missing.

refs #4711

6

Changed 3 years ago by cyli

Filed ticket #4813 for filepath to provide the permissions

7

Changed 3 years ago by cyli

  • status changed from new to assigned
  • owner changed from glyph to cyli

8

Changed 3 years ago by <automation>

  • owner cyli deleted

9

Changed 13 months ago by itamar

Can this ticket be finished now that #4813 is closed?

10

Changed 8 days ago by cyli

  • branch changed from branches/begin-convert-usages-of-filepath-statinfo-4711 to branches/remove-statinfo-in-ftp-4711

(In [42358]) Branching to remove-statinfo-in-ftp-4711.

11

Changed 8 days ago by cyli

  • keywords review added
  • status changed from assigned to new

Sorry for not getting back to this in a while. So, getUserID(), getGroupID(), and getNumberOfHardLinks() are not implemented for windows in filepath, so this changes the behavior of FTP a bit, because it just returns hardlinks: 0, user: "0", group: "0" in windows, since that's probably the previous behavior (stat in windows seems to set those values to 0 anyway:  http://stackoverflow.com/questions/5275731/os-stat-on-windows)

12

Changed 6 days ago by adiroiban

Looks good to merge. Thanks!

13

Changed 5 days ago by glyph

  • keywords review removed
  • owner set to cyli
  • type changed from enhancement to defect

I concur with Adi's analysis. Thanks for eliminating this unpleasant implementation detail from ftp.

14

Changed 5 days ago by cyli

  • status changed from new to closed
  • resolution set to fixed

(In [42473]) Merge remove-statinfo-in-ftp-4711

Author: cyli Reviewer: adiroiban, glyph Fixes: #4711

Removes the final usage of twisted.python.filepath.FilePath.statinfo from the Twisted codebase

Note: See TracTickets for help on using tickets.