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

2015-07-15 Thread Martin Panter
Changes by Martin Panter vadmium...@gmail.com: -- dependencies: +Fix codecs.iterencode/decode() by allowing data parameter to be omitted stage: - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13881

[issue23247] Crash in the reset() method of StreamWriter of CJK codecs

2015-07-15 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: cjk_codecs_reset.patch LGTM. -- assignee: serhiy.storchaka - haypo stage: - test needed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23247 ___

[issue23247] Crash in the reset() method of StreamWriter of CJK codecs

2015-07-15 Thread Aaron Hill
Aaron Hill added the comment: The patch didn't get attached for some reason. It's attached now. -- Added file: http://bugs.python.org/file39933/fix-multibytecodec-segfault.patch ___ Python tracker rep...@bugs.python.org

[issue23661] Setting a exception side_effect on a mock from create_autospec does not work

2015-07-15 Thread Berker Peksag
Changes by Berker Peksag berker.pek...@gmail.com: -- resolution: - fixed stage: - resolved status: open - closed versions: +Python 3.6 -Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23661

[issue23963] Windows build error using original openssl source

2015-07-15 Thread Zachary Ware
Zachary Ware added the comment: bcf93e3766e8 applied cleanly to 2.7, so I just used it. Thanks for the report, and sorry it took so long to fix! -- assignee: - zach.ware ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23963

[issue24635] test_typing is flaky

2015-07-15 Thread Raymond Hettinger
Changes by Raymond Hettinger raymond.hettin...@gmail.com: -- nosy: +lukasz.langa ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24635 ___ ___

[issue23963] Windows build error using original openssl source

2015-07-15 Thread Roundup Robot
Roundup Robot added the comment: New changeset d1f4d14bd550 by Zachary Ware in branch '2.7': Close #23963: Fix building with original OpenSSL sources. https://hg.python.org/cpython/rev/d1f4d14bd550 -- nosy: +python-dev resolution: - fixed stage: - resolved status: open - closed

[issue23247] Crash in the reset() method of StreamWriter of CJK codecs

2015-07-15 Thread Aaron Hill
Aaron Hill added the comment: The included patch fixes the issue, and modifies the existing unittest to prevent a future regression. The patch corrects an issue where the 'pending' struct field was NULL, but was used as the input to multibytecodec_encode anyay. --

[issue24626] please sync cgi.parse document

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

[issue24508] Backport 3.5's Windows build project files to 2.7

2015-07-15 Thread Roundup Robot
Roundup Robot added the comment: New changeset ca78b9449e04 by Zachary Ware in branch '2.7': Close #24508: Backport the 3.5 MSBuild project files. https://hg.python.org/cpython/rev/ca78b9449e04 -- nosy: +python-dev resolution: - fixed stage: patch review - resolved status: open -

[issue23247] Crash in the reset() method of StreamWriter of CJK codecs

2015-07-15 Thread Martin Panter
Martin Panter added the comment: Perhaps this test case proposed in my patch for Issue 13881 could be useful: +def test_writer_reuse(self): +StreamWriter should be reusable after reset Looks like that is where my “broken_stream_codecs” list from the original post came from. --

[issue24632] Improve documentation about __main__.py

2015-07-15 Thread Ezio Melotti
Ezio Melotti added the comment: Another thing that should be clarified, is the difference between __main__.py inside a package, and __main__.py inside a zip file. For packages, as far as I understand, __main__.py should be inside the package (i.e. pkg/__main__.py, in the same dir of

[issue24632] Improve documentation about __main__.py

2015-07-15 Thread Ethan Furman
Ethan Furman added the comment: RDM noted: - The surprising thing is that __main__ works without there being an __init__. I didn't know that, assumed it wasn't true, and so never tried it. I think this is due to PEP 420 Namespace Packages. --

[issue23530] os and multiprocessing.cpu_count do not respect cpuset/affinity

2015-07-15 Thread Charles-François Natali
Charles-François Natali added the comment: It's just a doc improvement, I'm not convinced it really needs backporting. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23530 ___

[issue24632] Improve documentation about __main__.py

2015-07-15 Thread R. David Murray
R. David Murray added the comment: The surprising thing is that __main__ works without there being an __init__. I didn't know that, assumed it wasn't true, and so never tried it. -- ___ Python tracker rep...@bugs.python.org

[issue24636] re.search not respecting anchor markers in or-ed construction

2015-07-15 Thread Almer Tigelaar
New submission from Almer Tigelaar: From the documentation ^ should restrict the matching of re.search to the beginning of the string, as mentioned here: https://docs.python.org/3.4/library/re.html#search-vs-match However, this doesn't always seem to work as the following example shows:

[issue24632] Improve documentation about __main__.py

2015-07-15 Thread Ezio Melotti
Ezio Melotti added the comment: After further tests, I think I figured out how things works. There are three separate things that interact with each other: * packages (dirs with an __init__.py) and regular dirs (with no __init__.py) or zip files; * how python is executed (with or without

[issue24631] Regression in timeit with multyline setup

2015-07-15 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- resolution: - fixed stage: commit review - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24631 ___

[issue24631] Regression in timeit with multyline setup

2015-07-15 Thread Roundup Robot
Roundup Robot added the comment: New changeset fce682a493e7 by Serhiy Storchaka in branch '3.5': Issue #24631: Fixed regression in the timeit modulu with multyline setup. https://hg.python.org/cpython/rev/fce682a493e7 New changeset 0b04e5689c33 by Serhiy Storchaka in branch 'default': Issue

[issue24636] re.search not respecting anchor markers in or-ed construction

2015-07-15 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- nosy: +serhiy.storchaka resolution: - not a bug stage: - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24636

[issue8106] SSL session management

2015-07-15 Thread Mladen Milosevic
Changes by Mladen Milosevic milosevic.mla...@gmail.com: -- nosy: +mladen.milosevic ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8106 ___ ___

[issue23247] Crash in the reset() method of StreamWriter of CJK codecs

2015-07-15 Thread STINNER Victor
STINNER Victor added the comment: Happens for all the multibyte codecs: (...) All these codecs share the same C implementation: the CJK codecs. The bug was introduced in Python 3.4 by my huge changeset d621bdaed7c3: Issue #17693: CJK encoders now use the new Unicode API (PEP 393). It looks

[issue23247] Crash in the reset() method of StreamWriter of CJK codecs

2015-07-15 Thread STINNER Victor
STINNER Victor added the comment: It looks like there was no test for this specific bug :-/ Calling reset() just after creating a StreamReader object. Oops: StreamWriter, not StreamReader. -- ___ Python tracker rep...@bugs.python.org

[issue22858] unittest.__init__:main shadows unittest.main

2015-07-15 Thread Brett Cannon
Brett Cannon added the comment: Ah, I see my misunderstanding; when Antoine said Numba subclasses unittest.main I wasn't thinking and thought he meant something in unitest.main the module, not the unittest.main alias for unittest.main.TestProgram which is exposed as unitest.__init__.main

[issue22858] unittest.__init__:main shadows unittest.main

2015-07-15 Thread Brett Cannon
Brett Cannon added the comment: Or deprecate in 3.5 if Larry will let you. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22858 ___ ___

[issue24631] Regression in timeit with multyline setup

2015-07-15 Thread Brett Cannon
Brett Cannon added the comment: Patch LGTM -- stage: patch review - commit review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24631 ___ ___

[issue24640] no ensurepip in embedded Windows distribution

2015-07-15 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@gmail.com: -- components: +Windows nosy: +paul.moore, tim.golden, zach.ware ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24640 ___

[issue24640] no ensurepip in embedded Windows distribution

2015-07-15 Thread Chris Krycho
New submission from Chris Krycho: There is no `ensurepip` module bundled with the embedded distribution of Python 3.5 for Windows: Z:\python-3.5.0b3-embed .\python -m ensurepip --upgrade Z:\python-3.5.0b3-embed\python.exe: No module named ensurepip This may be the *intent*, but I

[issue24641] Log type of unserializable value when raising JSON TypeError

2015-07-15 Thread Madison May
New submission from Madison May: Currently the json lib only logs the string representation of the variable, which does not always include type information. I recently ran into a difficult to debug issue with code similar to the following: ``` import json import numpy as np d = {'data':

[issue24640] no ensurepip in embedded Windows distribution

2015-07-15 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@gmail.com: -- assignee: - docs@python components: +Documentation nosy: +docs@python ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24640 ___

[issue24640] no ensurepip in embedded Windows distribution

2015-07-15 Thread Steve Dower
Steve Dower added the comment: It's a deliberate exclusion, I just haven't gotten to all the documentation yet (mostly because I still expect things to change). My idea was that packages would be deployed statically alongside the embedded distribution rather than going into a site-packages

[issue24640] no ensurepip in embedded Windows distribution

2015-07-15 Thread Chris Krycho
Chris Krycho added the comment: Using --root or --target (as appropriate to the specific package) does appear to be the preferred approach for that, and given the constraints of an embedded installation, I agree that that's the most reasonable solution. I spent a fair bit of time reading up

[issue23972] Asyncio reuseport

2015-07-15 Thread STINNER Victor
STINNER Victor added the comment: A quick search told me that Windows only knows the SO_REUSEADDR option, there is no SO_REUSEPORT. It should be at least documented that SO_REUSEADDR is not supported on Windows. Maybe we should raise an exception on Windows if reuse_port=True? Ignoring the

[issue23926] skipitem() in getargs.c still supports 'w' and 'w#', and shouldn't

2015-07-15 Thread Joe Jevnik
Joe Jevnik added the comment: Sorry it took so long to get back to this. I didn't realize this was still open. I have provided the update to the docs and moved it to the 3.6 section. I also made sure the patch still applies and the tests all pass. -- Added file:

[issue23247] Multibyte codec StreamWriter.reset() crashes

2015-07-15 Thread Aaron Hill
Aaron Hill added the comment: This is also present in the latest Python 3.6. I'm going to work on providing a patch for this, unless someone else already is -- nosy: +Aaron1011 versions: +Python 3.6 ___ Python tracker rep...@bugs.python.org

[issue24636] re.search not respecting anchor markers in or-ed construction

2015-07-15 Thread Matthew Barnett
Matthew Barnett added the comment: The or-ed patterns aren't between the anchors. The ^ is at the start of the first alternative and the $ is at the end of the last alternative. -- ___ Python tracker rep...@bugs.python.org

[issue24632] Improve documentation about __main__.py

2015-07-15 Thread R. David Murray
R. David Murray added the comment: What you just described is exactly what I would have said was the case (a zip file acts exactly like it was a directory), so I'm glad that's the way it actually works :). -- nosy: +r.david.murray ___ Python

[issue23972] Asyncio reuseport

2015-07-15 Thread chris laws
chris laws added the comment: Attached is a patch that implements the suggested solution along with tests and associated doc updates. Hope this helps. -- keywords: +patch Added file: http://bugs.python.org/file39930/23972_cjl.patch ___ Python

[issue24638] asyncio loop argument must agree with future error message could be improved

2015-07-15 Thread R. David Murray
R. David Murray added the comment: This error message is in tasks.py. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24638 ___ ___

[issue24638] asyncio loop argument must agree with future error message could be improved

2015-07-15 Thread R. David Murray
New submission from R. David Murray: I just got the titular error message and had no idea what it meant until I looked at the source. It seems to mean the specified loop is different from the _loop attribute of the future-or-coroutine. Since _loop is nominally private, perhaps the message

[issue24639] Documentation: broken link on unittest page

2015-07-15 Thread Ruth Berkow
New submission from Ruth Berkow: The documentation for unittest, in the See also box contains a link for Simple Smalltalk Testing: With Patterns that leads to a 404. Replacing this with a working link seems like a good idea; may I suggest

[issue24639] Documentation: broken link on unittest page

2015-07-15 Thread R. David Murray
R. David Murray added the comment: This has already been corrected in issue 24548 using a link to archive.org. -- nosy: +r.david.murray resolution: - duplicate stage: - resolved status: open - closed superseder: - Broken link in the unittest documentation type: performance - behavior

[issue24637] locals dictionary in PyRun_String

2015-07-15 Thread Matthew Keeter
New submission from Matthew Keeter: The C API docs for PyRun_StringFlags, PyEval_EvalCodeEx, and PyEval_EvalCode say that globals and locals both must be dictionaries. However, digging into the source [1] shows that locals can be any object implementing the mapping protocol. Furthermore,

[issue23812] asyncio.Queue.put_nowait(), followed get() task cancellation leads to item being lost

2015-07-15 Thread Gustavo J. A. M. Carneiro
Gustavo J. A. M. Carneiro added the comment: Don't know if it helps, but I made a github pull request for this: https://github.com/python/asyncio/pull/256 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23812

[issue24632] Improve documentation about __main__.py

2015-07-15 Thread Ezio Melotti
Ezio Melotti added the comment: The surprising thing is that __main__ works without there being an __init__. That's also what surprised me, I always thought __main__.py was supposed to be used within a package executed with python -m pkg, but apparently regular dirs and zip files can have