[issue20397] distutils --record option does not validate existence of byte-compiled files

2014-04-11 Thread Éric Araujo
Changes by Éric Araujo mer...@netwok.org: -- nosy: +eric.araujo stage: - needs patch title: distutils --record option does not validate existance of byte-compiled files - distutils --record option does not validate existence of byte-compiled files versions: +Python 3.4, Python 3.5

[issue17861] put opcode information in one place

2014-04-11 Thread Éric Araujo
Éric Araujo added the comment: Patch looks good to me. -- nosy: +eric.araujo versions: +Python 3.5 -Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17861 ___

[issue17826] Setting a side_effect on mock from create_autospec doesn't work

2014-04-11 Thread Éric Araujo
Éric Araujo added the comment: Michael, a patch including tests is ready for this issue. -- nosy: +eric.araujo stage: patch review - commit review versions: +Python 3.5 -Python 3.3 ___ Python tracker rep...@bugs.python.org

[issue21177] ValueError: byte must be in range(0, 256)

2014-04-11 Thread Antoine Pitrou
Antoine Pitrou added the comment: Yet this error message still gave me a wtf moment because I didn't realize it was talking about python's range() builtin and not about mathematical term. So even though this message is technically 100% correct it still doesn't feel right. If that wtf moment

[issue17660] mock.patch could whitelist builtins to not need create=True

2014-04-11 Thread Éric Araujo
Éric Araujo added the comment: Reviewed on Rietveld. -- nosy: +eric.araujo stage: needs patch - patch review versions: +Python 3.5 -Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17660

[issue5639] Support TLS SNI extension in ssl module

2014-04-11 Thread Dima Tisnek
Dima Tisnek added the comment: Hopefully pep-466 resolves this for 2.x series. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5639 ___ ___

[issue18304] ElementTree -- provide a way to ignore namespace in tags and seaches

2014-04-11 Thread pocek
Changes by pocek po...@users.sf.net: -- nosy: +pocek ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18304 ___ ___ Python-bugs-list mailing list

[issue21197] venv does not create lib64 directory and appropriate symlinks

2014-04-11 Thread Matthias Dahl
Matthias Dahl added the comment: Take for example the case that you have to juggle with several venvs and mix them together. This has happened to me in the past in very legitimate cases. You have to add those venvs to the path yourself. I am not talking about having a shell where you do your

[issue21191] os.fdopen() may eat file descriptor and still raise exception

2014-04-11 Thread Dima Tisnek
Dima Tisnek added the comment: I think consistency between Python versions is just as important as consistency between fd types. Here's my hack quickfix outline: fd = os.open(...) try: if not stat.S_ISREG(os.fstat(fd).st_mode): raise OSError(None, Not a regular file, ...) f =

[issue21197] venv does not create lib64 directory and appropriate symlinks

2014-04-11 Thread Vinay Sajip
Vinay Sajip added the comment: What does pip do under Windows? The symlink feature doesn't work on all Windows versions and is not quite the same as on POSIX. What is it that actually requires lib64? As venvs are specific to a single interpreter, it seems like it is inherently not a good idea

[issue21194] json.dumps with ensure_ascii=False doesn't escape control characters

2014-04-11 Thread Weeble
Weeble added the comment: Ah, sorry for the confusion. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21194 ___ ___ Python-bugs-list mailing

[issue21197] venv does not create lib64 directory and appropriate symlinks

2014-04-11 Thread Matthias Dahl
Matthias Dahl added the comment: The problem is: Some Linux dists install Python under /usr/lib64 on a multilib systems and patch Python accordingly, e.g. Gentoo or Fedora. Thus, Python looks for lib64/pythonX.Y/... which is also why pip installs to lib64/... by default on those systems.

[issue21177] ValueError: byte must be in range(0, 256)

2014-04-11 Thread STINNER Victor
STINNER Victor added the comment: I suggested must be in the range [0; 255] which is not a valid Python list: ; is the instruction operator and there is range word in front of the list. In my opinion, it's much easier to read and understand it. Another example is the Unicode range(0x11).

[issue21200] pkgutil.get_loader() fails on __main__

2014-04-11 Thread Eric Snow
New submission from Eric Snow: Prior to 3.4, pkgutil.get_loader('__main__') would return None. Now it results in an ImportError. That's because it calls importlib.util.find_spec() which fails if an existing module does not have __spec__ or it is None. -- components: Library (Lib)

[issue21177] ValueError: byte must be in range(0, 256)

2014-04-11 Thread akira
akira added the comment: byte must be in range [0, 256) - it hints at the builtin `range()` -- the intuition works for those who knows what `range()` does - it uses the standard math notation for half-open intervals [1] -- no Python knowledge required (among other things) - it is not a valid

[issue21197] venv does not create lib64 directory and appropriate symlinks

2014-04-11 Thread Vinay Sajip
Vinay Sajip added the comment: Thanks for the info. I'm not opposed to adding a symlink on POSIX systems - I just wanted to make sure that was the right solution. My comment about adding links willy-nilly was about tools like Jedi that you mentioned (perhaps I misunderstood how it works).

[issue21177] ValueError: byte must be in range(0, 256)

2014-04-11 Thread Mark Lawrence
Mark Lawrence added the comment: How about plain English? byte must be between 0 and 255 inclusive -- nosy: +BreamoreBoy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21177 ___

[issue21197] venv does not create lib64 directory and appropriate symlinks

2014-04-11 Thread Ned Deily
Ned Deily added the comment: should OS X be excluded? Yes. OS X uses universal binaries, with multiple CPU archs automatically combined at build time into one file, so there generally is no need for arch-specific directories. But if the problem is being caused by Pythons patched by

[issue21194] json.dumps with ensure_ascii=False doesn't escape control characters

2014-04-11 Thread Ned Deily
Changes by Ned Deily n...@acm.org: -- resolution: - invalid stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21194 ___

[issue21158] Windows installer service could not be accessed (Python bug!)

2014-04-11 Thread Terry J. Reedy
Terry J. Reedy added the comment: If you were upgrading an existing install, try cleanly removing it from Control Panel / Programs and Features (Win 7). To do that, you may have to first fix the existing installation and that will require the installer used to install it. -- nosy:

[issue21177] ValueError: byte must be in range(0, 256)

2014-04-11 Thread Antoine Pitrou
Antoine Pitrou added the comment: I suggested must be in the range [0; 255] which is not a valid Python list: ; is the instruction operator and there is range word in front of the list. In my opinion, it's much easier to read and understand it. I'm -1 on it. It may not be a valid Python

[issue21177] ValueError: byte must be in range(0, 256)

2014-04-11 Thread Antoine Pitrou
Antoine Pitrou added the comment: Ok, seeing how the alternative proposals are all worse than the statu quo, and how this is going a massive bikeshedding anyway, I'd rather close the issue. -- resolution: - invalid status: open - closed ___ Python

[issue21201] Uninformative error message in multiprocessing.Manager()

2014-04-11 Thread Wojciech Walczak
New submission from Wojciech Walczak: While using multiprocessing.Manager() to send data between processes I've noticed that one of the traceback messages is not very informative: Traceback (most recent call last): File age_predict.py, line 39, in module train_data, train_target,

[issue19628] maxlevels -1 on compileall for unlimited recursion

2014-04-11 Thread Claudiu.Popa
Claudiu.Popa added the comment: Added patch which addresses the comments of Berker Peksag. Thanks for the review! -- Added file: http://bugs.python.org/file34786/issue19628_1.patch ___ Python tracker rep...@bugs.python.org

[issue21127] Path objects cannot be constructed from str subclasses

2014-04-11 Thread Antony Lee
Antony Lee added the comment: I am loading some structure from a MATLAB binary file using scipy.io.loadmat. This structure contains (in particular) paths (written as bytestrings) to other files which end up being loaded as numpy.str_ objects. In fact, just trying to store and retrieve

[issue21164] print unicode in Windows console

2014-04-11 Thread Terry J. Reedy
Terry J. Reedy added the comment: You can change the code page of a Command Prompt window, before calling Python, with ... chcp code-page. There is 'something' called cp65001 that is supposed to be a utf-8 codepage. Once can change to it, but it does not work right. This has been discussed on

[issue21177] ValueError: byte must be in range(0, 256)

2014-04-11 Thread Stefan Krah
Stefan Krah added the comment: Antoine Pitrou rep...@bugs.python.org wrote: I suggested must be in the range [0; 255] which is not a valid Python list: ; is the instruction operator and there is range word in front of the list. In my opinion, it's much easier to read and understand it.

[issue21170] Incorrect signature for unittest.TestResult.startTestRun(), .stopTestRun()

2014-04-11 Thread Terry J. Reedy
Terry J. Reedy added the comment: Good catch. I verified in code that patch is correct. -- assignee: docs@python - terry.reedy nosy: +terry.reedy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21170

[issue21202] Naming a file` io.py` causes cryptic error message

2014-04-11 Thread Madison May
Changes by Madison May madison@students.olin.edu: -- versions: +Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21202 ___ ___

[issue21202] Naming a file` io.py` causes cryptic error message

2014-04-11 Thread Madison May
New submission from Madison May: Naming a file `io.py` in the root directory of a project causes the following error on 2.7: AttributeError: 'module' object has no attribute 'BufferedIOBase' Similar issues arise on 3.x., although the error message is a bit more useful: Fatal Python

[issue21170] Incorrect signature for unittest.TestResult.startTestRun(), .stopTestRun()

2014-04-11 Thread Roundup Robot
Roundup Robot added the comment: New changeset c1ea2846a564 by Terry Jan Reedy in branch '2.7': Issue #21170: Removed invalid parameter names from unittest doc. http://hg.python.org/cpython/rev/c1ea2846a564 New changeset 5734175a87d1 by Terry Jan Reedy in branch '3.4': Issue #21170: Removed

[issue21170] Incorrect signature for unittest.TestResult.startTestRun(), .stopTestRun()

2014-04-11 Thread Terry J. Reedy
Changes by Terry J. Reedy tjre...@udel.edu: -- resolution: - fixed stage: patch review - committed/rejected status: open - closed type: - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21170

[issue21193] pow(a, b, c) should not raise TypeError when b is negative and c is provided

2014-04-11 Thread Roundup Robot
Roundup Robot added the comment: New changeset dc6c2ab7fec2 by Mark Dickinson in branch 'default': Issue #21193: Make (e.g.,) pow(2, -3, 5) raise ValueError rather than TypeError. Patch by Josh Rosenberg. http://hg.python.org/cpython/rev/dc6c2ab7fec2 -- nosy: +python-dev

[issue21193] pow(a, b, c) should not raise TypeError when b is negative and c is provided

2014-04-11 Thread Mark Dickinson
Mark Dickinson added the comment: Patch applied. Thanks, all. -- resolution: - fixed stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21193

[issue21171] Outdated usage str.encode('rot-13') in rot13 codec

2014-04-11 Thread Terry J. Reedy
Terry J. Reedy added the comment: Since rot_13 is a transcoder, not an encoder, the error message is correct, as is the fix for the function. However, since neither the module encodings.rot_13 nor the rot13 function in the module are documented, (not even in 2.7), I wonder if the function and

[issue21164] print unicode in Windows console

2014-04-11 Thread Leslie Klein
Leslie Klein added the comment: I start ipython in Windows PowerShell. The console I am referring to is ipython running in WindowsPowerShell. I do not use the DOS cmd.exe When running ipython notebook from WindowsPowerShell -- no problem printing unicode. When running in PTVS (Python Tools for

[issue21202] Naming a file` io.py` causes cryptic error message

2014-04-11 Thread Ned Deily
Ned Deily added the comment: Using a local module name that shadows one in the standard library is a very common import trap. See, for example, https://ncoghlan_devs-python-notes.readthedocs.org/en/latest/python_concepts/import_traps.html#the-name-shadowing-trap. I did a quick search

[issue21202] Naming a file` io.py` causes cryptic error message

2014-04-11 Thread Brett Cannon
Brett Cannon added the comment: While mentioning something in the FAQ and/or tutorial is fine, I wouldn't want to change Python's message too much to deal with this unless it was extremely fast (e.g. we pre-generated a set and check that on ImportError and then modified the message only in

[issue21202] Naming a file` io.py` causes cryptic error message

2014-04-11 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti, ncoghlan type: - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21202 ___

[issue21178] doctest cause warnings in tests using generators

2014-04-11 Thread Terry J. Reedy
Terry J. Reedy added the comment: I not am not sure I see a bug here, a discrepancy between doc and behavior. Even if not, you may have a legitimate enhancement request. 3.4 now warns about ignored exceptions during shutdown in case there is a fixable bug in the code being shut down. This is

[issue21201] Uninformative error message in multiprocessing.Manager()

2014-04-11 Thread Ned Deily
Changes by Ned Deily n...@acm.org: -- nosy: +sbt versions: -Python 3.1, Python 3.2, Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21201 ___

[issue21180] Cannot efficiently create empty array.array of given size, inconsistency with bytearray

2014-04-11 Thread Terry J. Reedy
Terry J. Reedy added the comment: You are proposing to copy behavior that will likely be deprecated and removed (see http://legacy.python.org/dev/peps/pep-0467/#id5). Lets reject that idea. The same pep proposes to replace byte(s/array)(n) by two more explicit alternate constructors

[issue21193] pow(a, b, c) should not raise TypeError when b is negative and c is provided

2014-04-11 Thread Roundup Robot
Roundup Robot added the comment: New changeset a8f3ca72f703 by Benjamin Peterson in branch 'default': test the change of #21193 correctly http://hg.python.org/cpython/rev/a8f3ca72f703 -- ___ Python tracker rep...@bugs.python.org

[issue21193] pow(a, b, c) should not raise TypeError when b is negative and c is provided

2014-04-11 Thread Mark Dickinson
Mark Dickinson added the comment: Benjamin: thanks for the fix. To be clear: Josh Rosenberg's patch had the correct test change. It was the (poorly) trained monkey who made the commit who broke the test. Sorry, all. -- ___ Python tracker

[issue21202] Naming a file` io.py` causes cryptic error message

2014-04-11 Thread Madison May
Madison May added the comment: I definitely agree that io shouldn't be special cased, as it's more about the name shadowing issue that this specific example. A simple docs addition would make me happy, to be honest. -- ___ Python tracker

[issue14758] SMTPServer of smptd does not support binding to an IPv6 address

2014-04-11 Thread R. David Murray
R. David Murray added the comment: I added some review comments. Since this is a new feature, the patch also needs a 'versionchanged' that indicates that ipv6 support was added. -- stage: needs patch - patch review versions: +Python 3.5 -Python 3.3

[issue21203] logging configurators ignoring documented options

2014-04-11 Thread Jure Koren
New submission from Jure Koren: 2.7's logging.config.DictConfig does not respect the class option, but fileConfig does. The default branch logging.config has the same problem in DictConfig, but also lacks style support in fileConfig. -- components: Library (Lib) files:

[issue21203] logging configurators ignoring documented options

2014-04-11 Thread Jure Koren
Jure Koren added the comment: 2.7's logging.config.DictConfig does not respect the class option, but fileConfig does. The default branch logging.config has the same problem in DictConfig, but also lacks style support in fileConfig. -- hgrepos: +234 Added file:

[issue1191964] asynchronous Subprocess

2014-04-11 Thread Josiah Carlson
Josiah Carlson added the comment: I added the chunking for Windows because in manual testing before finishing the patch, I found that large sends on Windows without actually waiting for the result can periodically result in zero data sent, despite a child process that wants to read. Looking

[issue21204] published examples don't work

2014-04-11 Thread jmaki
New submission from jmaki: Would you consider putting examples given in official documentation as part of release testing? e.g. (from official python.org documentation): - snip - An example of how a pool of worker processes can each run a

[issue7951] Should str.format allow negative indexes when used for __getitem__ access?

2014-04-11 Thread Terry J. Reedy
Terry J. Reedy added the comment: Either leading sign, '+' or '-', cause string interpretation, so I think 'unsigned integer' should be the term in the doc. '{0[-1]}'.format({'-1': 'neg int key'}) 'neg int key' '{0[+1]}'.format({'+1': 'neg int key'}) 'neg int key' '{0[+1]}'.format([1,2,3])

[issue21171] Outdated usage str.encode('rot-13') in rot13 codec

2014-04-11 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@gmail.com: -- nosy: +ncoghlan ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21171 ___ ___

[issue15955] gzip, bz2, lzma: add option to limit output size

2014-04-11 Thread Nikolaus Rath
Nikolaus Rath added the comment: I've attached the second iteration of the patch. I've factored out a new function decompress_buf, and added two new (C only) instance variables input_buffer and input_buffer_size. I've tested the patch by enabling Py_USING_MEMORY_DEBUGGER in

[issue21203] logging configurators ignoring documented options

2014-04-11 Thread Ned Deily
Changes by Ned Deily n...@acm.org: -- nosy: +vinay.sajip ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21203 ___ ___ Python-bugs-list mailing list

[issue21196] Name mangling example in Python tutorial

2014-04-11 Thread Éric Araujo
Éric Araujo added the comment: Thanks for the report and proposed fix! Could you upload a patch file that we could directly apply to the documentation instead of Python files? More information about how to do that is found here: https://docs.python.org/devguide/#quick-start If you need any