[issue18197] insufficient error checking causes crash on windows

2013-06-12 Thread Max DeLiso
New submission from Max DeLiso: hi. if you cross compile the mercurial native extensions against python 2.7.5 (x64) on 64 bit windows 7 and then try to clone something, it will crash. I believe the reason for this is that the c runtime functions in the microsoft crt will throw a win32

[issue18197] insufficient error checking causes crash on windows

2013-06-12 Thread Max DeLiso
Changes by Max DeLiso maxdel...@gmail.com: -- hgrepos: -199 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18197 ___ ___ Python-bugs-list mailing

[issue18183] Calling .lower() on certain unicode string raises SystemError

2013-06-12 Thread Roundup Robot
Roundup Robot added the comment: New changeset b11507395ce4 by Serhiy Storchaka in branch '3.3': Add tests for issue #18183. http://hg.python.org/cpython/rev/b11507395ce4 New changeset 17c9f1627baf by Serhiy Storchaka in branch 'default': Add tests for issue #18183.

[issue18183] Calling .lower() on certain unicode string raises SystemError

2013-06-12 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18183 ___

[issue18167] cgi.FieldStorage fails to handle multipart/form-data when \r\n appears at end of 65535 bytes without other newlines

2013-06-12 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- stage: - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18167 ___ ___

[issue10581] Review and document string format accepted in numeric data type constructors

2013-06-12 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: On 12.06.2013 07:32, Alexander Belopolsky wrote: Alexander Belopolsky added the comment: It looks like we a approaching consensus on some points: 1. Mixed script numerals should be disallowed. 2. '\N{MINUS SIGN}' should be accepted as an

[issue18198] unittest discover should provide a way to define discovery at package level

2013-06-12 Thread vila
New submission from vila: While most test suites are a tree with test_*.py files, there are cases where being able to define the discovery for a subtree in the package __init__.py file comes handy. A poc implementation is available at

[issue18198] unittest discover should provide a way to define discovery at package level

2013-06-12 Thread Robert Collins
Robert Collins added the comment: This is a duplicate of 16662 -- nosy: +rbcollins ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18198 ___ ___

[issue18198] unittest discover should provide a way to define discovery at package level

2013-06-12 Thread Robert Collins
Robert Collins added the comment: Well, spoke with vila on IRC. I content it's a duplicate because if load_tests in __init__ kicks in and supercedes discovery, I believe this bug would not be needed. -- ___ Python tracker rep...@bugs.python.org

[issue16487] Allow ssl certificates to be specified from memory rather than files.

2013-06-12 Thread Kristján Valur Jónsson
Kristján Valur Jónsson added the comment: Hi there. Thanks for your comments. This is the kind of discussion I was hoping to have about my draft patch. I too have reservations about adding arguments. In the version of this that we have in house, we actually don't use a certdata argument,

[issue18054] Add more exception related assertions to unittest

2013-06-12 Thread vila
Changes by vila v.ladeuil+bugs-pyt...@free.fr: -- nosy: +vila ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18054 ___ ___ Python-bugs-list mailing

[issue18167] cgi.FieldStorage fails to handle multipart/form-data when \r\n appears at end of 65535 bytes without other newlines

2013-06-12 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- versions: +Python 3.3, Python 3.4 Added file: http://bugs.python.org/file30554/issue18167-3.3.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18167

[issue18167] cgi.FieldStorage fails to handle multipart/form-data when \r\n appears at end of 65535 bytes without other newlines

2013-06-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you for your report, but your patch looks overcomplicated, it fails on 'x'*65535+'\r'+'y'*65535 and hangs on 'x'*65535+'\r'. Here is a simpler patch with tests. -- assignee: - serhiy.storchaka nosy: +serhiy.storchaka Added file:

[issue18181] super vs. someclass.__getattribute__

2013-06-12 Thread Ronald Oussoren
Ronald Oussoren added the comment: added draft of a pep-style proposal -- Added file: http://bugs.python.org/file30556/super-hook-proposal.rst ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18181

[issue18181] super vs. someclass.__getattribute__

2013-06-12 Thread Ronald Oussoren
Ronald Oussoren added the comment: Slightly updated patch (different names, added some documentation) -- Added file: http://bugs.python.org/file30555/issue-18181-poc-v3.txt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18181

[issue18198] unittest discover should provide a way to define discovery at package level

2013-06-12 Thread Barry A. Warsaw
Changes by Barry A. Warsaw ba...@python.org: -- nosy: +barry ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18198 ___ ___ Python-bugs-list mailing

[issue515074] Extended storage in new-style classes

2013-06-12 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: Most concrete variable-sized types don't use tp_basicsize to know where the data lives. For example, PyBytesObject has a char ob_sval[1]; member, and PyBytes_AsString() looks at this fixed offset. For this reason, additional data cannot be stored before

[issue16662] load_tests not invoked in package/__init__.py

2013-06-12 Thread Michael Foord
Changes by Michael Foord mich...@voidspace.org.uk: -- assignee: - michael.foord nosy: +michael.foord ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16662 ___

[issue18149] filecmp.cmp() incorrect results when previously compared file is modified within modification time resolution

2013-06-12 Thread Mark Levitt
Mark Levitt added the comment: I've added a clear_cache() method to filecmp.py. Patch attached. I had thought about implementing an optional parameter to only invalidate the cache of a specific file object, but figured I'd keep it simple for now. First time submitting a patch, so apologies

[issue18191] urllib2/urllib.parse.splitport does not handle IPv6 correctly

2013-06-12 Thread Julien Danjou
Julien Danjou added the comment: Attached is a patch inspired by a function written for OpenStack Oslo library. -- keywords: +patch Added file: http://bugs.python.org/file30558/0001-Make-urllib.parse.splitport-handle-IPv6-correctly.patch ___ Python

[issue18198] unittest discover should provide a way to define discovery at package level

2013-06-12 Thread vila
vila added the comment: The linked code does something different. Right, it addressed other issues encountered in that project: 1 - the need for different paterns for files and directories (http://bugs.python.org/issue16662), 2 - handling import errors at load time

[issue18198] unittest discover should provide a way to define discovery at package level

2013-06-12 Thread R. David Murray
R. David Murray added the comment: The linked code does something different. I believe the title of this issue is incorrect for the implicitly suggested enhancement. I also suspect the suggested enhancement (to the extent that I understand it) is not ripe for stdlib inclusion, but I'll

[issue18198] unittest discover should provide a way to define discovery at package level

2013-06-12 Thread Michael Foord
Michael Foord added the comment: The load_tests protocol is already the intended way for test writers to customize discovery. The problem, as issue 16662 states, is that load_tests is not invoked for packages by default. Fixing that is the right fix. I'm rejecting this issue in favour of

[issue16662] load_tests not invoked in package/__init__.py

2013-06-12 Thread Michael Foord
Michael Foord added the comment: I agree that load_tests *should* be used in packages and that not doing this from the start was a mistake. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16662

[issue7559] TestLoader.loadTestsFromName swallows import errors

2013-06-12 Thread vila
Changes by vila v.ladeuil+bugs-pyt...@free.fr: -- nosy: +vila ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7559 ___ ___ Python-bugs-list mailing

[issue3329] API for setting the memory allocator used by Python

2013-06-12 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@gmail.com: Added file: http://bugs.python.org/file30560/benchmarks.txt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3329 ___

[issue3329] API for setting the memory allocator used by Python

2013-06-12 Thread STINNER Victor
STINNER Victor added the comment: Benchmark of py_setallocators-3.patch: - benchmarks suite (-b 2n3): some tests are 1.04x faster, some tests are 1.04 slower, significant is between 115 and -191. I don't understand these output, but I guess that the overhead cannot be seen with such test. -

[issue3329] API for setting the memory allocator used by Python

2013-06-12 Thread STINNER Victor
STINNER Victor added the comment: If I understood correctly, the overhead is really really low (near zero). See attached output pybench.txt and benchmarks.txt. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3329

[issue17860] subprocess docs lack info how to use output result

2013-06-12 Thread Ronald Oussoren
Ronald Oussoren added the comment: The attached patch explicitly mentions that stdin/stdout/stderr are opened as binary streams when universal_newlines is False. I'm not convinced that adding this text will solve the confusion, subprocess has fairly complex documentation due to the rich API

[issue18174] Make regrtest with --huntrleaks check for fd leaks

2013-06-12 Thread Richard Oudkerk
Richard Oudkerk added the comment: Updated version which adds checks for handle leaks on Windows. -- Added file: http://bugs.python.org/file30561/fdleak.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18174

[issue3329] API for setting the memory allocator used by Python

2013-06-12 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@gmail.com: Added file: http://bugs.python.org/file30559/pybench.txt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3329 ___

[issue18199] No long filename support for Windows

2013-06-12 Thread Daniel Sturm
New submission from Daniel Sturm: Python at the moment does not handle paths with more than MAX_PATH characters well under Windows. With Windows 7 x64, Python 3.3 32bit, the attached file fails with: Traceback (most recent call last): File .\filename_bug.py, line 4, in module

[issue18199] No long filename support for Windows

2013-06-12 Thread Daniel Sturm
Changes by Daniel Sturm voodoo...@gmail.com: -- components: +IO type: - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18199 ___ ___

[issue18164] Embedding Python doc incorrectly refers to LINKFORSHARED

2013-06-12 Thread egallager
egallager added the comment: For reference, this originally came from the following MacPorts ticket: https://trac.macports.org/ticket/39223#comment:14 -- nosy: +E.Money ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18164

[issue18199] No long filename support for Windows

2013-06-12 Thread STINNER Victor
STINNER Victor added the comment: Using extended path (\\?\ prefix) causes new issues. * #13234: issue in os.listdir() * #13772: issue with os.symlink() * #9949: issue in os.path.realpath() -- nosy: +brian.curtin, haypo, loewis, pitrou, serhiy.storchaka, tim.golden

[issue18199] No long filename support for Windows

2013-06-12 Thread STINNER Victor
STINNER Victor added the comment: The problem is that we never prepend \\?\ to the pathname hence getting the old MAX_PATH limit. I would not call this a problem. In my opinion, it is a bug in Windows: I don't understand why we should preprend something to support longer path. I'm not sure

[issue18199] No long filename support for Windows

2013-06-12 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@gmail.com: -- versions: +Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18199 ___ ___

[issue18174] Make regrtest with --huntrleaks check for fd leaks

2013-06-12 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@gmail.com: -- nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18174 ___ ___ Python-bugs-list

[issue18199] No long filename support for Windows

2013-06-12 Thread Daniel Sturm
Daniel Sturm added the comment: In my opinion, it is a bug in Windows I don't think calling every complicated API a bug is useful. Is the Win32 API exceedingly annoying? I think everybody agrees on that, but imo it's better to fix this once in python itself and don't force all developers to

[issue18191] urllib2/urllib.parse.splitport does not handle IPv6 correctly

2013-06-12 Thread Doug Hellmann
Changes by Doug Hellmann doug.hellm...@gmail.com: -- nosy: +doughellmann ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18191 ___ ___

[issue18163] Add a 'key' attribute to KeyError

2013-06-12 Thread Brett Cannon
Brett Cannon added the comment: What David said. =) The fact that the key is the first value from args is almost happenstance as the exception message is customized in __str__() and not in what is passed to the exception. But what if I had defined __getattr__ or __getattribute__ and had some

[issue18192] Move imp.get_magic() to importlib

2013-06-12 Thread Brett Cannon
Brett Cannon added the comment: So what are your arguments to making it more accessible? The typical user won't need to use it so I don't know if it really requires being off of importlib directly like find_loader, import_module, or (eventually) reload (which for convenience-sake while at the

[issue18191] urllib2/urllib.parse.splitport does not handle IPv6 correctly

2013-06-12 Thread Doug Hellmann
Doug Hellmann added the comment: LGTM -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18191 ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue18191] urllib2/urllib.parse.splitport does not handle IPv6 correctly

2013-06-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I see only tests. It is more common to use arguments for assertEqual() in the reverse order, first actual value, and than expected value. -- nosy: +serhiy.storchaka ___ Python tracker rep...@bugs.python.org

[issue18191] urllib2/urllib.parse.splitport does not handle IPv6 correctly

2013-06-12 Thread Berker Peksag
Berker Peksag added the comment: FTR, urllib.parse.splitport is undocumented and it is only used by urllib.request in the stdlib. -- nosy: +berker.peksag versions: -Python 3.1, Python 3.2 ___ Python tracker rep...@bugs.python.org

[issue18199] No long filename support for Windows

2013-06-12 Thread STINNER Victor
STINNER Victor added the comment: it'd be nice if we could fix it at the source Yes, it is what we are trying to do. But it's not so simple. That's why the issue is splitted into more specific issues. If I provide unit tests for all the involved file system functions and fix the issues

[issue18164] Embedding Python doc incorrectly refers to LINKFORSHARED

2013-06-12 Thread Éric Araujo
Éric Araujo added the comment: I think it was Antoine who committed the patch originally. -- nosy: +eric.araujo, pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18164 ___

[issue17860] subprocess docs lack info how to use output result

2013-06-12 Thread anatoly techtonik
anatoly techtonik added the comment: The only thing that can save the docs is pictures. Or tables. +-+---+ | | universal_newlines = True | +--+-+---+ |Py.2 | str | str

[issue15767] add ModuleNotFoundError

2013-06-12 Thread Brett Cannon
Changes by Brett Cannon br...@python.org: -- title: add ImportNotFoundError - add ModuleNotFoundError ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15767 ___

[issue15767] add ModuleNotFoundError

2013-06-12 Thread Roundup Robot
Roundup Robot added the comment: New changeset 8a0ed9f63c6e by Brett Cannon in branch 'default': Issue #15767: Introduce ModuleNotFoundError, a subclass of http://hg.python.org/cpython/rev/8a0ed9f63c6e -- nosy: +python-dev ___ Python tracker

[issue15767] add ModuleNotFoundError

2013-06-12 Thread Brett Cannon
Changes by Brett Cannon br...@python.org: -- resolution: - fixed stage: test needed - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15767 ___

[issue18200] Update stdlib to use ModuleNotFoundError

2013-06-12 Thread Brett Cannon
New submission from Brett Cannon: The common idiom:: try: import something except ImportError: pass should be updated to use ModuleNotFoundError instead to not accidentally swallow ImportError exceptions which signal actual errors. -- components: Library (Lib) keywords: easy

[issue18200] Update stdlib to use ModuleNotFoundError

2013-06-12 Thread Brett Cannon
Changes by Brett Cannon br...@python.org: -- dependencies: +add ModuleNotFoundError ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18200 ___ ___

[issue18149] filecmp.cmp() incorrect results when previously compared file is modified within modification time resolution

2013-06-12 Thread Ned Deily
Ned Deily added the comment: Thanks for the patch, Mark. I've left some review comments via Rietveld (the review link next to the patch). Also, if you haven't already, please fill out the contributor form as described in the Developer's Guide

[issue3329] API for setting the memory allocator used by Python

2013-06-12 Thread STINNER Victor
STINNER Victor added the comment: New version (4) of the patch: - move the opaque pointer (now called void *ctx, context) as the first parameter instead of the last parameter, as done in zlib, lzma and Oracle's OCI APIs; ctx is also the first parameter of Py*_GetFunctions() and

[issue3329] API for setting the memory allocator used by Python

2013-06-12 Thread STINNER Victor
STINNER Victor added the comment: py_setallocators-4.patch: - Oh, I forgot another change: Py*_Get/SetAllocators() cannot fail anymore (because of an unknown API identifier), so the return type is now void I just saw that I forgot .. versionadded:: 3.4 in the doc. --

[issue18149] filecmp.cmp() incorrect results when previously compared file is modified within modification time resolution

2013-06-12 Thread Mark Levitt
Mark Levitt added the comment: Ned, Thanks for taking the time to review. I've updated the docs, added a unit test, signed the contributor form, and made the changes/corrections from your review. Updated patch attached. -- Added file: http://bugs.python.org/file30565/18149-2.patch

[issue11957] re.sub confusion between count and flags args

2013-06-12 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@gmail.com: -- components: -Unicode ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11957 ___ ___

[issue18164] Embedding Python doc incorrectly refers to LINKFORSHARED

2013-06-12 Thread Ned Deily
Changes by Ned Deily n...@acm.org: Added file: http://bugs.python.org/file30567/issue18164-27.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18164 ___

[issue18200] Update stdlib to use ModuleNotFoundError

2013-06-12 Thread Jesús Cea Avión
Changes by Jesús Cea Avión j...@jcea.es: -- nosy: +jcea ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18200 ___ ___ Python-bugs-list mailing list

[issue18164] Embedding Python doc incorrectly refers to LINKFORSHARED

2013-06-12 Thread Ned Deily
Ned Deily added the comment: On further review, I think the 3.x documentation is pretty good as is. I propose one change to it: getting another config var to help emphasize the configuration values that you will want to combine together. The proposed 2.7 patch backports the whole 3.x

[issue18200] Update stdlib to use ModuleNotFoundError

2013-06-12 Thread Brett Cannon
Brett Cannon added the comment: Changeset 84105:281857369a78 and 84106:c4d7228421df have some updates to use ModuleNotFoundError. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18200 ___

[issue15767] add ModuleNotFoundError

2013-06-12 Thread Roundup Robot
Roundup Robot added the comment: New changeset 3a50025f1900 by Brett Cannon in branch 'default': Issue #15767: Touch up ModuleNotFoundError usage by import. http://hg.python.org/cpython/rev/3a50025f1900 -- ___ Python tracker rep...@bugs.python.org

[issue15767] add ModuleNotFoundError

2013-06-12 Thread Roundup Robot
Roundup Robot added the comment: New changeset c6c0faaf65d7 by Brett Cannon in branch 'default': Issue #15767: Add an explicit test for raising ModuleNotFoundError http://hg.python.org/cpython/rev/c6c0faaf65d7 -- ___ Python tracker

[issue18200] Update stdlib to use ModuleNotFoundError

2013-06-12 Thread Brett Cannon
Changes by Brett Cannon br...@python.org: -- stage: needs patch - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18200 ___ ___

[issue18200] Update stdlib to use ModuleNotFoundError

2013-06-12 Thread Brett Cannon
Brett Cannon added the comment: Here is a patch that uses ModuleNotFoundError in the stdlib sans test modules. -- keywords: +patch Added file: http://bugs.python.org/file30568/use_ModuleNotFoundError.diff ___ Python tracker rep...@bugs.python.org

[issue18201] distutils write into symlinks instead of replacing them

2013-06-12 Thread Michał Górny
New submission from Michał Górny: We're doing heavy wrapping of Python scripts on Gentoo in order to efficiently support having multiple versions of Python installed. For that reason, every Python script installed using the package manager is renamed, and a symlink to a common wrapper binary

[issue18201] distutils write into symlinks instead of replacing them

2013-06-12 Thread Michał Górny
Changes by Michał Górny mgo...@gentoo.org: -- type: - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18201 ___ ___ Python-bugs-list