Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/mar10/pyftpsync
Browse files Browse the repository at this point in the history
  • Loading branch information
mar10 committed Jun 19, 2022
2 parents 7b6a6a4 + be7fd51 commit a843f3b
Show file tree
Hide file tree
Showing 12 changed files with 584 additions and 592 deletions.
7 changes: 5 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,25 @@ jobs:
include:
- python: "3.10" # EOL 2026-10-04
env: TOXENV=py310
dist: bionic
- python: "3.9" # EOL 2025-10-05
env: TOXENV=py39
- python: "3.8" # EOL 2024-10-14
env: TOXENV=py38
- python: "3.7" # EOL 2023-06-27
env: TOXENV=py37
dist: xenial
- python: "3.6" # EOL 2021-12-21
env: TOXENV=py36
# - python: "3.6" # EOL 2021-12-21
# env: TOXENV=py36
# - python: "3.5" # EOL 2020-09-13
# env: TOXENV=py35
- python: "3.11-dev"
env: TOXENV=py311
dist: bionic
allow_failures:
- python: "3.11-dev"
env: TOXENV=py311
dist: bionic
before_install:
# Fix for cryptography on Py36
- pip install --upgrade virtualenv
Expand Down
4 changes: 2 additions & 2 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ url = "https://pypi.python.org/simple"
verify_ssl = true

[dev-packages]
black = "==21.9b0"
black = "~=22.0"
check-manifest = "*"
cx_Freeze = {version = "*", os_name = "== 'nt'"}
flake8 = "*"
Expand Down Expand Up @@ -31,7 +31,7 @@ pysftp = "*"
PyYAML = "*"

[requires]
python_version = "3.9"
python_version = "3.10"

[pipenv]
# allow_prereleases = true
1,124 changes: 555 additions & 569 deletions Pipfile.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Synchronize directories using FTP(S), SFTP, or file system access.

## Quickstart

[Python](https://www.python.org/download/Python) 3.6+ is required,
[Python](https://www.python.org/download/Python) 3.7+ is required,
[pip](http://www.pip-installer.org/) recommended:

```bash
Expand Down
8 changes: 4 additions & 4 deletions docs/sphinx/development.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ Work in a Virtual Environment

Install Python
^^^^^^^^^^^^^^
`Python 3.6+ <https://www.python.org/downloads/>`_,
`Python 3.7+ <https://www.python.org/downloads/>`_,
and `pip <https://pip.pypa.io/en/stable/installing/#do-i-need-to-install-pip>`_ on our system.

If you want to run tests on *all* supported platforms, install
Python 3.6, 3.7, 3.8, 3.9, and 3.10.
Python 3.7, 3.8, 3.9, and 3.10.

Create and Activate the Virtual Environment
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Expand All @@ -52,9 +52,9 @@ For example using Python's builtin ``venv`` (instead of ``virtualenvwrapper``)
in a Windows PowerShell::

> cd /path/pyftpsync
> py -3.6 -m venv c:\env\pyftpsync_py36
> py -3.10 -m venv c:\env\pyftpsync_py310
> c:\env\pyftpsync_py36\Scripts\Activate.ps1
(pyftpsync_py36) $
(pyftpsync_py310) $

Install Requirements
^^^^^^^^^^^^^^^^^^^^
Expand Down
2 changes: 1 addition & 1 deletion docs/sphinx/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ be installed using `pip <http://www.pip-installer.org/>`_::

$ pip install pyftpsync
$ pyftpsync --version -v
pyftpsync/2.0.1 Python/3.6.1 Darwin-17.6.0-x86_64-i386-64bit
pyftpsync/2.0.1 Python/3.7.1 Darwin-17.6.0-x86_64-i386-64bit

.. note::
MS Windows users that only need the command line interface may prefer the
Expand Down
12 changes: 8 additions & 4 deletions ftpsync/synchronizers.py
Original file line number Diff line number Diff line change
Expand Up @@ -480,9 +480,11 @@ def _sync_dir(self):
# Convert into a dict {name: FileEntry, ...}
local_entries = self.local.get_dir()
if case_mode == "strict":
local_entry_map = dict(map(lambda e: (e.name, e), local_entries))
local_entry_map = {e.name: e for e in local_entries}
# local_entry_map = dict(map(lambda e: (e.name, e), local_entries))
else:
local_entry_map = dict(map(lambda e: (e.name.lower(), e), local_entries))
local_entry_map = {e.name.lower(): e for e in local_entries}
# local_entry_map = dict(map(lambda e: (e.name.lower(), e), local_entries))
if len(local_entry_map) != len(local_entries):
raise RuntimeError(
"Local target contains file names that only differ in case: "
Expand All @@ -492,9 +494,11 @@ def _sync_dir(self):
# Convert into a dict {name: FileEntry, ...}
remote_entries = self.remote.get_dir()
if case_mode == "strict":
remote_entry_map = dict(map(lambda e: (e.name, e), remote_entries))
remote_entry_map = {e.name: e for e in remote_entries}
# remote_entry_map = dict(map(lambda e: (e.name, e), remote_entries))
else:
remote_entry_map = dict(map(lambda e: (e.name.lower(), e), remote_entries))
remote_entry_map = {e.name.lower(): e for e in remote_entries}
# remote_entry_map = dict(map(lambda e: (e.name.lower(), e), remote_entries))
if len(remote_entry_map) != len(remote_entries):
raise RuntimeError(
"Remote target contains file names that only differ in case: "
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[tool.black]
line-length = 88
#py36 = false # don't strip 'u' from native strings
target-version = ['py35', 'py36', 'py37', 'py38']
target-version = ['py37', 'py38', 'py39', 'py310']
include = '\.pyi?$'
exclude = '''
/(
Expand Down
4 changes: 2 additions & 2 deletions readme_pypi.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ Synchronize directories using FTP(S), SFTP, or file system access.
* Architecture is open to add other target types.

.. note::
Version 4.0 introduces drops support for Python 2.
Version 4.0 drops support for Python 2.

Requires `Python <https://www.python.org/download/>`_ 3.6+.
Requires `Python <https://www.python.org/download/>`_ 3.7+.

A Windows `MSI installer is also available on GitHub <https://github.com/mar10/pyftpsync/releases>`_.

Expand Down
3 changes: 1 addition & 2 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
-r requirements.txt

# Black is beta and therefor requires --pre flag for installation unless we give the exact number
black~=21.9b0"
black~=22.0
check-manifest
cx_Freeze
flake8~=3.4
Expand Down
5 changes: 2 additions & 3 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ keywords = python, ftp, ftps, sftp, synchronize, tls, tool
license = MIT
license_file = LICENSE.txt
classifiers =
Development Status :: 3 - Alpha
# Development Status :: 4 - Beta
# Development Status :: 3 - Alpha
Development Status :: 4 - Beta
# Development Status :: 5 - Production/Stable
Environment :: Console
Intended Audience :: Developers
Expand All @@ -33,7 +33,6 @@ classifiers =
Programming Language :: Python
Programming Language :: Python :: 3
Programming Language :: Python :: 3 :: Only
Programming Language :: Python :: 3.6
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Expand Down
3 changes: 2 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
[tox]
basepython = python3.10
envlist =
check,
flake8,
py310 # EOL 2026-10-04
py39 # EOL 2025-10-05
py38 # EOL 2024-10-14
py37 # EOL 2023-06-27
py36 # EOL 2021-12-21
# py36 # EOL 2021-12-21
# py35, # EOL 2020-09-13
coverage,
skip_missing_interpreters = true
Expand Down

0 comments on commit a843f3b

Please sign in to comment.