Issue 10530: distutils2 should allow the installing of python files with invalid syntax (original) (raw)

This issue has been migrated to GitHub: https://github.com/python/cpython/issues/54739

classification

Title: distutils2 should allow the installing of python files with invalid syntax
Type: enhancement Stage: resolved
Components: Distutils2 Versions: Python 3.3

process

Status: closed Resolution: out of date
Dependencies: Superseder:
Assigned To: eric.araujo Nosy List: Arfrever, barry, eric.araujo, michael.foord, tarek
Priority: normal Keywords:

Created on 2010-11-25 15:16 by michael.foord, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Messages (7)
msg122372 - (view) Author: Michael Foord (michael.foord) * (Python committer) Date: 2010-11-25 15:16
As discussed with tarek. It shouldn't be up to distutils2 to decide whether or not a Python file that has been included in the package should be installed or not if it is included in the set of files the developer has *asked* to be installed. Possible use cases include deliberately broken modules for testing or an ast-transformer import hook that works with otherwise-invalid syntax files. (e.g. transforming the with statement to work on Python 2.4) Allowing for the install of invalid syntax files will require ignoring SyntaxErrors during bytecode compile phase. A --strict option could be provided to allow these to remain an error.
msg138333 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2011-06-14 15:42
> A --strict option could be provided to allow these to remain an error. Or a config option could let you list the files that should not be byte-compiled.
msg138339 - (view) Author: Michael Foord (michael.foord) * (Python committer) Date: 2011-06-14 16:02
Config options are for when developers can't make decisions. Given that there are valid use cases please just allow it. A --strict option is fine... (but no-one will use it I suspect)
msg138341 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2011-06-14 16:08
> Config options are for when developers can't make decisions. I don’t understand. In packaging, a config file is central, as it contains the whole metadata, manifest and command options. > Given that there are valid use cases please just allow it. If this was not clear: I agree with the feature request. Or maybe you meant allowing it by default?
msg138342 - (view) Author: Michael Foord (michael.foord) * (Python committer) Date: 2011-06-14 16:12
Yes, allowing it by default. :-)
msg213228 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2014-03-12 09:18
This is now irrelevant, unless it also applies to distutils (in which case, please reopen).
msg213475 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2014-03-13 21:23
This doesn’t apply to distutils, see #7918.
History
Date User Action Args
2022-04-11 14:57:09 admin set github: 54739
2014-03-13 21:23:41 eric.araujo set messages: +
2014-03-12 09🔞44 eric.araujo set status: open -> closedmessages: + assignee: tarek -> eric.araujoresolution: out of datestage: needs patch -> resolved
2012-05-17 16:39:00 Arfrever set nosy: + Arfrever
2012-05-17 02:10:08 barry set nosy: + barry
2011-06-14 16:12:04 michael.foord set messages: +
2011-06-14 16:08:16 eric.araujo set messages: +
2011-06-14 16:02:57 michael.foord set messages: +
2011-06-14 15:42:52 eric.araujo set stage: needs patchmessages: + versions: + Python 3.3
2010-12-14 03:21:07 r.david.murray set type: enhancement
2010-11-25 15:16:54 michael.foord create