From 6746b2540dbf4f7a1389b499f2fd1fe3fca6d854 Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Sat, 27 May 2017 22:55:22 -0400 Subject: [PATCH 01/15] faster --- Pipfile | 14 ------ Pipfile.lock | 116 ----------------------------------------------- requirements.txt | 12 +++-- 3 files changed, 8 insertions(+), 134 deletions(-) delete mode 100644 Pipfile delete mode 100644 Pipfile.lock diff --git a/Pipfile b/Pipfile deleted file mode 100644 index 2bf3c273..00000000 --- a/Pipfile +++ /dev/null @@ -1,14 +0,0 @@ -[[source]] -url = "https://pypi.python.org/simple" -verify_ssl = true - -[dev-packages] -pytest = ">=2.8.0" -codecov = "*" -pytest-httpbin = "==0.0.7" -pytest-mock = "*" -pytest-cov = "*" -alabaster = "*" -readme_renderer = "*" -Sphinx = "<=1.5.5" -PySocks = "*" \ No newline at end of file diff --git a/Pipfile.lock b/Pipfile.lock deleted file mode 100644 index 1652b05b..00000000 --- a/Pipfile.lock +++ /dev/null @@ -1,116 +0,0 @@ -{ - "_meta": { - "hash": { - "sha256": "a26ef57f42fa3da7d70d1c1decb4e6445a6ff66e47c9094ddc9ab8e1f4c0a5b6" - }, - "requires": {}, - "sources": [ - { - "url": "https://pypi.python.org/simple", - "verify_ssl": true - } - ] - }, - "default": {}, - "develop": { - "alabaster": { - "version": "==0.7.10" - }, - "appdirs": { - "version": "==1.4.3" - }, - "babel": { - "version": "==2.4.0" - }, - "click": { - "version": "==6.7" - }, - "codecov": { - "version": "==2.0.9" - }, - "coverage": { - "version": "==4.4.1" - }, - "decorator": { - "version": "==4.0.11" - }, - "docutils": { - "version": "==0.13.1" - }, - "flask": { - "version": "==0.12.2" - }, - "funcsigs": { - "version": "==1.0.2" - }, - "httpbin": { - "version": "==0.5.0" - }, - "imagesize": { - "version": "==0.7.1" - }, - "itsdangerous": { - "version": "==0.24" - }, - "jinja2": { - "version": "==2.9.6" - }, - "markupsafe": { - "version": "==1.0" - }, - "mock": { - "version": "==2.0.0" - }, - "packaging": { - "version": "==16.8" - }, - "pbr": { - "version": "==3.0.0" - }, - "py": { - "version": "==1.4.33" - }, - "pygments": { - "version": "==2.2.0" - }, - "pyparsing": { - "version": "==2.2.0" - }, - "pysocks": { - "version": "==1.6.7" - }, - "pytest": { - "version": "==3.0.7" - }, - "pytest-cov": { - "version": "==2.5.1" - }, - "pytest-httpbin": { - "version": "==0.0.7" - }, - "pytest-mock": { - "version": "==1.6.0" - }, - "pytz": { - "version": "==2017.2" - }, - "requests": { - "version": "==2.14.2" - }, - "setuptools": { - "version": "==35.0.2" - }, - "six": { - "version": "==1.10.0" - }, - "snowballstemmer": { - "version": "==1.2.1" - }, - "sphinx": { - "version": "==1.5.5" - }, - "werkzeug": { - "version": "==0.12.2" - } - } -} diff --git a/requirements.txt b/requirements.txt index a54ac96b..8a4b23bc 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,10 @@ -e .[socks] -pytest==3.1.0 -pytest-cov==2.5.1 +pytest>=2.8.0 +codecov pytest-httpbin==0.0.7 -pytest-mock==1.6.0 -pytest-xdist==1.16.0 \ No newline at end of file +pytest-mock +pytest-cov +alabaster +readme_renderer +Sphinx<=1.5.5 +PySocks \ No newline at end of file From 2758b8b0f029abb9166eb1f124dcabe1bd35e949 Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Sat, 27 May 2017 22:56:43 -0400 Subject: [PATCH 02/15] improve speed of travis-ci --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index e456e0cd..4617621c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,7 +7,7 @@ python: - "3.4" - "3.5" - "3.6" - - "3.7-dev" + # - "3.7-dev" # - "pypy" -- appears to hang # - "pypy3" # command to install dependencies From 0ff28d7421ad6a0b40c35c0c92821d1cc5a050b5 Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Sat, 27 May 2017 22:57:45 -0400 Subject: [PATCH 03/15] faster --- Makefile | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/Makefile b/Makefile index 8c07cdef..d5d9fb2a 100644 --- a/Makefile +++ b/Makefile @@ -1,23 +1,15 @@ .PHONY: docs -init: - pip install pipenv - pipenv install --dev - pipenv run pip install -e .[socks] - test: # This runs all of the tests. To run an individual test, run py.test with # the -k flag, like "py.test -k test_path_is_not_double_encoded" - pipenv run py.test tests + py.test tests test-readme: - pipenv run python setup.py check -r -s + python setup.py check -r -s coverage: - pipenv run py.test --cov-config .coveragerc --verbose --cov-report term --cov-report xml --cov=requests tests - -certs: - curl http://ci.kennethreitz.org/job/ca-bundle/lastSuccessfulBuild/artifact/cacerts.pem -o requests/cacert.pem + py.test --cov-config .coveragerc --verbose --cov-report term --cov-report xml --cov=requests tests publish: pip install 'twine>=1.5.0' From 3d425ac19179979fbfb8712f34ee6be6565808b2 Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Sat, 27 May 2017 23:00:30 -0400 Subject: [PATCH 04/15] try this --- Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index d5d9fb2a..18181718 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,6 @@ .PHONY: docs - +init: + pip install -e .[socks] test: # This runs all of the tests. To run an individual test, run py.test with # the -k flag, like "py.test -k test_path_is_not_double_encoded" From 6abe1ff9334a67e4781b8eca541dbd892af7fa58 Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Sat, 27 May 2017 23:02:45 -0400 Subject: [PATCH 05/15] update --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 18181718..4eabd3f5 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,7 @@ init: test: # This runs all of the tests. To run an individual test, run py.test with # the -k flag, like "py.test -k test_path_is_not_double_encoded" - py.test tests + python setup.py test test-readme: python setup.py check -r -s From 141ce93445da56330fea45916390940017ef2c7d Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Sat, 27 May 2017 23:04:12 -0400 Subject: [PATCH 06/15] test --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 4617621c..33933465 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,7 +16,7 @@ install: "make" script: - | if [[ "$TRAVIS_PYTHON_VERSION" != "2.6" ]] ; then make test-readme; fi - - make coverage + - make test after_success: - pipenv run codecov cache: pip From 68fda6bcf297c7f1ab3e05eaa628771bfa970509 Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Sat, 27 May 2017 23:07:24 -0400 Subject: [PATCH 07/15] see if that fixes things --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index bfa7e152..c759d346 100755 --- a/setup.py +++ b/setup.py @@ -44,7 +44,7 @@ requires = [ 'certifi>=2017.4.17' ] -test_requirements = ['pytest>=2.8.0', 'pytest-httpbin==0.0.7', 'pytest-cov', 'pytest-mock', 'pytest-xdist', 'PySocks>=1.5.6, !=1.5.7'] +test_requirements = ['pytest-httpbin==0.0.7', 'pytest-cov', 'pytest-mock', 'pytest-xdist', 'PySocks>=1.5.6, !=1.5.7', 'pytest>=2.8.0'] about = {} with open(os.path.join(here, 'requests', '__version__.py'), 'r', 'utf-8') as f: From dc70edf17d3975857de5d89a1cbe95c0cc157d67 Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Sat, 27 May 2017 23:09:38 -0400 Subject: [PATCH 08/15] try this --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 4eabd3f5..601d7153 100644 --- a/Makefile +++ b/Makefile @@ -1,10 +1,10 @@ .PHONY: docs init: - pip install -e .[socks] + pip install -r requirements.txt test: # This runs all of the tests. To run an individual test, run py.test with # the -k flag, like "py.test -k test_path_is_not_double_encoded" - python setup.py test + py.test tests -n 8 --boxed test-readme: python setup.py check -r -s From a00d14a61f5d10cfe335f068f6e320beef090332 Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Sat, 27 May 2017 23:11:01 -0400 Subject: [PATCH 09/15] pytest --- requirements.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/requirements.txt b/requirements.txt index 8a4b23bc..8a824ffd 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,6 +4,7 @@ codecov pytest-httpbin==0.0.7 pytest-mock pytest-cov +pytest-xdist alabaster readme_renderer Sphinx<=1.5.5 From b565b79858a88652b1119674f7145c1357fcbb99 Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Sat, 27 May 2017 23:14:06 -0400 Subject: [PATCH 10/15] skip that --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 601d7153..1989d372 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,7 @@ init: test: # This runs all of the tests. To run an individual test, run py.test with # the -k flag, like "py.test -k test_path_is_not_double_encoded" - py.test tests -n 8 --boxed + py.test tests test-readme: python setup.py check -r -s From 94331723d18083dea9ee9d198c5aba1905fcf41c Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Sat, 27 May 2017 23:19:59 -0400 Subject: [PATCH 11/15] try again --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 1989d372..601d7153 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,7 @@ init: test: # This runs all of the tests. To run an individual test, run py.test with # the -k flag, like "py.test -k test_path_is_not_double_encoded" - py.test tests + py.test tests -n 8 --boxed test-readme: python setup.py check -r -s From 7384fe71d6620b2478d250e504aca1e6e44a3d7a Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Sat, 27 May 2017 23:22:49 -0400 Subject: [PATCH 12/15] let's see what this breaks --- requirements.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 8a824ffd..b5076003 100644 --- a/requirements.txt +++ b/requirements.txt @@ -8,4 +8,5 @@ pytest-xdist alabaster readme_renderer Sphinx<=1.5.5 -PySocks \ No newline at end of file +PySocks +setuptools>=18.5 \ No newline at end of file From 679d368e3edebe3bfc03db5e0a275c572056dad6 Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Sat, 27 May 2017 23:27:38 -0400 Subject: [PATCH 13/15] setup.py improvements --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index c759d346..a316402e 100755 --- a/setup.py +++ b/setup.py @@ -16,7 +16,7 @@ class PyTest(TestCommand): def initialize_options(self): TestCommand.initialize_options(self) - self.pytest_args = [] + self.pytest_args = ['-n', '8', '--boxed'] def finalize_options(self): TestCommand.finalize_options(self) From 458008653c39285c6f2d71552d5ea91b6a56ed9c Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Sat, 27 May 2017 23:33:13 -0400 Subject: [PATCH 14/15] detox --- Makefile | 2 +- requirements.txt | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 601d7153..32219eee 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,7 @@ init: test: # This runs all of the tests. To run an individual test, run py.test with # the -k flag, like "py.test -k test_path_is_not_double_encoded" - py.test tests -n 8 --boxed + detox test-readme: python setup.py check -r -s diff --git a/requirements.txt b/requirements.txt index b5076003..093f45ed 100644 --- a/requirements.txt +++ b/requirements.txt @@ -9,4 +9,6 @@ alabaster readme_renderer Sphinx<=1.5.5 PySocks -setuptools>=18.5 \ No newline at end of file +setuptools>=18.5 +tox +detox \ No newline at end of file From 8d0c2537ee3769de6ef9264427cb7020a6d27a96 Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Sat, 27 May 2017 23:34:56 -0400 Subject: [PATCH 15/15] better comments --- Makefile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 32219eee..5f161c8a 100644 --- a/Makefile +++ b/Makefile @@ -2,8 +2,7 @@ init: pip install -r requirements.txt test: - # This runs all of the tests. To run an individual test, run py.test with - # the -k flag, like "py.test -k test_path_is_not_double_encoded" + # This runs all of the tests, on both Python 2 and Python 3. detox test-readme: