Ticket #6917: python_zippath_py3.patch

File python_zippath_py3.patch, 1.1 KB (added by realcr, 2 years ago)

Minor syntax fixes.

  • twisted/python/zippath.py

    diff --git twisted/python/zippath.py twisted/python/zippath.py
    index a82f253..2bafac2 100644
    This module contains implementations of IFilePath for zip files. 
    88See the constructor for ZipArchive for use.
    99"""
    1010
     11from __future__ import print_function,division,absolute_import
     12
    1113__metaclass__ = type
    1214
    1315import os
    else: 
    2729
    2830from twisted.python.filepath import IFilePath, FilePath, AbstractFilePath
    2931
    30 from zope.interface import implements
     32from zope.interface import implementer
    3133
    3234# using FilePath here exclusively rather than os to make sure that we don't do
    3335# anything OS-path-specific here.
    ZIP_PATH_SEP = '/' # In zipfiles, "/" is universally used as the 
    3638                                # path separator, regardless of platform.
    3739
    3840
     41@implementer(IFilePath)
    3942class ZipPath(AbstractFilePath):
    4043    """
    4144    I represent a file or directory contained within a zip file.
    4245    """
    4346
    44     implements(IFilePath)
    45 
    4647    sep = ZIP_PATH_SEP
    4748
    4849    def __init__(self, archive, pathInArchive):