[issue23199] libpython27.a in amd64 release is 32-bit

2015-01-24 Thread Steve Dower
Steve Dower added the comment: It looks like #1088716 is where the change was made a bit over 10 years ago. Adding Paul to see if he has any further insight, but I'm pretty sure at that point there was no 64-bit Python (there certainly wasn't a 64-bit Windows that people were using), and

[issue23253] Delay-load ShellExecute

2015-01-24 Thread Steve Dower
Steve Dower added the comment: I assume you're referring to normal_startup and startup_nosite in perf.py at h.p.o/benchmarks? Handy to know about (I need to explore our top-level repos more often, obviously), but probably still not going to measure time in the Windows PE loader as accurately

[issue23257] Update Windows build/setup instructions in devguide

2015-01-24 Thread Roundup Robot
Roundup Robot added the comment: New changeset 41d2d182c260 by Steve Dower in branch 'default': Issue 23257: Update Windows build/setup instructions. https://hg.python.org/devguide/rev/41d2d182c260 -- nosy: +python-dev ___ Python tracker

[issue23257] Update Windows build/setup instructions in devguide

2015-01-24 Thread Steve Dower
Changes by Steve Dower steve.do...@microsoft.com: -- resolution: - fixed stage: patch review - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23257 ___

[issue23311] Update PC/example_nt and extending/windows.rst

2015-01-24 Thread Mark Lawrence
Changes by Mark Lawrence breamore...@yahoo.co.uk: -- nosy: +BreamoreBoy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23311 ___ ___

[issue23300] httplib is using a method that doesn't exist

2015-01-24 Thread Benjamin Peterson
Benjamin Peterson added the comment: On Sat, Jan 24, 2015, at 16:00, Senthil Kumaran wrote: Senthil Kumaran added the comment: Fixed in 2.7. Other versions do not have this bug. Thank you! Would porting the tests be useful, though? -- ___

[issue23311] Update PC/example_nt and extending/windows.rst

2015-01-24 Thread Steve Dower
Steve Dower added the comment: This is probably also a good place to refer to the changes in #22980 and how they can help when building extensions outside of distutils. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23311

[issue23260] Update Windows installer

2015-01-24 Thread Steve Dower
Steve Dower added the comment: Updated patch, and hopefully it will make it into review this time. I deliberately excluded the image for the using/windows.rst documentation but you can see it at http://imgur.com/CdQaBmp -- Added file: http://bugs.python.org/file37838/23260_3.diff

[issue23292] Enum doc suggestion

2015-01-24 Thread Eli Bendersky
Eli Bendersky added the comment: Georg, each library writer is entitled to do whatever she wants. Naturally, we can't prevent dumping contents of enums into the module namespaces, and yes, backwards compatibility makes sense for some modules. However, that's tangential to *encouraging* this

[issue23300] httplib is using a method that doesn't exist

2015-01-24 Thread Senthil Kumaran
Senthil Kumaran added the comment: Would porting the tests be useful, though? Yes, it will be useful to port the tests to 3.4 and default branch. I will do that. -- status: closed - open ___ Python tracker rep...@bugs.python.org

[issue23312] google thinks the docs are mobile unfriendly

2015-01-24 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- nosy: +georg.brandl, serhiy.storchaka versions: -Python 3.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23312 ___

[issue23292] Enum doc suggestion

2015-01-24 Thread Georg Brandl
Georg Brandl added the comment: Likewise, I don't feel strongly that it *should* go in, but I wouldn't object to it. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23292 ___

[issue23312] google thinks the docs are mobile unfriendly

2015-01-24 Thread Georg Brandl
Georg Brandl added the comment: Yes, the theme is anything but responsive. If someone already knows how to do this, please step forward. I guess it's not too hard to move the sidebar to the top/bottom on mobile, and adapt the font sizes. -- ___

[issue23253] Delay-load ShellExecute

2015-01-24 Thread Roundup Robot
Roundup Robot added the comment: New changeset 5bff604a864e by Steve Dower in branch 'default': Closes #23253: Delay-load ShellExecute https://hg.python.org/cpython/rev/5bff604a864e -- nosy: +python-dev resolution: - fixed stage: patch review - resolved status: open - closed

[issue23312] google thinks the docs are mobile unfriendly

2015-01-24 Thread Berker Peksag
Changes by Berker Peksag berker.pek...@gmail.com: -- nosy: +berker.peksag ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23312 ___ ___

[issue21408] delegation of `!=` to the right-hand side argument is not always done

2015-01-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: There are few incorrect implementations of __ne__ in the stdlib. Updated patch removes them. May be we should remove all implementations of __ne__ which are redundant now. -- Added file: http://bugs.python.org/file37837/method-not-operator-2.patch

[issue23310] MagicMock constructor configuration fails for magic methods

2015-01-24 Thread berdario
New submission from berdario: I guess this should be expected... too much magic :P from unittest.mock import MagicMock MagicMock(**{'__hash__.return_value': FIXME}) Traceback (most recent call last): File stdin, line 1, in module File

[issue23199] libpython27.a in amd64 release is 32-bit

2015-01-24 Thread Paul Moore
Paul Moore added the comment: There's a lot of politics around the mingw vs mingw64 situation, but in practice I believe the various mingw64 builds are fine. So I see no reason not to supply a correct 64-bit libpythonXY.a. When the patch was made to include the libpythonXY.a file to the msi

[issue23119] Remove unicode specialization from set objects

2015-01-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: May be add the unicode specialization right in PyObject_RichCompareBool? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23119 ___

[issue21548] pydoc -k IndexError on empty docstring

2015-01-24 Thread Berker Peksag
Berker Peksag added the comment: Here's a patch with tests. -- nosy: +berker.peksag stage: - patch review Added file: http://bugs.python.org/file37841/issue21548.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21548

[issue3566] httplib persistent connections violate MUST in RFC2616 sec 8.1.4.

2015-01-24 Thread Martin Panter
Martin Panter added the comment: Updated v2 patch. This version avoids intruding into the HTTPConnection.connect() implementation, so that users, tests, etc may still set the undocumented “sock” attribute without calling the base connect() method. Also code style changes based on feedback to

[issue23232] 'codecs' module functionality + its docs -- concerning custom codecs, especially non-string ones

2015-01-24 Thread Martin Panter
Martin Panter added the comment: I am certainly no expert, but this is how I understand the three different kinds of codecs are used: * Stateless codecs: str.encode(), bytes.decode(), etc * Incremental codecs: TextIOWrapper, IncrementalNewlineDecoder * Stream codecs: only stuff inside the

[issue23300] httplib is using a method that doesn't exist

2015-01-24 Thread Berker Peksag
Berker Peksag added the comment: +self.assertDictEqual(self.conn._tunnel_headers, tunnel_headers) You could just use assertEqual. Quoting from docs: The list of type-specific methods automatically used by assertEqual() are summarized in the following table. Note that it’s usually

[issue23300] httplib is using a method that doesn't exist

2015-01-24 Thread Senthil Kumaran
Senthil Kumaran added the comment: Committed the test changes in fcab9c106f2f (3.4) and a858cde113f2 (3.5) -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23300 ___

[issue3566] httplib persistent connections violate MUST in RFC2616 sec 8.1.4.

2015-01-24 Thread Demian Brecht
Demian Brecht added the comment: Thanks for the patch Martin (as well as catching a couple issues that I'd run into recently as well). I've left a couple comments up on Rietveld. -- ___ Python tracker rep...@bugs.python.org

[issue23255] SimpleHTTPRequestHandler refactor for more extensible usage.

2015-01-24 Thread Ent
Ent added the comment: Based on the comments of many good netizens, I have further updated the patch. -- Added file: http://bugs.python.org/file37849/jan25.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23255

[issue23314] Disabling CRT asserts in debug build

2015-01-24 Thread Steve Dower
New submission from Steve Dower: When we completely switch Windows builds over to VC14, we're going to encounter some new assert dialogs from the CRT. These won't appear in release builds, but because the buildbots run tests against debug builds they will get in the way. A number of tests

[issue23303] test_license_exists_at_url() of test_site fails on x86 XP-4 3.4 buildbot

2015-01-24 Thread Ned Deily
Ned Deily added the comment: Are the Windows 3.4 and 3.x builds on the buildbot using different versions of OpenSSL? Certificate verifies would fail with 0.9.7. -- nosy: +ned.deily ___ Python tracker rep...@bugs.python.org

[issue23119] Remove unicode specialization from set objects

2015-01-24 Thread Raymond Hettinger
Raymond Hettinger added the comment: Thanks Mark. I appreciate the effort looking at use cases. I'm reopening this one because I have an alternative patch that simplifies the code but keeps the unicode specialization. It replaces the lookkey indirection with a fast and predictable inline

[issue20132] Many incremental codecs don’t handle fragmented data

2015-01-24 Thread Martin Panter
Martin Panter added the comment: Here is a new patch which fixes the bytes-to-bytes incremental codecs. It depends on my patches for these other issues being applied first: * Issue 23231: Bytes-to-bytes support for iteren/decode() * Issue 13881: Generic StreamWriter from IncrementalEncoder *

[issue23152] fstat64 required on Windows

2015-01-24 Thread Steve Dower
Steve Dower added the comment: Huh, okay, looks like the patch still isn't sufficient (I forgot to put -uall when testing it...) - there are calls in fileio.c that need changing too. I'll try and do a thorough sweep of calls to fstat and post another patch in the next day or so. --

[issue23300] httplib is using a method that doesn't exist

2015-01-24 Thread Senthil Kumaran
Senthil Kumaran added the comment: Thanks for the review comments. Updated the patch with the suggested changes. -- Added file: http://bugs.python.org/file37844/23300-3.3-v2.patch ___ Python tracker rep...@bugs.python.org

[issue23300] httplib is using a method that doesn't exist

2015-01-24 Thread Berker Peksag
Berker Peksag added the comment: LGTM. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23300 ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue23300] httplib is using a method that doesn't exist

2015-01-24 Thread Senthil Kumaran
Senthil Kumaran added the comment: Actually, the same tests cannot be ported to 3.4 or default. httplib.HTTP class has been merged to HTTPConnection in 3.x and we don't allow a host, and port in connect(). There is good test coverage for verifying host, port in test_hort_port test in 3.x

[issue23152] fstat64 required on Windows

2015-01-24 Thread Steve Dower
Changes by Steve Dower steve.do...@microsoft.com: Added file: http://bugs.python.org/file37845/py_fstat_2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23152 ___

[issue23152] fstat64 required on Windows

2015-01-24 Thread Steve Dower
Steve Dower added the comment: I updated and tested your patch - basically making posixmodule.c use the new _Py_stat_struct throughout instead of the Win32 definition. The tests run fine on my VC14 machine. Should _Py_fstat be conditioned on Py_LIMITED_API in some way, since it's not

[issue21279] str.translate documentation incomplete

2015-01-24 Thread Martin Panter
Martin Panter added the comment: I’m happy with the new wording in v5. Maybe the docstring in the C module could be reflowed though. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21279

[issue13881] Stream encoder for zlib_codec doesn't use the incremental encoder

2015-01-24 Thread Martin Panter
Martin Panter added the comment: Here is patch v4. The stream writer is now automatically generated by default by the CodecInfo constructor if no custom stream writer parameter is supplied. The base64 and quopri codecs are adjusted to also use this default stream writer to help with Issue

[issue23313] Wrong complex variable being altered

2015-01-24 Thread Gerrit Barrere
New submission from Gerrit Barrere: The bug occurs on line 77 of the attached script. When I change the imaginary part of 'z' on line 77, it also changes the imaginary part of 'zload', which is supposed to remain constant. Putting a dummy assignment 'z = z + 0' on line 76 fixes the bug.

[issue23255] SimpleHTTPRequestHandler refactor for more extensible usage.

2015-01-24 Thread Ent
Ent added the comment: New patch for review! Let me know if anything is missing. -- Added file: http://bugs.python.org/file37840/jan24th.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23255

[issue23300] httplib is using a method that doesn't exist

2015-01-24 Thread Senthil Kumaran
Senthil Kumaran added the comment: Fixed in 2.7. Other versions do not have this bug. -- resolution: - fixed stage: commit review - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23300

[issue23260] Update Windows installer

2015-01-24 Thread Steve Dower
Changes by Steve Dower steve.do...@microsoft.com: -- nosy: +larry ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23260 ___ ___ Python-bugs-list

[issue23300] httplib is using a method that doesn't exist

2015-01-24 Thread Roundup Robot
Roundup Robot added the comment: New changeset c2bba3c9424b by Senthil Kumaran in branch '2.7': Fix Issue23300 : httplib.HTTP classe's connect method should use _get_hostport https://hg.python.org/cpython/rev/c2bba3c9424b -- nosy: +python-dev ___

[issue23268] Fix comparison of ipaddress classes

2015-01-24 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- dependencies: +delegation of `!=` to the right-hand side argument is not always done ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23268

[issue21408] delegation of `!=` to the right-hand side argument is not always done

2015-01-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Particular case of this bug: class A: ... def __eq__(self, other): return NotImplemented ... A().__eq__(object()) NotImplemented A().__ne__(object()) True The second result should be NotImplemented. Martin's patch LGTM except few style nitpicks to

[issue3566] httplib persistent connections violate MUST in RFC2616 sec 8.1.4.

2015-01-24 Thread Martin Panter
Martin Panter added the comment: Here is a patch, including tests and documentation. It ended up a bit more complicated than I anticipated, so I’m interested in hearing other ideas or options. * Added http.client.ConnectionClosed exception * HTTPConnection.close() is implicitly called for a

[issue22885] Arbitrary code execution vulnerability due to unchecked eval() call in dumbdbm module

2015-01-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Raising dbm.dumb.error is behavior change. It would be safer not apply this part in maintained releases. If add sanity checks in 3.5, note that following line key = key.encode('Latin-1') can raise an exception too (AttributeError or UnicodeEncodeError).

[issue22885] Arbitrary code execution vulnerability due to unchecked eval() call in dumbdbm module

2015-01-24 Thread Claudiu Popa
Claudiu Popa added the comment: Thanks, Serhiy. Only the security issue is fixed in this patch, since eval is replaced by ast.literal_eval and nothing else. Indeed, if the data is something else than what dbm expects after ast.literal_eval, then it would fail, but it would have failed

[issue22885] Arbitrary code execution vulnerability due to unchecked eval() call in dumbdbm module

2015-01-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I mean that raising dbm.dumb.error is different issue unrelated to changing eval to ast.literal_eval. See also Raymond's objections in issue21708. issue22885.patch LGTM. -- nosy: +rhettinger ___ Python tracker

[issue4395] Document auto __ne__ generation; provide a use case for non-trivial __ne__

2015-01-24 Thread Martin Panter
Martin Panter added the comment: The reference to @functools.total_ordering was actually already there; I just moved it into the paragraph about relationships between the operators. I should also point out that my description of the default __ne__() assumes that Issue 21408 is resolved; the

[issue23232] 'codecs' module functionality + its docs -- concerning custom codecs, especially non-string ones

2015-01-24 Thread Nick Coghlan
Nick Coghlan added the comment: Unfortunately, a lot of these things aren't well defined in the docs because they're not especially well defined, period. The codecs module works very well if you stick to the common, well-tested paths (primarily the text encodings), but it's complex enough

[issue23232] 'codecs' module functionality + its docs -- concerning custom codecs, especially non-string ones

2015-01-24 Thread Nick Coghlan
Nick Coghlan added the comment: Regarding the 6 vs 4 interfaces, what's really needed there is a clearer explanation of what functionality depends on each of the three interfaces (basic, stream, incremental), so that a codec developer has a clearer understanding of what won't work if they

[issue4395] Document auto __ne__ generation; provide a use case for non-trivial __ne__

2015-01-24 Thread Nick Coghlan
Nick Coghlan added the comment: While Martin's patch doesn't cover all the vagaries of comparison operations discussed above, it fixes the outright error, and provides an appropriate cross-reference to functools.total_ordering. -- ___ Python

[issue23292] Enum doc suggestion

2015-01-24 Thread Eli Bendersky
Eli Bendersky added the comment: I'm not sure why the current situation is annoying? Python explicitly does not pollute the enclosing namespace with an Enum's members. So when you: import A It's fairly natural that you have access to A.MyEnum and not its members, no? Some modules (like some

[issue23292] Enum doc suggestion

2015-01-24 Thread Georg Brandl
Georg Brandl added the comment: I disagree. I assume that many new enums will be a replacement for module-level constants, but these still have to be available on the module. Keeping backward compatibility is not against the spirit of Python :) --

[issue23307] python hangs on call to numpy.outer

2015-01-24 Thread Mark Dickinson
Changes by Mark Dickinson dicki...@gmail.com: -- stage: - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23307 ___

[issue22286] Allow backslashreplace error handler to be used on input

2015-01-24 Thread Nick Coghlan
Nick Coghlan added the comment: +1 from me for merging, although I suspect you'll need to adjust the codecs.rst changes first. -- stage: patch review - commit review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22286

[issue9740] Support for HTTP 1.1 persistent connections throughout the standard library

2015-01-24 Thread Martin Panter
Martin Panter added the comment: See Issue 3566 about tweaking the “http.client” module’s BadStatusLine handling to be more helpful when implementing persistent connections. I am dumping some thoughts here about persistent connections with the “http.client” module, gained by working on that

[issue21076] Turn signal.SIG* constants into enums

2015-01-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Now signal.signal() accepts inappropriate types. signal.signal(signal.SIGHUP, 0.0) Handlers.SIG_DFL: 0 signal.signal(signal.SIGHUP, '0') Handlers.SIG_DFL: 0 In 3.4 it raised an exception. -- status: closed - open

[issue23268] Fix comparison of ipaddress classes

2015-01-24 Thread Nick Coghlan
Nick Coghlan added the comment: +1, looks good to me. That test for ordering and comparison interoperability is actually pretty neat - I wonder if we could make it more generally available as a check my class handles NotImplemented correctly check (in unittest?), which would potentially be

[issue23292] Enum doc suggestion

2015-01-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Agree with Eli. -- nosy: +serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23292 ___ ___

[issue21862] cProfile command-line should accept -m module_name as an alternative to script path

2015-01-24 Thread Nick Coghlan
Nick Coghlan added the comment: I haven't looked into the details of how cProfile handles command line arguments, but potentially relevant is issue #19982, which proposes adding a target parameter that lets runpy run in the context of an existing module object, rather than always creating its

[issue23268] Fix comparison of ipaddress classes

2015-01-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The fact the default __ne__ implementation doesn't handle NotImplemented correctly should probably be filed as a separate issue. May be this is a part of issue21408. -- ___ Python tracker rep...@bugs.python.org

[issue21076] Turn signal.SIG* constants into enums

2015-01-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: And more: import signal signal.signal(1.2, signal.SIG_DFL) Handlers.SIG_DFL: 0 signal.signal('1', signal.SIG_DFL) Handlers.SIG_DFL: 0 -- ___ Python tracker rep...@bugs.python.org

[issue17840] base64_codec uses assert for runtime validity checks

2015-01-24 Thread Nick Coghlan
Nick Coghlan added the comment: I'd be slightly more inclined to file the fact that ignore isn't supported by the base64 codec as a potential bug, with changing the docs as one possible resolution. It shouldn't hold up switching from the assertions to proper runtime checks. --

[issue23309] Hang on interpreter shutdown if daemon thread prints to stdout

2015-01-24 Thread Marien Zwart
New submission from Marien Zwart: A script spawning a single daemon thread calling print() in a loop (like the attached) will usually hang on shutdown in Python 3.4.2 and hg rev 8d802fb6ae32. Attaching gdb at that point shows the following: (gdb) thread apply all bt Thread 1 (Thread

[issue23308] a bug in Instructions section 4.1

2015-01-24 Thread Kevin Dwyer
Kevin Dwyer added the comment: @Dmot Can you be more specific about the problem? A link to the instructions that you are following and a verbatim copy of any error message that you see would help to identify what's going wrong. -- nosy: +kdwyer

[issue23311] Update PC/example_nt and extending/windows.rst

2015-01-24 Thread Steve Dower
New submission from Steve Dower: The installer for 3.5 will include an option to install debug binaries alongside the release ones, so we should update extending/windows.rst to explain that and generally describe how to build an extension. It should also refer to python3.dll at least once...

[issue23312] google thinks the docs are mobile unfriendly

2015-01-24 Thread Benjamin Peterson
New submission from Benjamin Peterson: According to Google webmaster tools, the documentation has the following failings on mobile devices: - The font size is too small. https://developers.google.com/speed/docs/insights/UseLegibleFontSizes - The viewport is not configured. - Touch controls