-
-
Notifications
You must be signed in to change notification settings - Fork 181
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
Update generates invalid config file #506
Comments
Thank you very much for the report @CarliJoy, I will investigate this as soon as I have some time. Could you please also do a |
appdirs==1.4.4 |
Thanks @CarliJoy. I investigated a little bit and the problem seems to be caused by a conjunction of factors:
So to fix the issue in the long run, I think we need to fix But on the bright side I believe that if you install the extensions ( There is a second bug: currently PyScaffold assumes the Please let me know if these workarounds temporarily solve your problem. I will try to address both issues in patch releases for PyScaffold and ConfigUpdater in the near future. |
Sometimes extension-related parameters seem to end up not persisted to `setup.cfg`. Issue #506, shows that it might happen for the `namespace` extension, and via a reaction chain cause errors during updates. The changes implemented in this commit try to prevent this reaction chain of errors happening, while also instructing the user on how to workaround in this situation.
… specially on updates when the user might have edited `setup.cfg` This issue is related to #506.
As shown in #506, ConfigUpdater will crash when trying to persist `option = None`. These changes implement a workaround for that.
This is useful for debugging problems like the ones pointed out in #506
There are situations that the user tries to update a previously generated project with PyScaffold, but the extensions are not installed in the current venv (like #506). These changes try to make this situation obvious and ask for the user to install the missing extensions. I believe that it is better to panic and raise an exception instead of proceed running PyScaffold, because there are cases that the extensions completely change the desired behaviour (e.g. namespace indirectly via custom_extension).
Sometimes extension-related parameters seem to end up not persisted to `setup.cfg`. Issue #506, shows that it might happen for the `namespace` extension, and via a reaction chain cause errors during updates. The changes implemented in this commit try to prevent this reaction chain of errors happening, while also instructing the user on how to workaround in this situation.
As shown in #506, ConfigUpdater will crash when trying to persist `option = None`. These changes implement a workaround for that.
There are situations that the user tries to update a previously generated project with PyScaffold, but the extensions are not installed in the current venv (like #506). These changes try to make this situation obvious and ask for the user to install the missing extensions. I believe that it is better to panic and raise an exception instead of proceed running PyScaffold, because there are cases that the extensions completely change the desired behaviour (e.g. namespace indirectly via custom_extension).
This is useful for debugging problems like the ones pointed out in #506
… specially on updates when the user might have edited `setup.cfg` This issue is related to #506.
@CarliJoy, there is a new RC: https://pypi.org/project/PyScaffold/4.1.1rc1/ that supposedly fix this issue. Please let me know your feedback. |
I will release the final 4.1.1 with the bugfix for this issue. |
@abravalheri thank you very much :-) And Sorry for my missing feedback. I tested it a bit (and it seems to be working) but had to time to a proper test. |
No problems @CarliJoy, those things happen all the time. I wish you all the best in the new journey! |
Hi @CarliJoy, just a heads up, Setuptools recently dropped support for "multi-line short description", details:
So, while PyScaffold functionality is unaffected, you might have problems with your builds. |
Thanks for the reference. Very thoughtful :-) |
Description of the problem
Trying to update a 3.2 project
setup.cfg
Traceback.
Please provide any additional information below.
Versions and main components
The text was updated successfully, but these errors were encountered: