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 2014-03-13 21:23 by eric.araujo. 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
2014-03-13 21:23:41eric.araujosetmessages: + msg213475
2014-03-12 09:18:44eric.araujosetstatus: open -> closed
messages: + msg213228

assignee: tarek -> eric.araujo
resolution: out of date
stage: needs patch -> resolved
2012-05-17 16:39:00Arfreversetnosy: + Arfrever
2012-05-17 02:10:08barrysetnosy: + barry
2011-06-14 16:12:04michael.foordsetmessages: + msg138342
2011-06-14 16:08:16eric.araujosetmessages: + msg138341
2011-06-14 16:02:57michael.foordsetmessages: + msg138339
2011-06-14 15:42:52eric.araujosetstage: needs patch
messages: + msg138333
versions: + Python 3.3
2010-12-14 03:21:07r.david.murraysettype: enhancement
2010-11-25 15:16:54michael.foordcreate