Python 2.3b1, distutils and PEP 263
Hi, people. For quite a long time, I noticed that Distutils inserts a supplementary white line when it transforms the shebang line. There might be some reason for this white line, and I'm curious about it. This does not interact nicely with PEP 263. For example, the file: ----------------------------------------------------------------------> #!/usr/bin/env python # -*- coding: Latin-1 -*- """\ [...] ----------------------------------------------------------------------< get installed by Distutils as: ----------------------------------------------------------------------> #!/usr/bin/python # -*- coding: Latin-1 -*- """\ [...] ----------------------------------------------------------------------< and Python 2.3b1 does not see the `coding:' pragma on the third line. -- François Pinard http://www.iro.umontreal.ca/~pinard
For quite a long time, I noticed that Distutils inserts a supplementary white line when it transforms the shebang line. There might be some reason for this white line, and I'm curious about it. This does not interact nicely with PEP 263. For example, the file:
----------------------------------------------------------------------> #!/usr/bin/env python # -*- coding: Latin-1 -*-
"""\ [...] ----------------------------------------------------------------------<
get installed by Distutils as:
----------------------------------------------------------------------> #!/usr/bin/python
# -*- coding: Latin-1 -*-
"""\ [...] ----------------------------------------------------------------------<
and Python 2.3b1 does not see the `coding:' pragma on the third line.
This should be easy to fix in CVS. Who can do it? --Guido van Rossum (home page: http://www.python.org/~guido/)
This should be easy to fix in CVS.
Who can do it?
I take it, if no one has done so yet. -- Gustavo Niemeyer http://niemeyer.net
Hi François!
For quite a long time, I noticed that Distutils inserts a supplementary white line when it transforms the shebang line. There might be some reason for this white line, and I'm curious about it. This does not interact nicely with PEP 263. For example, the file: [...]
Just to satisfy your curiosity, it was a bug in the regular expression matching the first line: # check if Python is called on the first line with this expression first_line_re = re.compile('^#!.*python[0-9.]*(\s+.*)?$') The detail here is that \s also matches a newline. Fixed in CVS. Thanks for reporting! -- Gustavo Niemeyer http://niemeyer.net
[Gustavo Niemeyer]
Just to satisfy your curiosity, it was a bug in the regular expression matching the first line: [...]
So, it was not intended, and indeed a bug. Thanks for your work on this.
Thanks for reporting!
Special thanks for not throwing bug trackers after me! :-) P.S. - I would likely report a lot of tiny nits if I was not so afraid of these beasts. I perceive bug trackers as guardian monsters, lost from the entrance of hell, meant to protect maintainers from users like me... :-) P.P.S. - Any Roundup progress? I read that it has a nice email interface, but short of having ever tried it, do not know if this is true. -- François Pinard http://www.iro.umontreal.ca/~pinard
On Fri, Jun 27, 2003, François Pinard wrote:
P.P.S. - Any Roundup progress? I read that it has a nice email interface, but short of having ever tried it, do not know if this is true.
No, it's currently sitting on my plate to give Roundup a beta for python.org maintenance. My fault. -- Aahz (aahz@pythoncraft.com) <*> http://www.pythoncraft.com/ Usenet is not a democracy. It is a weird cross between an anarchy and a dictatorship.
participants (4)
-
Aahz
-
Guido van Rossum
-
Gustavo Niemeyer
-
pinard@iro.umontreal.ca