Giter Club home page Giter Club logo

python-ftputil's Introduction

Things to do for a new release:

- do commits

- update info on new version in `README.txt`

- write announcement in announcements.txt

- increase version number in `VERSION` (`ftputil_version.py`
  and `ftputil.txt` are handled by the `sed` invocation through
  `make patch`)

- update Debian-related packaging files in debian/custom,
  including commits

- `make patch`

- do outstanding commits due to patching

- `make dist` (now includes tests)

- tag release (tags are formed like "release2_0_3b2")

- add new version to Trac issue tracker

- add new version to Download page on the website

- mark corresponding milestone as completed

- post announcement to ftputil mailing list


Only for non-alpha/beta releases:

- update documentation on the website

- register new version with PyPI

- send announcement to comp.lang.python.announce

python-ftputil's People

Contributors

mafalb avatar sschwarzer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

jeremyll usphil

python-ftputil's Issues

Failed to check file timestamp during a leap year

Got below error while using isfile function of remote ftp box.
ftp_connect.path.isfile('Remotefile')
File "/tmp/ftpclass-1.py", line 30, in
fetch()
File "/tmp/ftpclass-1.py", line 25, in fetch
source = ftp_connect.path.isfile('Remote-file.txt')
File "/app/Python-2.7.5/lib/python2.7/site-packages/ftputil/path.py", line 138, in isfile
path, _exception_for_missing_path=False)
File "/app/Python-2.7.5/lib/python2.7/site-packages/ftputil/host.py", line 846, in stat
return self._stat._stat(path, _exception_for_missing_path)
File "/app/Python-2.7.5/lib/python2.7/site-packages/ftputil/stat.py", line 735, in _stat
_exception_for_missing_path)
File "/app/Python-2.7.5/lib/python2.7/site-packages/ftputil/stat.py", line 699, in __call_with_parser_retry
return method(_args, *_kwargs)
File "/app/Python-2.7.5/lib/python2.7/site-packages/ftputil/stat.py", line 656, in _real_stat
lstat_result = self._real_lstat(path, _exception_for_missing_path)
File "/app/Python-2.7.5/lib/python2.7/site-packages/ftputil/stat.py", line 615, in _real_lstat
for stat_result in self._stat_results_from_dir(dirname):
File "/app/Python-2.7.5/lib/python2.7/site-packages/ftputil/stat.py", line 546, in _stat_results_from_dir
self.host.time_shift())
File "/app/Python-2.7.5/lib/python2.7/site-packages/ftputil/stat.py", line 478, in parse_line
st_mtime = self.parse_ms_time(date, time
, time_shift)
File "/app/Python-2.7.5/lib/python2.7/site-packages/ftputil/stat.py", line 316, in parse_ms_time
for part in date.split("-")]
File "/app/Python-2.7.5/lib/python2.7/site-packages/ftputil/stat.py", line 171, in _as_int
int_string))
ftputil.error.ParserError: non-integer year/month/day value u'drwxr'

Same code works when date on remote is not 29-Feb-2016 which is a leap year.
Python 2.7.5 and ftputil (3.2)

PFA snip of code.
ftpclass-1

time_shift is not applied in the parse_unix_time function

I have a FTP server that is 4 hours ahead of my client. I was hoping to get correct time by setting time_shift in the host object. After checking the code for function parse_unix_time, the time_shift is not applied to the time object created from ftp response lines. Since the response line returns the FTP server time, without applying the time_shift will end up giving wrong local time.

Suggest correction:

```
if ":" not in year_or_time:
        # `year_or_time` is really a year
        year, hour, minute = int(year_or_time), 0, 0
        st_mtime = time.mktime( (year, month, day,
                                 hour, minute, 0, 0, 0, -1) )
        **st_mtime += time_shift**
        # Precise up to a day
        st_mtime_precision = 24 * 60 * 60
    else:
        # `year_or_time` is a time hh:mm
        hour, minute = year_or_time.split(':')
        year, hour, minute = None, int(hour), int(minute)
        # Try the current year
        year = time.localtime()[0]
        st_mtime = time.mktime( (year, month, day,
                                 hour, minute, 0, 0, 0, -1) )
        **st_mtime += time_shift**
        # Precise up to a minute
        st_mtime_precision = 60

How to send command(s) to server.

Is it possible to send commands to ftp server? I need to send "REST bytes_offsets" command to server, so that when I call ftputil.FTPHost's "download" method, it starts to download that files from bytes_offsets.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.