aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--AUTHORS.md1
-rw-r--r--CONTRIBUTING.md41
-rw-r--r--README.rst37
-rw-r--r--appveyor.yml11
-rw-r--r--dateutil/parser/_parser.py18
5 files changed, 73 insertions, 35 deletions
diff --git a/AUTHORS.md b/AUTHORS.md
index 58786b6..12545a2 100644
--- a/AUTHORS.md
+++ b/AUTHORS.md
@@ -30,6 +30,7 @@ switch, and thus all their contributions are dual-licensed.
- David Lehrian <david@MASKED>
- Dominik Kozaczko <dominik@MASKED>
- Elvis Pranskevichus <el@MASKED>
+- Florian Rathgeber (gh: @kynan)
- Gabriel Poesia <gabriel.poesia@MASKED>
- Gustavo Niemeyer <gustavo@niemeyer.net> (gh: @niemeyer)
- Holger Joukl <holger.joukl@MASKED> (gh: @hjoukl)
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 755379c..79584e7 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -3,6 +3,7 @@
This document outlines the ways to contribute to `python-dateutil`. This is a fairly small, low-traffic project, so most of the contribution norms (coding style, acceptance criteria) have been developed ad hoc and this document will not be exhaustive. If you are interested in contributing code or documentation, please take a moment to at least review the license section to understand how your code will be licensed.
## Types of contribution
+
### Bug reports
Bug reports are an important type of contribution - it's important to get feedback about how the library is failing, and there's no better way to do that than to hear about real-life failure cases. A good bug report will include:
@@ -31,3 +32,43 @@ The most important thing to include in your pull request are *tests* - please wr
Starting December 1, 2017, all contributions will be assumed to be released under a dual license - the [Apache 2.0 License](https://www.apache.org/licenses/LICENSE-2.0) and the [3-Clause BSD License](https://opensource.org/licenses/BSD-3-Clause) unless otherwise specified in the pull request.
All contributions before December 1, 2017 except those explicitly relicensed, are only under the 3-clause BSD license.
+
+## Building and releasing
+
+When you get the source, it does not contain the internal zoneinfo
+database. To get (and update) the database, run the updatezinfo.py script. Make sure
+that the zic command is in your path, and that you have network connectivity
+to get the latest timezone information from IANA, or from [our mirror of the
+IANA database](https://dateutil.github.io/tzdata/).
+
+## Development Setup
+
+Install the the dependencies for running the test suite using `pip` or `conda`.
+
+### pip
+
+Run the following commands to create a [virtual environment](https://virtualenv.pypa.io) with all dependencies installed:
+
+ python -m virtualenv .venv # Create virtual environment in .venv directory
+ . .venv/bin/activate # Activate the virtual environment
+ pip install -r requirements.txt # Install the dependencies
+
+### conda
+
+Run the following commands to create a [conda environment](https://conda.io) with all dependencies installed:
+
+ conda create -n dateutil # Create a conda environment
+ # conda create -n dateutil python=3.6 # or specify a version
+ source activate dateutil # Activate the conda environment
+ pip install -r requirements.txt # Install the dependencies
+
+## Testing
+
+dateutil has a comprehensive test suite, which can be run simply by running
+`python -m pytest` in the project root. Note that if you don't have the internal
+zoneinfo database, some tests will fail. Apart from that, all tests should pass.
+
+To easily test dateutil against all supported Python versions, you can use
+[tox](https://tox.readthedocs.io/en/latest/).
+
+All GitHub pull requests are automatically tested using travis and appveyor. \ No newline at end of file
diff --git a/README.rst b/README.rst
index 2a1b4a0..2d55560 100644
--- a/README.rst
+++ b/README.rst
@@ -93,6 +93,11 @@ date out of the "date" unix system command. Here is the code:
Being exactly 6 months ahead was **really** a coincidence :)
+Contributing
+============
+
+We welcome many types of contributions - bug reports, pull requests (code, infrastructure or documentation fixes). For more information about how to contribute to the project, see the ``CONTRIBUTING.md`` file in the repository.
+
Author
======
@@ -106,16 +111,9 @@ It is maintained by:
* Yaron de Leeuw <me@jarondl.net> 2014-2016
* Paul Ganssle <paul@ganssle.io> 2015-
-Our mailing list is available at `dateutil@python.org <https://mail.python.org/mailman/listinfo/dateutil>`_. As it is hosted by the PSF, it is subject to the `PSF code of
-conduct <https://www.python.org/psf/codeofconduct/>`_.
-
-Building and releasing
-======================
-When you get the source, it does not contain the internal zoneinfo
-database. To get (and update) the database, run the updatezinfo.py script. Make sure
-that the zic command is in your path, and that you have network connectivity
-to get the latest timezone information from IANA, or from `our mirror of the
-IANA database <https://dateutil.github.io/tzdata/>`_.
+Starting with version 2.4.1, all source and binary distributions will be signed
+by a PGP key that has, at the very least, been signed by the key which made the
+previous release. A table of release signing keys can be found below:
Starting with version 2.4.1, all source and binary distributions will be signed
by a PGP key that has, at the very least, been signed by the key which made the
@@ -127,24 +125,17 @@ Releases Signing key fingerprint
2.4.1- `6B49 ACBA DCF6 BD1C A206 67AB CD54 FCE3 D964 BEFB`_
=========== ============================
-Testing
-=======
-dateutil has a comprehensive test suite, which can be run simply by running
-`python -m pytest` in the project root. Note that if you don't have the internal
-zoneinfo database, some tests will fail. Apart from that, all tests should pass.
-
-To easily test dateutil against all supported Python versions, you can use
-`tox <https://tox.readthedocs.io/en/latest/>`_.
-
-All github pull requests are automatically tested using travis and appveyor.
+Contact
=======
+Our mailing list is available at `dateutil@python.org <https://mail.python.org/mailman/listinfo/dateutil>`_. As it is hosted by the PSF, it is subject to the `PSF code of
+conduct <https://www.python.org/psf/codeofconduct/>`_.
+
License
=======
All contributions after December 1, 2017 released under dual license - either `Apache 2.0 License <https://www.apache.org/licenses/LICENSE-2.0>`_ or the `BSD 3-Clause License <https://opensource.org/licenses/BSD-3-Clause>`_. Contributions before December 1, 2017 - except those those explicitly relicensed - are released only under the BSD 3-Clause License.
-.. _6B49 ACBA DCF6 BD1C A206 67AB CD54 FCE3 D964 BEFB:
- https://pgp.mit.edu/pks/lookup?op=vindex&search=0xCD54FCE3D964BEFB
-
+.. _6B49 ACBA DCF6 BD1C A206 67AB CD54 FCE3 D964 BEFB:
+ https://pgp.mit.edu/pks/lookup?op=vindex&search=0xCD54FCE3D964BEFB \ No newline at end of file
diff --git a/appveyor.yml b/appveyor.yml
index 8abb7b0..9104a52 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -7,12 +7,19 @@ environment:
- PYTHON_VERSION: 35
- PYTHON_VERSION: 36
platform:
- - x86
- x64
+ - x86
matrix:
fast_finish: true
-
+ exclude:
+ - platform: x86
+ PYTHON_VERSION: 33
+ - platform: x86
+ PYTHON_VERSION: 34
+ - platform: x86
+ PYTHON_VERSION: 35
+
install:
# set env variables
- set TOXENV=py%PYTHON_VERSION%
diff --git a/dateutil/parser/_parser.py b/dateutil/parser/_parser.py
index a15624c..f5b5e9d 100644
--- a/dateutil/parser/_parser.py
+++ b/dateutil/parser/_parser.py
@@ -326,19 +326,17 @@ class parserinfo(object):
return name.lower() in self._jump
def weekday(self, name):
- if len(name) >= min(len(n) for n in self._weekdays.keys()):
- try:
- return self._weekdays[name.lower()]
- except KeyError:
- pass
+ try:
+ return self._weekdays[name.lower()]
+ except KeyError:
+ pass
return None
def month(self, name):
- if len(name) >= min(len(n) for n in self._months.keys()):
- try:
- return self._months[name.lower()] + 1
- except KeyError:
- pass
+ try:
+ return self._months[name.lower()] + 1
+ except KeyError:
+ pass
return None
def hms(self, name):