From 7e0f3b4fe5684b3a45555d70201360f1a6bdd3df Mon Sep 17 00:00:00 2001 From: Martin Larralde Date: Sun, 18 Oct 2020 13:34:06 +0200 Subject: [PATCH 01/10] Update pull request template and move it to `.github` folder --- .../PULL_REQUEST_TEMPLATE.md | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) rename pull_request_template.md => .github/PULL_REQUEST_TEMPLATE.md (65%) diff --git a/pull_request_template.md b/.github/PULL_REQUEST_TEMPLATE.md similarity index 65% rename from pull_request_template.md rename to .github/PULL_REQUEST_TEMPLATE.md index 98b95212..6f7fcbcf 100644 --- a/pull_request_template.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,17 +1,19 @@ ## Type of changes -- [ ] Bug fix -- [ ] New feature -- [ ] Documentation / docstrings -- [ ] Tests -- [ ] Other + + +- Bug fix +- New feature +- Documentation / docstrings +- Tests +- Other ## Checklist - [ ] I've run the latest [black](https://github.com/ambv/black) with default args on new code. - [ ] I've updated CHANGELOG.md and CONTRIBUTORS.md where appropriate. - [ ] I've added tests for new code. -- [ ] I accept that @willmcgugan may be pedantic in the code review. +- [ ] I accept that @PyFilesystem/maintainers may be pedantic in the code review. ## Description From e3a9ee6d52e1551b1cdbc95beead982d3ce1d460 Mon Sep 17 00:00:00 2001 From: Martin Larralde Date: Sun, 18 Oct 2020 13:59:44 +0200 Subject: [PATCH 02/10] Move most of the metadata from `setup.py` to `setup.cfg` --- setup.cfg | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ setup.py | 47 ++--------------------------------------------- 2 files changed, 51 insertions(+), 45 deletions(-) diff --git a/setup.cfg b/setup.cfg index a207101e..9a58e9ee 100644 --- a/setup.cfg +++ b/setup.cfg @@ -2,14 +2,63 @@ universal = 1 [metadata] +version = attr: fs._version.__version__ +name = fs +author = Will McGugan +author_email = will@willmcgugan.com +maintainer = Martin Larralde +maintainer_email = martin.larralde@embl.de +url = https://github.com/PyFilesystem/pyfilesystem2 +license = MIT license_file = LICENSE +description = Python's filesystem abstraction layer long_description = file: README.md long_description_content_type = text/markdown +platform = any +classifiers = + Development Status :: 5 - Production/Stable + Intended Audience :: Developers + License :: OSI Approved :: MIT License + Operating System :: OS Independent + Programming Language :: Python + Programming Language :: Python :: 2.7 + Programming Language :: Python :: 3.4 + Programming Language :: Python :: 3.5 + Programming Language :: Python :: 3.6 + Programming Language :: Python :: 3.7 + Programming Language :: Python :: 3.8 + Programming Language :: Python :: Implementation :: CPython + Programming Language :: Python :: Implementation :: PyPy + Topic :: System :: Filesystems project_urls = Bug Reports = https://github.com/PyFilesystem/pyfilesystem2/issues Documentation = https://pyfilesystem2.readthedocs.io/en/latest/ Wiki = https://www.pyfilesystem.org/ +[options] +zip_safe = false +packages = find: +setup_requires = + setuptools >=38.3.0 +install_requires = + appdirs~=1.4.3 + pytz + setuptools + six ~=1.10 + enum34 ~=1.1.6 ; python_version < '3.4' + typing ~=3.6 ; python_version < '3.6' + backports.os ~=0.1 ; python_version < '3.0' + +[options.extras_require] +scandir = + scandir~=1.5 ; python_version < '3.5' + +[options.packages.find] +exclude = tests + +[options.package_data] +fs = py.typed + [pydocstyle] inherit = false ignore = D102,D105,D200,D203,D213,D406,D407 diff --git a/setup.py b/setup.py index a6ce6f43..ac42fe2c 100644 --- a/setup.py +++ b/setup.py @@ -1,47 +1,4 @@ #!/usr/bin/env python -from setuptools import setup, find_packages - -with open("fs/_version.py") as f: - exec(f.read()) - -CLASSIFIERS = [ - "Development Status :: 5 - Production/Stable", - "Intended Audience :: Developers", - "License :: OSI Approved :: MIT License", - "Operating System :: OS Independent", - "Programming Language :: Python", - "Programming Language :: Python :: 2.7", - "Programming Language :: Python :: 3.4", - "Programming Language :: Python :: 3.5", - "Programming Language :: Python :: 3.6", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: Implementation :: CPython", - "Programming Language :: Python :: Implementation :: PyPy", - "Topic :: System :: Filesystems", -] - -REQUIREMENTS = ["appdirs~=1.4.3", "pytz", "setuptools", "six~=1.10"] - -setup( - author="Will McGugan", - author_email="will@willmcgugan.com", - classifiers=CLASSIFIERS, - description="Python's filesystem abstraction layer", - install_requires=REQUIREMENTS, - extras_require={ - "scandir :python_version < '3.5'": ["scandir~=1.5"], - ":python_version < '3.4'": ["enum34~=1.1.6"], - ":python_version < '3.6'": ["typing~=3.6"], - ":python_version < '3.0'": ["backports.os~=0.1"], - }, - license="MIT", - name="fs", - packages=find_packages(exclude=("tests",)), - package_data={"fs": ["py.typed"]}, - zip_safe=False, - platforms=["any"], - url="https://github.com/PyFilesystem/pyfilesystem2", - version=__version__, -) +from setuptools import setup +setup() From 20536d2b2579e5e53d626ed0f272c63dc1350af8 Mon Sep 17 00:00:00 2001 From: Martin Larralde Date: Sun, 18 Oct 2020 15:19:21 +0200 Subject: [PATCH 03/10] Update copyright line in `LICENSE` file --- LICENSE | 1 + 1 file changed, 1 insertion(+) diff --git a/LICENSE b/LICENSE index 97a4b916..6f1b27cc 100644 --- a/LICENSE +++ b/LICENSE @@ -1,5 +1,6 @@ MIT License +Copyright (c) 2017-2020 The PyFilesystem2 contributors Copyright (c) 2016-2019 Will McGugan Permission is hereby granted, free of charge, to any person obtaining a copy From 589d9a8251c91d0272ad5c881864d27e4baf7565 Mon Sep 17 00:00:00 2001 From: Martin Larralde Date: Sun, 18 Oct 2020 15:22:49 +0200 Subject: [PATCH 04/10] Bump version to `v2.4.12` --- CHANGELOG.md | 2 +- fs/_version.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9e0a7680..c50b777b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,7 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/). -## [2.4.12] - (Unreleased) +## [2.4.12] - 2020-10-18 ### Added diff --git a/fs/_version.py b/fs/_version.py index 0e4134f2..7dc85736 100644 --- a/fs/_version.py +++ b/fs/_version.py @@ -1,3 +1,3 @@ """Version, used in module and setup.py. """ -__version__ = "2.4.11" +__version__ = "2.4.12" From e4a3f7101b1720474259cc28de6127671b3ad664 Mon Sep 17 00:00:00 2001 From: Martin Larralde Date: Sun, 18 Oct 2020 15:27:17 +0200 Subject: [PATCH 05/10] Update names in `README.md` and `CONTRIBUTORS.md` --- CONTRIBUTORS.md | 2 +- README.md | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 5df27157..619e1c13 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -6,7 +6,7 @@ Many thanks to the following developers for contributing to this project: - [C. W.](https://github.com/chfw) - [Diego Argueta](https://github.com/dargueta) - [Geoff Jukes](https://github.com/geoffjukes) -- [Giampaolo](https://github.com/gpcimino) +- [Giampaolo Cimino](https://github.com/gpcimino) - [Justin Charlong](https://github.com/jcharlong) - [Louis Sautier](https://github.com/sbraz) - [Martin Larralde](https://github.com/althonos) diff --git a/README.md b/README.md index fbd6b200..787b29ec 100644 --- a/README.md +++ b/README.md @@ -95,10 +95,11 @@ The following developers have contributed code and their time to this projects: - [Will McGugan](https://github.com/willmcgugan) - [Martin Larralde](https://github.com/althonos) -- [Giampaolo](https://github.com/gpcimino) +- [Giampaolo Cimino](https://github.com/gpcimino) - [Geoff Jukes](https://github.com/geoffjukes) -See CONTRIBUTORS.md for a full list of contributors. +See [CONTRIBUTORS.md](https://github.com/PyFilesystem/pyfilesystem2/blob/master/CONTRIBUTORS.md) +for a full list of contributors. PyFilesystem2 owes a massive debt of gratitude to the following developers who contributed code and ideas to the original version. From 6f234fac9d230c5490013279a1dee8b65b4b1a10 Mon Sep 17 00:00:00 2001 From: Martin Larralde Date: Sun, 18 Oct 2020 15:28:55 +0200 Subject: [PATCH 06/10] Make Travis-CI build against Python 3.9 development version --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 72437a67..21a020fa 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,6 +9,7 @@ python: - "3.6" - "3.7" - "3.8" + - "3.9-dev" - "pypy" - "pypy3.5-7.0" # Need 7.0+ due to a bug in earlier versions that broke our tests. From 480bc6ed61db67eee59d8668eab700444d08c276 Mon Sep 17 00:00:00 2001 From: Martin Larralde Date: Sun, 18 Oct 2020 15:48:30 +0200 Subject: [PATCH 07/10] Fix `setup.py` to work with Python 2.7 --- setup.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index ac42fe2c..756c6bef 100644 --- a/setup.py +++ b/setup.py @@ -1,4 +1,9 @@ #!/usr/bin/env python +import os + +with open(os.path.join("fs", "_version.py")) as f: + exec(f.read()) + from setuptools import setup -setup() +setup(version=__version__) From c17b4680f616000bcc27aa43d1ceab6c1869f773 Mon Sep 17 00:00:00 2001 From: Martin Larralde Date: Wed, 13 Jan 2021 15:00:04 +0100 Subject: [PATCH 08/10] Add Python 3.9 to the supported versions in `setup.cfg` --- CHANGELOG.md | 2 +- setup.cfg | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c50b777b..b16e84a9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,7 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/). -## [2.4.12] - 2020-10-18 +## [2.4.12] - 2021-01-13 ### Added diff --git a/setup.cfg b/setup.cfg index 9a58e9ee..24c9f3d7 100644 --- a/setup.cfg +++ b/setup.cfg @@ -27,6 +27,7 @@ classifiers = Programming Language :: Python :: 3.6 Programming Language :: Python :: 3.7 Programming Language :: Python :: 3.8 + Programming Language :: Python :: 3.9 Programming Language :: Python :: Implementation :: CPython Programming Language :: Python :: Implementation :: PyPy Topic :: System :: Filesystems From f4fa74de879f1b2e077086e6d97e874c24f22cf6 Mon Sep 17 00:00:00 2001 From: Martin Larralde Date: Wed, 13 Jan 2021 15:02:04 +0100 Subject: [PATCH 09/10] Bump year in `LICENSE` file --- LICENSE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LICENSE b/LICENSE index 6f1b27cc..34845692 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2017-2020 The PyFilesystem2 contributors +Copyright (c) 2017-2021 The PyFilesystem2 contributors Copyright (c) 2016-2019 Will McGugan Permission is hereby granted, free of charge, to any person obtaining a copy From a55c9ff248fae36cddb1004a3f9dcbb631b3a759 Mon Sep 17 00:00:00 2001 From: Martin Larralde Date: Thu, 14 Jan 2021 14:55:07 +0100 Subject: [PATCH 10/10] Add a CI stage deploying tagged commits to PyPI using `twine` --- .travis.yml | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 21a020fa..89b1cce9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,7 +9,7 @@ python: - "3.6" - "3.7" - "3.8" - - "3.9-dev" + - "3.9" - "pypy" - "pypy3.5-7.0" # Need 7.0+ due to a bug in earlier versions that broke our tests. @@ -36,8 +36,22 @@ before_install: install: - pip install -e . +# command to run tests +script: tox + after_success: - coveralls -# command to run tests -script: tox +before_deploy: + - pip install -U twine wheel + - python setup.py sdist bdist_wheel + +deploy: + provider: script + script: twine upload dist/* + skip_cleanup: true + on: + python: 3.9 + tags: true + repo: PyFilesystem/pyfilesystem2 +