From 461e94d8e97a7879f7ee117d8fdffcb9d4de77e9 Mon Sep 17 00:00:00 2001 From: blag Date: Wed, 22 Jul 2020 14:16:49 -0700 Subject: [PATCH 1/4] Switch requirements.txt to requirements.in and pin parsedatetime to <2.6 due to bug --- requirements.in | 21 +++++++++++++++++++++ requirements.txt | 19 +++++++++++++++++-- 2 files changed, 38 insertions(+), 2 deletions(-) create mode 100644 requirements.in diff --git a/requirements.in b/requirements.in new file mode 100644 index 0000000..6450879 --- /dev/null +++ b/requirements.in @@ -0,0 +1,21 @@ +manageiq-client>=0.3.0 + +# Pin parsedatetime to < 2.6 avoid this issue on Python 2.7: +# +# https://github.com/bear/parsedatetime/issues/245 +# https://github.com/bear/parsedatetime/issues/246 +# https://github.com/bear/parsedatetime/issues/251 +# +# Waiting on #247 for a proper fix: +# +# https://github.com/bear/parsedatetime/pull/247 - proper fix +# https://github.com/bear/parsedatetime/pull/248 - bad fix +# +parsedatetime<2.6 + +# Can also use environment markers to install different versions for Python 2 +# and Python 3: +#parsedatetime<2.6; python_version < "3" +#parsedatetime; python_version >= "3" + +wait-for<1.1 # Version 1.1 dropped Python 2.7 support diff --git a/requirements.txt b/requirements.txt index 02ef945..84afeaa 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,2 +1,17 @@ -manageiq-client>=0.3.0 -wait-for==1.0.14 \ No newline at end of file +# +# This file is autogenerated by pip-compile +# To update, run: +# +# pip-compile requirements.in +# +certifi==2020.6.20 # via requests +chardet==3.0.4 # via requests +idna==2.10 # via requests +iso8601==0.1.12 # via manageiq-client +manageiq-client==0.6.1 # via -r requirements.in +parsedatetime==2.5 # via -r requirements.in, wait-for +requests==2.24.0 # via manageiq-client +simplejson==3.17.2 # via manageiq-client +six==1.15.0 # via manageiq-client, wait-for +urllib3==1.25.10 # via requests +wait-for==1.0.14 # via -r requirements.in, manageiq-client From 396af512ac67a93ab9a4c150b2b64652b40d91af Mon Sep 17 00:00:00 2001 From: blag Date: Wed, 22 Jul 2020 14:17:21 -0700 Subject: [PATCH 2/4] Convert requirements-tests.txt to requirements-tests.in --- requirements-tests.in | 3 +++ requirements-tests.txt | 19 +++++++++++++++---- 2 files changed, 18 insertions(+), 4 deletions(-) create mode 100644 requirements-tests.in diff --git a/requirements-tests.in b/requirements-tests.in new file mode 100644 index 0000000..d08293b --- /dev/null +++ b/requirements-tests.in @@ -0,0 +1,3 @@ +mock>=1.3.0,<2.0 +unittest2>=1.1.0,<2.0 +nose>=1.3.7 diff --git a/requirements-tests.txt b/requirements-tests.txt index ba9c1e7..881805b 100644 --- a/requirements-tests.txt +++ b/requirements-tests.txt @@ -1,4 +1,15 @@ -mock>=1.3.0,<2.0 -unittest2>=1.1.0,<2.0 -nose>=1.3.7 - +# +# This file is autogenerated by pip-compile +# To update, run: +# +# pip-compile requirements-tests.in +# +argparse==1.4.0 # via unittest2 +funcsigs==1.0.2 # via mock +linecache2==1.0.0 # via traceback2 +mock==1.3.0 # via -r requirements-tests.in +nose==1.3.7 # via -r requirements-tests.in +pbr==5.4.5 # via mock +six==1.15.0 # via mock, unittest2 +traceback2==1.4.0 # via unittest2 +unittest2==1.1.0 # via -r requirements-tests.in From 825ff282c28954496f6c258461fd20519928dd31 Mon Sep 17 00:00:00 2001 From: blag Date: Wed, 22 Jul 2020 14:17:49 -0700 Subject: [PATCH 3/4] Add targets for compiling requirements.txt and requirements-tests.txt to Makefile --- Makefile | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/Makefile b/Makefile index 10441e2..e59d9aa 100644 --- a/Makefile +++ b/Makefile @@ -61,6 +61,21 @@ list: fi; @$(MAKE) -pRrq -f $(lastword $(MAKEFILE_LIST)) : 2>/dev/null | awk -v RS= -F: '/^# File/,/^# Finished Make data base/ {if ($$1 !~ "^[#.]") {print $$1}}' | sort | egrep -v -e '^[^[:alnum:]]' -e '^$@$$' | sort | uniq | xargs +virtualenv: venv + virtualenv venv || python3 -m venv venv + +.PHONY: pip-tools +pip-tools: + . venv/bin/activate; pip install pip-tools + +.PHONY: requirements +requirements: pip-tools + . venv/bin/activate; pip-compile requirements.in > requirements.txt + +.PHONY: requirements-tests +requirements-tests: pip-tools + . venv/bin/activate; pip-compile requirements-tests.in > requirements-tests.txt + # forward all make targets not found in this makefile to the ci makefile to do # the actual work (by calling the invoke-ci-makefile target) # http://stackoverflow.org/wiki/Last-Resort_Makefile_Targets From 6d3b628e1ba81af38f0b0f535990c753846bece8 Mon Sep 17 00:00:00 2001 From: blag Date: Wed, 22 Jul 2020 14:23:29 -0700 Subject: [PATCH 4/4] Bump pack version to 0.1.6 and update changelog --- CHANGES.md | 5 +++++ pack.yaml | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index 5bbd062..efd69f6 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,5 +1,10 @@ # Change Log +## v0.1.6 + +- Pinned parsedatetime to <2.6 to fix tests on Python 2.7 +- Updated requirements file handling and Makefile + ## v0.1.5 - Fixed issue with wait-for module where newest version only supports python 3 diff --git a/pack.yaml b/pack.yaml index 910da15..a58e822 100644 --- a/pack.yaml +++ b/pack.yaml @@ -7,7 +7,7 @@ keywords: - cloudforms - provision - bestfit -version: 0.1.5 +version: "0.1.6" python_versions: - "2" - "3"