summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGerhard Weis <g.weis@uq.edu.au>2021-12-13 08:43:12 +1000
committerGerhard Weis <g.weis@uq.edu.au>2021-12-13 08:43:12 +1000
commit6bebac0913c431a0406c7851e2d3356822b59baa (patch)
tree544e5ada1e41df89a63dcb4799a0eaceb97fa77e
parentdc0d2b81e5c749fe70f50d5f024ff007f8798bba (diff)
parent04a2c1c4839109517fc8453ed815726f6ba88c9f (diff)
downloadisodate-6bebac0913c431a0406c7851e2d3356822b59baa.tar.gz
Merge branch 'PR60'
* PR60: Use non-beta Python 3.8 on Travis Use Python 3.8 beta on Travis PEP8: 79 chars Use Xenial on Travis to test on Python3.7 Fix Python 3.8 DeprecationWarning Add support for py37 and py38 Raise warnings produced by isodate as errors during tests Avoid unclosed file warning # Conflicts: # .travis.yml # setup.py # src/isodate/duration.py # src/isodate/tests/__init__.py # tox.ini
-rw-r--r--setup.py70
-rw-r--r--src/isodate/tests/__init__.py3
-rw-r--r--tox.ini2
3 files changed, 39 insertions, 36 deletions
diff --git a/setup.py b/setup.py
index ba6627c..d5a3427 100644
--- a/setup.py
+++ b/setup.py
@@ -4,41 +4,39 @@ from setuptools import setup
def read(*rnames):
- return open(os.path.join(os.path.dirname(__file__), *rnames)).read()
+ with open(os.path.join(os.path.dirname(__file__), *rnames)) as read_file:
+ return read_file.read()
-setup(name='isodate',
- version='0.7.0.dev0',
- packages=['isodate', 'isodate.tests'],
- package_dir={'': 'src'},
-
- # PyPI metadata
- author='Gerhard Weis',
- author_email='gerhard.weis@proclos.com',
- description='An ISO 8601 date/time/duration parser and formatter',
- license='BSD-3-Clause',
- license_files = ('LICENSE',),
- # keywords = '',
- url='https://github.com/gweis/isodate/',
-
- long_description=(read('README.rst') +
- read('CHANGES.txt') +
- read('TODO.txt')),
-
- classifiers=['Development Status :: 4 - Beta',
- # 'Environment :: Web Environment',
- 'Intended Audience :: Developers',
- 'License :: OSI Approved :: BSD License',
- 'Operating System :: OS Independent',
- 'Programming Language :: Python',
- 'Programming Language :: Python :: 3',
- 'Programming Language :: Python :: 3.7',
- 'Programming Language :: Python :: 3.8',
- 'Programming Language :: Python :: 3.9',
- 'Programming Language :: Python :: 3.10',
- 'Programming Language :: Python :: Implementation :: PyPy',
- 'Topic :: Internet',
- ('Topic :: Software Development :'
- ': Libraries :: Python Modules'),
- ],
- test_suite='isodate.tests.test_suite')
+setup(
+ name="isodate",
+ version="0.7.0.dev0",
+ packages=["isodate", "isodate.tests"],
+ package_dir={"": "src"},
+ # PyPI metadata
+ author="Gerhard Weis",
+ author_email="gerhard.weis@proclos.com",
+ description="An ISO 8601 date/time/duration parser and formatter",
+ license="BSD-3-Clause",
+ license_files=("LICENSE",),
+ # keywords = '',
+ url="https://github.com/gweis/isodate/",
+ long_description=(read("README.rst") + read("CHANGES.txt") + read("TODO.txt")),
+ classifiers=[
+ "Development Status :: 4 - Beta",
+ # 'Environment :: Web Environment',
+ "Intended Audience :: Developers",
+ "License :: OSI Approved :: BSD License",
+ "Operating System :: OS Independent",
+ "Programming Language :: Python",
+ "Programming Language :: Python :: 3",
+ "Programming Language :: Python :: 3.7",
+ "Programming Language :: Python :: 3.8",
+ "Programming Language :: Python :: 3.9",
+ "Programming Language :: Python :: 3.10",
+ "Programming Language :: Python :: Implementation :: PyPy",
+ "Topic :: Internet",
+ ("Topic :: Software Development :" ": Libraries :: Python Modules"),
+ ],
+ test_suite="isodate.tests.test_suite",
+)
diff --git a/src/isodate/tests/__init__.py b/src/isodate/tests/__init__.py
index f68a79b..ea0f433 100644
--- a/src/isodate/tests/__init__.py
+++ b/src/isodate/tests/__init__.py
@@ -3,6 +3,7 @@ Collect all test suites into one TestSuite instance.
"""
import unittest
+import warnings
from isodate.tests import (
test_date,
test_time,
@@ -17,6 +18,8 @@ def test_suite():
"""
Return a new TestSuite instance consisting of all available TestSuites.
"""
+ warnings.filterwarnings("error", module=r"isodate(\..)*")
+
return unittest.TestSuite(
[
test_date.test_suite(),
diff --git a/tox.ini b/tox.ini
index 4410e0f..322d454 100644
--- a/tox.ini
+++ b/tox.ini
@@ -5,6 +5,8 @@ envlist =
[testenv]
deps =
+setenv =
+ PYTHONWARNINGS = default
commands =
{envpython} setup.py test
pip install --quiet coverage