[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug#29856] [PATCH core-updates] guix: python-build-system:, Modify ".py

From: Hartmut Goebel
Subject: [bug#29856] [PATCH core-updates] guix: python-build-system:, Modify ".py" files in-place.
Date: Tue, 2 Jan 2018 17:13:15 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2


I'm afraid, this patch will lead to quite some serious problems:

  • It "kills" the doc-string, which must be the very first _expression_-statement in the program. This might be rarely used, but
  • it kills "from __future__ import", which must be the first import statement (or even the first statement after any doc-string) to work.

Fixing these issues would require to implement a language-aware scanner, as discussed in <>.

Thus I suggest aiming to implement the solution discussed in that thread (see esp. <>.

Beside of this, the patch suffers from some more issues. Sorry to say :-(

  • When converting PYTHONPATH into a list of python strings, these need to be quoted properly.
  • The description (commit-message) of the patch is much to terse. It should describe the the reason and implications. Esp. it should describe the case this is fixing.

BTW: The first analysis in <> was misleading. I commented there.

Hartmut Goebel

| Hartmut Goebel          | address@hidden               |
| | compilers which you thought are impossible |

reply via email to

[Prev in Thread] Current Thread [Next in Thread]