← All tasks
pythonboto/botocore #1429Not a task: not reproduced

Relax upper bound on python-dateutil

envgap__boto__botocore-1429

01 / FAILURE SIGNATURE

As reported upstream

No identifying execution failure has been captured.
Not a benchmark task.
  • In a clean container the reported failure did not reproduce, or the known fix did not make the project run.

02 / ENVIRONMENT RECIPE

Base commit
20430b515e12b2732792ece3ca5e2cce3b7cdbfe
Manifest
requirements.txt
Reproduce
Awaiting issue-specific recipe
Run under trace
Awaiting a meaningful runtime command

03 / ORIGINAL ISSUE TEXT

boto/botocore #1429 · read the original issue
PR #1402 was over-zealous in tightening the upper bound on `python-dateutil`. As you can see in that thread and in #1406, this is causing problems for a lot of people, apparently.



As [my comment on 1406 indicates](https://github.com/boto/botocore/pull/1406#issuecomment-377535983), I think that it *should* be fine to just revert #1402 because `python-dateutil` declares `Requires-Python`. That said, the "belt and suspenders" approach for people stuck with a version of `pip` that does not support `Requires-Python` would be to add conditional requirements in [`requires`](https://github.com/boto/botocore/blob/develop/setup.py#L26):



```python

requires = ['jmespath>=0.7.1,<1.0.0',

            "python-dateutil>=2.1,<2.7.0; python_version == '2.6'",

            "python-dateutil>=2.1,<3.0.0; python_version >= '2.7'",

            'docutils>=0.10']

```



While you're at it, I think using an `if` statement on `sys.version_info` in `setup.py` is *also* the wrong thing to do here, because the version that executes `setup.py` is often but not always the same version that the package is being installed for:



```python

requires = ['jmespath>=0.7.1,<1.0.0',

            'docutils>=0.10',

            # python-dateutil dropped support for Python 2.6 in version 2.7.0

            'python-dateutil>=2.1,<2.7.0; python_version == "2.6"',

            'python-dateutil>=2.1,<3.0.0; python_version >= "2.7"',

            # For python2.6 we have a few other dependencies.

            # First we need an ordered dictionary so we use the

            # 2.6 backport.

            'ordereddict==1.1; python_version == "2.6"',

            # Then we need simplejson.  This is because we need

            # a json version that allows us to specify we want to

            # use an ordereddict instead of a normal dict for the

            # JSON objects.  The 2.7 json module has this.  For 2.6

            # we need simplejson.

            'simplejson==3.3.0; python_version== "2.6"'

            ]

```

Continue on GitHub ↗

04 / LABELS

Labels from the report text only; not yet run

No supported category has been assigned.

Label rules and the text that matched
[]