Bug 1542436
| Summary: | python3-django requires Python 2 | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Iryna Shcherbina <ishcherb> |
| Component: | python-django | Assignee: | Matthias Runge <mrunge> |
| Status: | CLOSED RAWHIDE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | rawhide | CC: | bkabrda, jakub.dornak, jal233, mhroncok, michel, mrunge, pviktori, sgallagh |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2018-02-07 11:32:34 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
| Bug Depends On: | |||
| Bug Blocks: | 1340802 | ||
|
Description
Iryna Shcherbina
2018-02-06 11:13:12 UTC
Disabling the mangler will hide the issue. We should either change the shebangs to python3 or make the files non-executable. With the template file, this might bring problems (as the templating mechanism may just preserve the executable flag instead of setting it directly). We should treat those two cases separately: * .../site-packages/django/bin/django-admin.py This should be changed to `/usr/bin/python3` if needed, or removed and `chmod -x`, if not actually needed. * .../site-packages/django/conf/project_template/manage.py-tpl This should be `chmod -x` and check whether it doesn't break anything. We should consider pushing this upstream (i.e. do not set executable permission on template file, but instead set it after the template file is copied somewhere). If this approach is impossible, the mangling should be disabled as a workaround until a path based opt-out is provided. See also bug 1541318. thanks for the heads-up. It is fixed in 2.0.2-2 The shebang is mangled only in executable files. Does the template file need to have executable bit set? I can't really say for sure. The template file is used as a template to be copied in all new generated projects. The template then named manage.py is actually an executable python script. That's why I'd choose to keep it executable. Apparently, the template being executable is the only source of information that determines that the target file will be executable as well. Changing this to something else would require a new source of information about the executable flag (the system is used for multiple files, some executable, some not). See https://github.com/django/django/blob/248fa208cb2c7607fb7a464238fb8ebe62e6a54c/django/core/management/templates.py#L170 and lines around. I say we keep it executable to stay close to upstream. |