-
-
Notifications
You must be signed in to change notification settings - Fork 173
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
latest setuptool_scm version is not compatible with python 3.7 #379
Conversation
the documentation action is failing becouse: I think is not related to my PR, can someone fix it in master? after that i will rebase the PR |
The certificate issue was due to a DNS error, should be resolved in 5 minutes. |
i cannot rerun the action, I don't have the necessary permissions, can someone re-launch it for me? |
if all is okay can the PR be merged? or i am missing something? |
One step towards that would be to squash commits and align the commit message with the guidelines: https://github.com/OCA/odoo-community.org/blob/master/website/Contribution/CONTRIBUTING.rst#commit-message |
Hi, i had time to back |
Modify setup.py adding because version 8.0.0 of setuptools_scm onwards imports Protocol from typing but Protocol is not available for versions of python3.7 which is the one used by the odoo:13.0 and odoo:14.0 docker
@sbidoul Can you update your review? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That said, I still don't understand why this PR is necessary, as I tried installing the master
branch in a python 3.7 venv and it works fine:
git clone https://github.com/oca/openupgradelib
python3.7 -m venv venv
venv/bin/pip install -U pip wheel setuptools
venv/bin/pip install ./openupgradelib
venv/bin/pip list
"setuptools_scm<6.0.0; python_version <= '3.6'", | ||
"setuptools_scm; python_version > '3.6'", | ||
"setuptools_scm<8; python_version < '3.8'", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When using python 3.6, both these lines match. I suppose that works but may not be what is intended.
How to reproduce: FROM odoo:14.0
USER root
RUN apt update --fix-missing && apt update && apt install -y git
RUN python3 -m pip install wheel setuptools git+https://github.com/OCA/openupgradelib.git@master#egg=openupgradelib
USER odoo
ENTRYPOINT ["/entrypoint.sh"]
CMD ["odoo"] Error:
current work around? update setupt tools previously to install openupgradelib: FROM odoo:14.0
USER root
RUN apt update --fix-missing && apt update && apt install -y git
RUN python3 -m pip install -U wheel setuptools
RUN python3 -m pip install git+https://github.com/OCA/openupgradelib.git@master#egg=openupgradelib
USER odoo
ENTRYPOINT ["/entrypoint.sh"]
CMD ["odoo"] It seem like update setuptools fix the issue because newest versions do some type of fix for the import, but default docker setuptools fails. |
Since the issue seems to be in setuptools and there is a workaround with a simple upgrade I personally find it preferable to recommend that instead of adding complexity in this project. |
@sbidoul It is undeniably the case that setuptool_scm 8.0.0 dropped support for python 3.7, introducing the offending import of |
@StefanRijnhart Sure but that setuptools_scm commit you mention also adds So the question is do we want to drag along that work around along in openupgradelib, or simply recommand users to upgrade setuptools. |
@sbidoul Thanks for the clarification. After having worked for many years without this basic dependency management feature, I wasn't really aware that setuptools caught up at some point 😁 @JohnnyVM do you have a compelling reason not to update setuptools beyond the version that your Python 3.7 distribution came with? |
No, the work around work for me. |
@JohnnyVM Thanks for confirming! |
Version 8.0.0 of setuptools_scm onwards imports Protocol from typing but Protocol is not available for versions of python3.7, which is the one used by the odoo:13.0 and odoo:14.0 docker
https://github.com/pypa/setuptools_scm/blob/b5dbba7a154b90f401ac1b9ca37dc920b5e82c33/src/setuptools_scm/_config.py#L11