Repository: scrapy/scrapy

Issue:
Python3.3 support and requirements without it
Scrapy still supports py3.3 (at least according to its trove classifiers in setup.py and the CI conf)
but some of its dependencies dropped support some time ago.
https://github.com/pyca/service_identity/blob/master/CHANGELOG.rst#backward-incompatible-changes-1
https://github.com/pyca/cryptography/blob/master/CHANGELOG.rst#20---2017-07-17

This caused some problems when testing scrapy daemon with py3.3,
which was resolved by installing the [enum-compat virtual package](https://pypi.python.org/pypi/enum-compat/0.0.2)

There are several options here.
scrapy1.5 can drop support for python3.3,
scrapy1.4 can restrict the max versions for those dependencies
and enum-compat can become a requirement,
although there may be more things broken.

I didn't figure out why the python3.3 build for scrapy doesn't fail
but here is a failed scrapyd build https://travis-ci.org/scrapy/scrapyd/jobs/299029712


Discussion:
I'm fine with dropping Python 3.3, Ubuntu 12.04 and Debian Wheezy support (they are all mentioned in our install docs). AFAIK baseline is Debian Jessie and Ubuntu 14.04 anyways, and Ubuntu 12.04 has Python 3.2, not 3.3. If I'm not mistaken, we were supporting Python 3.3 because it was costing us nothing, not because of a real need to do so. //cc @dangra 
> scrapy1.4 can restrict the max versions for those dependencies

but it must limit deps versions only for python 3.3.
A possible solution could be [environment markers](https://www.python.org/dev/peps/pep-0508/#environment-markers), but now we depend on systems to ship updated setuptools that understand env markers.

My vote is to drop support too.
Hey @dangra can you confirm which are the steps to drop the support?

* Remove mentions to Python 3.3 in the docs
* Remove the mentions to Ubuntu 12.04 and Debian Wheezy
* Change the CI script to not test using Python 3.3 anymore 

If the steps above are a good start point I can start working in a PR
@raphapassini that should be it. thanks
Yeah, sounds fine. It also worths checking requirements.txt - we may be supporting old versions of packages because they were defaults in old distributions.
By the way, here's the pip installs for scrapy from PyPI for the last month (via `pypinfo --percent --pip --markdown scrapy pyversion`), supporting ditching Python 3.3:

| python_version | percent | download_count |
| -------------- | ------: | -------------: |
| 2.7            |   60.5% |         57,174 |
| 3.6            |   23.1% |         21,817 |
| 3.5            |   10.0% |          9,470 |
| 3.4            |    5.7% |          5,417 |
| 3.7            |    0.4% |            339 |
| 2.6            |    0.2% |            162 |
| 3.3            |    0.1% |             56 |
| 3.2            |    0.0% |              6 |
| None           |    0.0% |              1 |
| 2.8            |    0.0% |              1 |

I'd recommend adding `python_requires` to setup.py, for example:
```python
python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*',
```
(More info: https://stackoverflow.com/a/44660547/724176)

Resolving patch:
diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -53,7 +53,6 @@ def has_environment_marker_platform_impl_support():
         'Programming Language :: Python :: 2',
         'Programming Language :: Python :: 2.7',
         'Programming Language :: Python :: 3',
-        'Programming Language :: Python :: 3.3',
         'Programming Language :: Python :: 3.4',
         'Programming Language :: Python :: 3.5',
         'Programming Language :: Python :: 3.6',
@@ -61,6 +60,7 @@ def has_environment_marker_platform_impl_support():
         'Topic :: Software Development :: Libraries :: Application Frameworks',
         'Topic :: Software Development :: Libraries :: Python Modules',
     ],
+    python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*',
     install_requires=[
         'Twisted>=13.1.0',
         'w3lib>=1.17.0',


Test patch: