[issue32308] Replace empty matches adjacent to a previous non-empty match in re.sub()

2020-01-20 Thread David Barnett
David Barnett added the comment: We were also bitten by this behavior change in https://github.com/google/vroom/issues/110. I'm kinda baffled by the new behavior and assumed it had to be an accidental regression, but I guess not. If you have any other context on the BDFL conversatio

[issue25012] pathlib should allow converting to absolute paths without resolving symlinks

2015-09-08 Thread David Barnett
David Barnett added the comment: And the symlinks for my paths refer to really cryptic hashes in a virtual filesystem for the tests, so rendering them into the assertion failed errors would really make the failure messages hard to interpret

[issue25012] pathlib should allow converting to absolute paths without resolving symlinks

2015-09-08 Thread David Barnett
David Barnett added the comment: Right, and to clarify a bit further why I didn't just use A.resolve() == B.resolve() from the beginning, this is in a unit test where the equality check wasn't in my code. I wanted to assert I received a certain call on my

[issue25012] pathlib should allow converting to absolute paths without resolving symlinks

2015-09-07 Thread David Barnett
David Barnett added the comment: The idiom of pathlib.Path.cwd() / pathlib.Path('some/path') isn't too bad of an approach if it could just be mentioned in the docs. I would intuitively expected something like pathlib.Path('some/path').resolve(follow_symlinks=False

[issue25012] pathlib should allow converting to absolute paths without resolving symlinks

2015-09-05 Thread David Barnett
New submission from David Barnett: There doesn't seem to be any helper in pathlib to expand a relative path to an absolute path *without* resolving symlinks. For example, if I want to convert pathlib.Path('some/path') to pathlib.Path('/full/path/to/some/path') whe

[issue22710] doctest exceptions include nondeterministic namespace

2014-10-23 Thread David Barnett
David Barnett added the comment: But… that doesn't help. It completely changes the semantics of the doctests. I have a bunch of doctests demonstrating different failures of the same exception class, and with IGNORE_EXCEPTION_DETAIL running my doctests to verify they're still corre

[issue22710] doctest exceptions include nondeterministic namespace

2014-10-23 Thread David Barnett
New submission from David Barnett: doctests includes special exception processing support (described in https://docs.python.org/3/library/doctest.html#what-about-exceptions), but in python3 it seems to print the fully-qualified class name even for exception classes in the same module, which

[issue20298] json library needs a non-strict option to decode single-quoted strings

2014-01-18 Thread David Barnett
New submission from David Barnett: Many sloppy JSON APIs return data with poorly-encoded strings, either with single-quotes as delimiters: {'foo': 'bar'} or with no delimiters at all on keys: {foo: 'bar'} The json library is useless for making sense of this d

[issue1065986] Fix pydoc crashing on unicode strings

2012-11-11 Thread David Barnett
David Barnett added the comment: I guess it must be more complicated than it looks, because I thought checking for unicode strings and doing .encode('utf-8') would help at least some cases without making anything worse. Anyways, if it's too hard or not worth fixing "correc

[issue1065986] Fix pydoc crashing on unicode strings

2012-11-10 Thread David Barnett
David Barnett added the comment: Also, the resolution is still marked as "fixed", which is not correct... -- ___ Python tracker <http://bugs.python.org

[issue1065986] Fix pydoc crashing on unicode strings

2012-11-10 Thread David Barnett
David Barnett added the comment: I just ran into this, and I'd like to communicate how unfortunate it is that it's not a priority to fix this fairly trivial (?) bug. It means there's no way to define a unicode string literal with non-ascii characters that won't cra

[issue1065986] Fix pydoc crashing on unicode strings

2012-11-10 Thread David Barnett
Changes by David Barnett : -- nosy: +mu_mind ___ Python tracker <http://bugs.python.org/issue1065986> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue11880] add a {dist-info} category to distutils2

2012-06-14 Thread David Barnett
David Barnett added the comment: Is this ready and just waiting to be merged now? -- nosy: +mu_mind ___ Python tracker <http://bugs.python.org/issue11

[issue11638] python setup.py sdist crashes if version is unicode

2011-10-29 Thread David Barnett
David Barnett added the comment: One way to fix the symptom (maybe not the correct way) would be to edit tarfile._Stream._init_write_gz and change the line that reads self.__write(self.name + NUL) to something like self.__write(self.name.encode('utf-8') + NUL) tarfile is buil

[issue11638] python setup.py sdist crashes if version is unicode

2011-10-29 Thread David Barnett
David Barnett added the comment: Here's a test for the bug. -- keywords: +patch Added file: http://bugs.python.org/file23548/test_unicode_sdist.patch ___ Python tracker <http://bugs.python.org/is

[issue13170] distutils2 test failures

2011-10-28 Thread David Barnett
David Barnett added the comment: >> The remaining test >> (test_command_install_data.InstallDataTestCase.test_simple_run) was >> broken in r1152. >This looks like a local revision number, which has no meaning outside of one >specific repository. What is the changeset

[issue13170] distutils2 test failures

2011-10-27 Thread David Barnett
David Barnett added the comment: The remaining test (test_command_install_data.InstallDataTestCase.test_simple_run) was broken in r1152. What's happening is that the type of exception being raised was changed and it's getting through the try/except block in install_data.run().

[issue13205] NameErrors in generated setup.py (codecs, split_multiline)

2011-10-18 Thread David Barnett
David Barnett added the comment: Regression tests. Not positive that subprocess is the best approach for running these, but it seems to work. In the process of writing tests, I discovered another missing import for PackagingFileError when there's no setup.cfg. -- Added file:

[issue13205] NameErrors in generated setup.py (codecs, split_multiline)

2011-10-18 Thread David Barnett
David Barnett added the comment: Sure, I can give it a go. I'll probably have a chance sometime today. -- ___ Python tracker <http://bugs.python.org/is

[issue13170] distutils2 test failures

2011-10-17 Thread David Barnett
David Barnett added the comment: The ConfigTestCase.test_parse_extensions_in_config failure is a manifestation of http://bugs.python.org/issue6988. -- ___ Python tracker <http://bugs.python.org/issue13

[issue13170] distutils2 test failures

2011-10-17 Thread David Barnett
David Barnett added the comment: I looked into the ConfigTestCase.test_config failure, and it looks like it just needs the righthand edited to match the left. "package_data" lines are supposed to allow comma-separated lists of paths on the righthand. -- nosy

[issue11638] python setup.py sdist crashes if version is unicode

2011-10-17 Thread David Barnett
David Barnett added the comment: I'm getting this exact error when I run "python setup.py sdist", no matter what I do. Even if I just create a new project, type "1.0.0" for version, type "a" in all the other fields, and say "no" to every que

[issue13205] NameErrors in generated setup.py (codecs, split_multiline)

2011-10-17 Thread David Barnett
New submission from David Barnett : The setup.py file currently generated by "pysetup generate-setup" fails to import the "codecs" module, and also uses a split_multiline function from distutils2/utils.py that's undefined in the setup script. -- assignee: tar

[issue8668] Packaging: add a 'develop' command

2011-10-17 Thread David Barnett
Changes by David Barnett : -- nosy: +mu_mind ___ Python tracker <http://bugs.python.org/issue8668> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue11240] Running unit tests in a command line tool leads to infinite loop with multiprocessing on Windows

2011-05-29 Thread David Barnett
Changes by David Barnett : -- nosy: +mu_mind ___ Python tracker <http://bugs.python.org/issue11240> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue10198] wave module writes corrupt wav file for zero-length writeframes

2010-10-26 Thread David Barnett
David Barnett added the comment: This patch against the python 2.6 version fixes the problem for me. -- keywords: +patch Added file: http://bugs.python.org/file19369/fix_double_header.patch ___ Python tracker <http://bugs.python.org/issue10

[issue10198] wave module writes corrupt wav file for zero-length writeframes

2010-10-26 Thread David Barnett
New submission from David Barnett : If the first call to writeframes happens to take an empty string as the data to write, then the next call to writeframes writes a 2nd header into the file, and forever after fails to patch the data length correctly. -- components: Library (Lib