-
Notifications
You must be signed in to change notification settings - Fork 84
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
Fix pre-commit errors with black #89
Conversation
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.
What a nuisance the things that the maintainers of the libraries do...
We need to unfold this change massively. @sbidoul can you do it or instruct me how to do it in the OCA's server?
I just wanted to push a test PR into one of the affected repos to check, will do it in the next few minutes... |
We could also pin python 3.9.7. The problem is due to the GitHub action runners now using python 3.9.8 since last night and the "old" version on black used on branch 14 depends on a library names typed_ast which apparently is not compatible... |
Oh ok, that seems less conflicting, although it is kinda dangerous if I will change it to |
987830f
to
ad6325c
Compare
I couldn't deploy the copier change as is in another repo, but I opened OCA/partner-contact#1176 to test the change manually, and I tried a |
ad6325c
to
769cdd3
Compare
https://github.com/OCA/product-attribute/runs/4165598273?check_suite_focus=true#step:4:112 ``` Traceback (most recent call last): File "/home/runner/.cache/pre-commit/repowzndsk7_/py_env-python3/bin/black", line 5, in <module> from black import patched_main File "/home/runner/.cache/pre-commit/repowzndsk7_/py_env-python3/lib/python3.9/site-packages/black/__init__.py", line 52, in <module> from typed_ast import ast3, ast27 File "/home/runner/.cache/pre-commit/repowzndsk7_/py_env-python3/lib/python3.9/site-packages/typed_ast/ast3.py", line 40, in <module> from typed_ast import _ast3 ImportError: /home/runner/.cache/pre-commit/repowzndsk7_/py_env-python3/lib/python3.9/site-packages/typed_ast/_ast3.cpython-39-x86_64-linux-gnu.so: undefined symbol: _PyUnicode_DecodeUnicodeEscape ``` Appears to be an error introduced by https://github.com/python/typed_ast with Python 3.9. As explained in https://github.com/python/typed_ast#python-38, this library won't be supporting Python 3.8+ Black fixes this after release 21, but we can't bump the version in older branches without reformatting, so we need to pin the Python version instead. TT32912
769cdd3
to
c6200a9
Compare
Thanks for addressing this! I'll deploy tonight or tomorrow. |
And my motivation for automating OCA/maintainer-tools#486 is increasing :) |
Applied and tested on server-tools 14.0 and 15.0. Deployment in progress on all other repos. |
Thanks! |
I was about to tackle this and trying to understand why some PRs where suddenly passing 😅 |
Thanks! |
thanks a lot ! |
https://github.com/OCA/product-attribute/runs/4165598273?check_suite_focus=true#step:4:112
Appears to be an error introduced by https://github.com/python/typed_ast with Python 3.9. As explained in https://github.com/python/typed_ast#python-38, this library won't be supporting Python 3.8+
Black fixes this after release 21, but we can't bump the version in older branches without reformatting, so we need to pin the Python version instead.
@Tecnativa
TT32912
ping @yajo @pedrobaeza @sbidoul