setup.py sdist hangs on windows with 1.6 and 2.0b1

This may not be directly related to distutils, it may also be a bug in 1.6 and 2.0b1 re implementation.
'setup.py sdist' with the current distutils CVS version hangs while parsing MANIFEST.in, executing the re.sub command in these lines in text_file.py:
# collapse internal whitespace (*after* joining lines!) if self.collapse_ws: line = re.sub (r'(\S)\s+(\S)', r'\1 \2', line)
Has anyone else noticed this, or is smething wrong on my side?
Thomas

On 13 September 2000, Thomas Heller said:
This may not be directly related to distutils, it may also be a bug in 1.6 and 2.0b1 re implementation.
'setup.py sdist' with the current distutils CVS version hangs while parsing MANIFEST.in, executing the re.sub command in these lines in text_file.py:
# collapse internal whitespace (*after* joining lines!) if self.collapse_ws: line = re.sub (r'(\S)\s+(\S)', r'\1 \2', line)
That was a very suboptimal use of regex substitution; I discovered (and fixed) this several months ago in the version of text_file.py we use at work, but forgot to propagate the change to the distutils version. Coincidentally, I finally got around to doing that this weekend:
revision 1.10 date: 2000/09/16 18:04:55; author: gward; state: Exp; lines: +31 -27 [change from 2000/04/17, propagating now to distutils copy] Dropped the 'collapse_ws' option and replaced it with 'collapse_join' -- it's *much* faster (no 're.sub()') and this is the reason I really added 'collapse_ws', ie. to remove leading whitespace from a line being joined to the previous line.
So this problem should no longer be there.
However, if the sre engine really did *hang* (whereas pcre was just slow), that might be an sre bug.
[...a few moments pass...]
Yep, you're right: if I do this single, simple regex substitution with Python 2.0, it hangs. I've submitted a bug to SourceForge -- thanks!
Greg
participants (2)
-
Greg Ward
-
Thomas Heller