Changeset 1717:827cfaff87d7


Ignore:
Timestamp:
Dec 25, 2018, 11:05:32 PM (5 months ago)
Author:
Stefan Schwarzer <sschwarzer@…>
Branch:
default
histedit_source:
0a87e070cc46fff630b6cb475bbafedf1a4bc6c7
Message:
Remove unneeded uses of `io`

In Python 3, `io.open` is the same as `open`, so we don't need to
use `io.open`.
Location:
ftputil
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • ftputil/file.py

    r1716 r1717  
    4545        instead this file object is modified in-place.
    4646        """
    47         # We use the same arguments as in `io.open`.
     47        # We use the same arguments as in `open`.
    4848        # pylint: disable=too-many-arguments
    4949        #
  • ftputil/file_transfer.py

    r1713 r1717  
    77"""
    88
    9 import io
    109import os
    1110
     
    5554    def fobj(self):
    5655        """Return a file object for the name/path in the constructor."""
    57         return io.open(self.name, self.mode)
     56        return open(self.name, self.mode)
    5857
    5958
  • ftputil/host.py

    r1715 r1717  
    190190        this `FTPHost` object.
    191191
    192         The arguments `path`, `mode`, `buffering`, `encoding`, `errors`
    193         and `newlines` have the same meaning as for `io.open`. If `rest`
    194         is given as an integer,
     192        The arguments `path`, `mode`, `buffering`, `encoding`,
     193        `errors` and `newlines` have the same meaning as for `open`.
     194        If `rest` is given as an integer,
    195195
    196196        - reading will start at the byte (zero-based) `rest`
     
    200200        if none is available.
    201201        """
    202         # Support the same arguments as `io.open`.
     202        # Support the same arguments as `open`.
    203203        # pylint: disable=too-many-arguments
    204204        path = ftputil.tool.as_unicode(path)
Note: See TracChangeset for help on using the changeset viewer.