From 5011e6cab9a157435cf8e4c8a0301266a2c9cadd Mon Sep 17 00:00:00 2001 From: Johannes Raggam Date: Fri, 5 Jan 2024 19:39:38 +0100 Subject: [PATCH 1/4] Restructure README. The original author information should be at the end and not somewhere in between. --- README.rst | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/README.rst b/README.rst index 2031aca3..8287a5e5 100644 --- a/README.rst +++ b/README.rst @@ -2146,14 +2146,6 @@ This ``global_obj_hook`` below stores that data in a annotation: annotations[DEFERRED_KEY] = data -Written by -========== - -.. image:: ./docs/starzel.png - :target: https://www.starzel.de - :alt: Starzel.de - - Translations ============ @@ -2241,3 +2233,11 @@ License ------- The project is licensed under the GPLv2. + + +Written by +========== + +.. image:: ./docs/starzel.png + :target: https://www.starzel.de + :alt: Starzel.de From 51e5387d9237a51110001ddd012227bea924dc6b Mon Sep 17 00:00:00 2001 From: Johannes Raggam Date: Fri, 5 Jan 2024 19:18:58 +0100 Subject: [PATCH 2/4] Sort requirements. --- setup.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/setup.py b/setup.py index d0d2626b..54c710c3 100644 --- a/setup.py +++ b/setup.py @@ -16,26 +16,26 @@ ) install_requires = [ - "setuptools", - "plone.api >= 1.8.4", "hurry.filesize", "ijson", + "plone.api >= 1.8.4", + "setuptools", "six", ] if sys.version_info[0] < 3: install_requires.append("beautifulsoup4 < 4.10") - install_requires.append("plone.restapi < 8.0.0") - # There is a py2-imcompatibility in plone.rest 3.0.1 - install_requires.append("plone.rest < 3.0.1") # plone.restapi depends on plone.schema, which depends on jsonschema, # which has a Py3-only release since September 2021. install_requires.append("jsonschema < 4") - install_requires.append("pyrsistent < 0.16.0") install_requires.append("pathlib2") + # There is a py2-imcompatibility in plone.rest 3.0.1 + install_requires.append("plone.rest < 3.0.1") + install_requires.append("plone.restapi < 8.0.0") + install_requires.append("pyrsistent < 0.16.0") else: - install_requires.append("plone.restapi") install_requires.append("beautifulsoup4") + install_requires.append("plone.restapi") setup( From 6ecf8a8138ffb3084c936baec4ea542cbab06af8 Mon Sep 17 00:00:00 2001 From: Johannes Raggam Date: Fri, 5 Jan 2024 19:26:10 +0100 Subject: [PATCH 3/4] Add more Python 2 compatible version specifications and update the README. Fixes #166 --- CHANGES.rst | 3 ++ README.rst | 84 ++++++++++++++--------------------------------------- setup.py | 8 +++-- 3 files changed, 31 insertions(+), 64 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index b74be6cb..724d5fa4 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -5,6 +5,9 @@ Changelog 1.11 (unreleased) ----------------- +- Add more Python 2 compatible version specifications and update the README. + [thet] + - Fix ``KeyError: time`` when importing content with a workflow that does not have the ``time`` variable. [maurits] diff --git a/README.rst b/README.rst index 8287a5e5..147225e2 100644 --- a/README.rst +++ b/README.rst @@ -56,6 +56,28 @@ Import supports: * Plone 5.2+, Dexterity, Python 2 and 3, plone.app.multilingual + +Installation +============ + +Install collective.exportimport as you would install any other Python package. + +You don't need to activate the add-on in the Site Setup Add-ons control panel to be able to use the forms ``@@export_content`` and ``@@import_content`` in your site. + +If you need help, see: +- for Plone 4: https://4.docs.plone.org/adapt-and-extend/install_add_ons.html +- for Plone 5: https://5.docs.plone.org/manage/installing/installing_addons.html +- for Plone 6: https://6.docs.plone.org/install/manage-add-ons-packages.html + + +Python 2 compatibility +---------------------- + +This package is compatible with Python 3 and Python 2. +Depending on the Python version different versions of it's dependencies will be installed. +If you run into problems, file an issue at: https://github.com/collective/collective.exportimport/issues + + Usage ===== @@ -2154,68 +2176,6 @@ This product has been translated into - Spanish -Installation -============ - -Install collective.exportimport by adding it to your buildout:: - - [buildout] - - ... - - eggs = - collective.exportimport - - -and then running ``bin/buildout`` - -You don't need to activate the add-on in the Site Setup Add-ons control panel to be able to use the forms ``@@export_content`` and ``@@import_content`` in your site. - -You do need to add it to your buildout configuration and run buildout to make these features available at all. See https://docs.plone.org/manage/installing/installing_addons.html for details. - -Installing in Plone 4 ---------------------- - -``collective.exportimport`` depends on ``plone.restapi``. For Plone 4, you need to pin ``plone.restapi`` to 7.x . When installing ``plone.restapi`` version 7.x.x in Plone 4 you may need to add the following version pins to your buildout:: - - [versions] - PyJWT = 1.7.1 - - six = 1.11.0 - attrs = 21.2.0 - plone.rest = 1.6.2 - plone.schema = 1.3.0 - # Last pyrsistent version that is python 2 compatible: - pyrsistent = 0.15.7 - - # Required by: - # jsonschema==3.2.0 - functools32 = 3.2.3.post2 - - # Required by: - # plone.schema==1.3.0 - jsonschema = 3.2.0 - - # Required by: - # importlib-metadata==1.3.0 - pathlib2 = 2.3.5 - - # Required by: - # pathlib2==2.3.5 - scandir = 1.10.0 - - # plone.app.contenttypes > 1.0 - plone.app.contenttypes = 1.1.9 - - importlib-metadata = 2.1.3 - zipp = 1.2.0 - configparser = 4.0.2 - contextlib2 = 0.6.0.post1 - - -These versions are taken from the ``plone.restapi`` 7.x README: https://pypi.org/project/plone.restapi/7.8.1/ - - Contribute ========== diff --git a/setup.py b/setup.py index 54c710c3..56c76361 100644 --- a/setup.py +++ b/setup.py @@ -18,23 +18,27 @@ install_requires = [ "hurry.filesize", "ijson", - "plone.api >= 1.8.4", "setuptools", "six", ] if sys.version_info[0] < 3: + install_requires.append("attrs < 22") install_requires.append("beautifulsoup4 < 4.10") # plone.restapi depends on plone.schema, which depends on jsonschema, # which has a Py3-only release since September 2021. install_requires.append("jsonschema < 4") install_requires.append("pathlib2") + install_requires.append("plone.api >= 1.8.4, < 2") # There is a py2-imcompatibility in plone.rest 3.0.1 install_requires.append("plone.rest < 3.0.1") - install_requires.append("plone.restapi < 8.0.0") + install_requires.append("plone.restapi < 8") + install_requires.append("plone.schema < 2") + install_requires.append("PyJWT < 2") install_requires.append("pyrsistent < 0.16.0") else: install_requires.append("beautifulsoup4") + install_requires.append("plone.api >= 1.8.4") install_requires.append("plone.restapi") From 1ae76f6489b31dfa27ef519ed303955fef3ecea3 Mon Sep 17 00:00:00 2001 From: Johannes Raggam Date: Mon, 8 Jan 2024 19:57:39 +0100 Subject: [PATCH 4/4] One more Python 2 compatible version specification. Fixes #166 --- setup.py | 1 + 1 file changed, 1 insertion(+) diff --git a/setup.py b/setup.py index 56c76361..3322a26a 100644 --- a/setup.py +++ b/setup.py @@ -24,6 +24,7 @@ if sys.version_info[0] < 3: install_requires.append("attrs < 22") + install_requires.append("backports.functools-lru-cache < 2") install_requires.append("beautifulsoup4 < 4.10") # plone.restapi depends on plone.schema, which depends on jsonschema, # which has a Py3-only release since September 2021.