[issue15582] Enhance inspect.getdoc to follow inheritance chains

2015-04-18 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- status: closed -> open ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:/

[issue15582] Enhance inspect.getdoc to follow inheritance chains

2015-04-18 Thread Martin Panter
Martin Panter added the comment: Sometimes the doc string for the overridden method does not make much sense in the context of the subclass. Just wondering if this was considered; it seems like a fairly serious downside to this new feature. E.g. in a package I am reviewing, there is a class th

[issue20180] Derby #11: Convert 50 sites to Argument Clinic across 9 files

2015-04-18 Thread Larry Hastings
Larry Hastings added the comment: Sadly, for political reasons, it's best that we not convert collections, itertools, or random for now. I'll update this issue if the situation changes. Sorry about that! -- ___ Python tracker

[issue24002] Add un-parse function to ast

2015-04-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I think there is standard way to transform ast to bytecode and evaluate it. -- ___ Python tracker ___

[issue24002] Add un-parse function to ast

2015-04-18 Thread Larry Hastings
Larry Hastings added the comment: Actually eval(ast) is all I need for #23967 too. But eval is a builtin, so it feels wrong to have it supporting--and therefore dependent on--ast. -- ___ Python tracker __

[issue24002] Add un-parse function to ast

2015-04-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: For issue24001 you need rather eval(ast). But a function for stringifying ast would be useful in any case. -- ___ Python tracker ___

[issue23920] Should Clinic have "nullable" or types=NoneType?

2015-04-18 Thread Larry Hastings
Larry Hastings added the comment: Oh, I misremembered. The name "allow_none" was inflicted on me by python-dev, in this thread: https://mail.python.org/pipermail/python-dev/2014-August/135650.html -- ___ Python tracker

[issue24002] Add un-parse function to ast

2015-04-18 Thread Larry Hastings
Larry Hastings added the comment: Good idea, I'll go ahead and borrow Guido's time machine. https://docs.python.org/3/library/ast.html#ast.NodeVisitor However, NodeVisitor does not transform the ast tree back into text. So in what way is this helpful? Also, for what it's worth: both my use

[issue24002] Add un-parse function to ast

2015-04-18 Thread Berker Peksag
Berker Peksag added the comment: Perhaps a NodeVisitor subclass (something like Armin Ronacher's codegen module https://github.com/berkerpeksag/astor/blob/master/astor/codegen.py#L54 can be added to the ast module. -- nosy: +berker.peksag ___ Python

[issue24001] Clinic: use raw types in types= set

2015-04-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: accept= (or accept_types=) LGTM. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsub

[issue23920] Should Clinic have "nullable" or types=NoneType?

2015-04-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: accepts_none=True looks as "doesn't accept anything" to me. -- ___ Python tracker ___ ___ Python-b

[issue24002] Add un-parse function to ast

2015-04-18 Thread Larry Hastings
Changes by Larry Hastings : -- nosy: +serhiy.storchaka, zach.ware ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe

[issue24001] Clinic: use raw types in types= set

2015-04-18 Thread Larry Hastings
Larry Hastings added the comment: I should mention that evalify_node() is pretty hacked up here, and is not ready to be checked in. (I'm proposing separately that we simply add something like this directly into the standard library, see issue #24002.) -- _

[issue23967] Make inspect.signature expression evaluation more powerful

2015-04-18 Thread Larry Hastings
Larry Hastings added the comment: I should mention that evalify_node() is pretty hacked up here, and is not ready to be checked in. (I'm proposing separately that we simply add something like this directly into the standard library, see issue #24002.) -- _

[issue24002] Add un-parse function to ast

2015-04-18 Thread Larry Hastings
New submission from Larry Hastings: Twice recently I've wanted a function that transforms an AST node tree back into text: * In the hacked-up Tools/clinic/clinic.py for issue #24001 * In the hacked-up Lib/inspect.py for issue #23967 Both times I did a half-assed job just to get the patch worki

[issue24001] Clinic: use raw types in types= set

2015-04-18 Thread Larry Hastings
Larry Hastings added the comment: Should types= be renamed accept= ? It's a set of the types of the Python objects that this parameter should accept. -- ___ Python tracker ___

[issue23920] Should Clinic have "nullable" or types=NoneType?

2015-04-18 Thread Larry Hastings
Larry Hastings added the comment: I'm now converging on changing types= to accept a set of real types, see issue #24001. That change has an impact on this decision. (By the way, let's assume that if "nullable", I have to rename it to "accepts_none". I'll use that name below.) What makes me

[issue23275] Can assign [] = (), but not () = []

2015-04-18 Thread Martin Panter
Martin Panter added the comment: I would prefer this be fixed in the opposite direction, to allow “unpacking” an empty iterable using round brackets. I have used this syntax on purpose as a concise way to ensure that a generator is exhaused with no more yields: >>> def gen(): ... yield "pa

[issue23275] Can assign [] = (), but not () = []

2015-04-18 Thread Nick Coghlan
Nick Coghlan added the comment: As Raymond notes, this is a fairly harmless quirk - it changes a SyntaxError to an iterable length dependent ValueError: >>> () = [] File "", line 1 SyntaxError: can't assign to () >>> [] = () >>> [] = [1] Traceback (most recent call last): File "", line 1, i

[issue15566] tarfile.TarInfo.frombuf documentation is out of date

2015-04-18 Thread Berker Peksag
Berker Peksag added the comment: Thanks! -- nosy: +berker.peksag resolution: -> fixed stage: commit review -> resolved status: open -> closed versions: -Python 3.2, Python 3.3 ___ Python tracker _

[issue15566] tarfile.TarInfo.frombuf documentation is out of date

2015-04-18 Thread Roundup Robot
Roundup Robot added the comment: New changeset d737ab3ea1ae by Berker Peksag in branch '3.4': Issue #15566: Document encoding and errors parameters of TarInfo.frombuf(). https://hg.python.org/cpython/rev/d737ab3ea1ae New changeset 85cba64e24dc by Berker Peksag in branch 'default': Issue #15566:

[issue17227] devguide: buggy heading numbers

2015-04-18 Thread Berker Peksag
Berker Peksag added the comment: Thanks! The patch doesn't address msg182641 and I think this is a Sphinx bug(or perhaps a feature request?). tocdepth should not change the heading numbers. I couldn't find any similar report on the Sphinx issue tracker. So I suggest opening an issue there and

[issue24001] Clinic: use raw types in types= set

2015-04-18 Thread Larry Hastings
New submission from Larry Hastings: New proposed semantics for the types= parameter to converters: where possible, pass in actual types. The resulting syntax: c: int(types={str}) # maps to 'U' s: str(types={str, robuffer}, length=True, zeroes=True) # maps to 's#' Since "buffer", "robuffer

[issue24000] More fixes for the Clinic mapping of converters to format units

2015-04-18 Thread Larry Hastings
New submission from Larry Hastings: I found another bug in the mapping of converters to format units. (s#, z#, and y# all allow zeroes.) I've redone the approach for str_converter in an attempt to make it easier to read. It'd be swell if, after this gets checked in (or rejected), somebody *e

[issue23725] update tempfile docs to say that TemporaryFile is secure

2015-04-18 Thread Zbyszek Jędrzejewski-Szmek
Zbyszek Jędrzejewski-Szmek added the comment: v6: - add newline -- Added file: http://bugs.python.org/file39112/tempfile_docs.patch ___ Python tracker ___ ___

[issue15566] tarfile.TarInfo.frombuf documentation is out of date

2015-04-18 Thread Martin Panter
Martin Panter added the comment: Very simple documentation fix; looks good to me. -- nosy: +vadmium stage: needs patch -> commit review versions: +Python 3.4, Python 3.5 ___ Python tracker _

[issue23740] http.client request and send method have some datatype issues

2015-04-18 Thread Akshit Khurana
Changes by Akshit Khurana : -- nosy: +axitkhurana ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.

[issue23901] Force console stdout to use UTF8 on Windows

2015-04-18 Thread STINNER Victor
STINNER Victor added the comment: If sys.stdout is modified, it must be carefully tested in various scenario: - Windows console, default config - Windows console, TrueType font - PowerShell => see #21927, it looks like PowerShell has its own set of Unicode issues - Redirect output into a file -

[issue16930] mention limitations and/or alternatives to hg graft

2015-04-18 Thread Carol Willing
Changes by Carol Willing : -- assignee: -> willingc nosy: +willingc ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscr

[issue16931] mention work-around to create diffs in default/non-git mode

2015-04-18 Thread Carol Willing
Changes by Carol Willing : -- assignee: -> willingc nosy: +willingc ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscr

[issue23999] Undefined behavior in dtoa.c (rshift 32 of 32bit data type)

2015-04-18 Thread Christian Heimes
New submission from Christian Heimes: Coverity has found undefined behavior in dtoa.c:d2b(). lo0bits() can return 32 which z >>= 32, where z is an uint32. I've talked to doku at PyCon. He suggested to update dtoa.c to a more recent version. Our copy is based on a version from 2001. There are m

[issue17227] devguide: buggy heading numbers

2015-04-18 Thread Carol Willing
Carol Willing added the comment: Correct Python Developer FAQ Section 28 to match the style of Section 27. Section numbers should now flow correctly in Sphinx. A section contents is displayed at the top of the section page for the user's convenience (especially since the FAQ questions have lon

[issue23998] PyImport_ReInitLock() doesn't check for allocation error

2015-04-18 Thread Christian Heimes
New submission from Christian Heimes: _PyImport_ReInitLock() doesn't check the return value of PyThread_allocate_lock(). A failed lock allocation can either lead to a NULL pointer dereference or to race conditions caused by a missing import lock. As there is no way to recover from a failed loc

[issue23997] unicodedata_UCD_lookup() has theoretical buffer overflow

2015-04-18 Thread Christian Heimes
New submission from Christian Heimes: Coverity has found a potential buffer overflow in the unicodedata module. The function call _getcode() which calls _cmpname(). _cmpname() copies data into fixed size buffer of length NAME_MAXLEN. Neither lookup() nor _getcode() limit name_length to NAME_MA

[issue23993] Use surrogateescape error handler by default in open() if the LC_CTYPE locale is C at startup

2015-04-18 Thread STINNER Victor
STINNER Victor added the comment: > "if you are using the C locale you or the OS are broken anyway, so we'll just > pass the bytes through" Exactly. Even if you use Unicode, the Python 3 str type, you store text as raw bytes (in a custom format, as surrogate characters). > I'm not entirely co

[issue23992] multiprocessing: MapResult shouldn't fail fast upon exception

2015-04-18 Thread Davin Potts
Davin Potts added the comment: This is a nice example demonstrating what I agree is a problem with the current implementation of close. A practical concern with what I believe is being proposed in your trivial fix: if the workers are engaged in very long-running tasks (and perhaps slowly wri

[issue23984] Documentation error: Descriptors

2015-04-18 Thread Raymond Hettinger
Raymond Hettinger added the comment: In addition to being broken, the code is a crummy example that gives no hint of why one might want to use a staticmethod. -- ___ Python tracker

[issue23496] Steps for Android Native Build of Python 3.4.2

2015-04-18 Thread Cyd Haselton
Cyd Haselton added the comment: Ryan, Sorry...same problem. Segmentation fault generate-posix-vars failed make: *** [pybuilddir.txt] Error 1 /bld/python/cpython-master/cpython $ addr2line -C -f -e /lib/libpython3.5m.so.1.0 0008f42c _PyMem_RawStrdup /bld/python/cpython-master/cpython/Objects/obm

[issue23995] msvcrt could not be imported

2015-04-18 Thread Steve Dower
Steve Dower added the comment: You're right, we should be able to remove the ifdef for these (or hide them behind MS_WINDOWS if necessary). -- ___ Python tracker ___ ___

[issue23979] Multiprocessing Pool.map pickles arguments passed to workers

2015-04-18 Thread Davin Potts
Davin Potts added the comment: Though it's been discussed elsewhere, issue17560 is a good one where the matter of "really big" objects are being communicated between processes via multiprocessing. In it, Richard shares some detail about the implementation in multiprocessing, its constraints a

[issue23996] _PyGen_FetchStopIterationValue() crashes on unnormalised exceptions

2015-04-18 Thread Stefan Behnel
New submission from Stefan Behnel: The yield-from implementation calls _PyGen_FetchStopIterationValue() to get the exception value. If the StopIteration exception is not normalised, e.g. because it was set by PyErr_SetObject() in a C extension, then _PyGen_FetchStopIterationValue() will cast t

[issue23995] msvcrt could not be imported

2015-04-18 Thread eryksun
eryksun added the comment: The new CRT used by 3.5 has a separate header, corecrt_wconio.h, for declarations shared by conio.h and wchar.h. Thus the _WCONIO_DEFINED macro is no longer defined, and consequently PC/msvcrtmodule.c skips defining getwch, getwche, putwch, and ungetwch. I guess thi

[issue23990] Callable builtin doesn't respect descriptors

2015-04-18 Thread R. David Murray
R. David Murray added the comment: They use isinstance, except for a couple that also check co_flags, and the ones that check if the object is a descriptor. I haven't thought this through fully, but I think this means that in general the descriptor protocol has been invoked or not by the call

[issue23990] Callable builtin doesn't respect descriptors

2015-04-18 Thread R. David Murray
R. David Murray added the comment: Oops, I accidentally changed the bug status due to not refreshing before I posted. -- resolution: not a bug -> stage: resolved -> status: closed -> open versions: +Python 3.5 -Python 2.7, Python 3.2, Python 3.3, Python 3.4 __

[issue23990] Callable builtin doesn't respect descriptors

2015-04-18 Thread Ethan Furman
Ethan Furman added the comment: Perhaps callable() should be in the inspect module? ;) Speaking of which, how do all the is... functions there work with this descriptor implementation? -- ___ Python tracker

[issue23995] msvcrt could not be imported

2015-04-18 Thread R. David Murray
R. David Murray added the comment: Can you reproduce this without involving Django? That would make it more likely that someone will have time to take a look at it. -- nosy: +r.david.murray ___ Python tracker ___

[issue23725] update tempfile docs to say that TemporaryFile is secure

2015-04-18 Thread R. David Murray
R. David Murray added the comment: Oh, because of the O_TMPDIR bits, this patch is only applicable to 3.5, so I'm removing 3.4 from versions. I don't think it is worth it to make a version that would apply to 3.4, since it is not the case that the 3.4 docs are *wrong*. -- versions: -

[issue23725] update tempfile docs to say that TemporaryFile is secure

2015-04-18 Thread R. David Murray
R. David Murray added the comment: Made one minor suggestion in review comments (related to that deleted line). Otherwise this looks good to me, thanks. -- ___ Python tracker _

[issue23971] dict(list) and dict.fromkeys() doesn't account for 2/3 fill ratio

2015-04-18 Thread Gregory P. Smith
Gregory P. Smith added the comment: fwiw, as for 2.7 i personally don't think I would change its behavior around this at this point. make sure 3.5+ do something desirable. (my link to dictobject.c above is from 2.7) -- ___ Python tracker

[issue23992] multiprocessing: MapResult shouldn't fail fast upon exception

2015-04-18 Thread Ned Deily
Changes by Ned Deily : -- nosy: +davin, sbt ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python

[issue23971] dict(list) and dict.fromkeys() doesn't account for 2/3 fill ratio

2015-04-18 Thread Gregory P. Smith
Gregory P. Smith added the comment: Won't we always consume the memory thanks to a memset(newtable, 0, ...) https://hg.python.org/cpython/file/df28044b7e14/Objects/dictobject.c#l654 ? (also, i'm not sure if Windows is allocates mapped pages on demand as posix systems tend to) -- nosy:

[issue23982] Tkinter in Python 3.4 for Windows incorrectly renders certain colors using non-TclTk RGB values

2015-04-18 Thread Ned Deily
Ned Deily added the comment: Current source releases of Python do not specify which version of Tk they should be run with; that is largely up to the distributors of Python (including python.org binary installers for Windows and OS X) and the conventions of the platform the instances are runnin

[issue23993] Use surrogateescape error handler by default in open() if the LC_CTYPE locale is C at startup

2015-04-18 Thread R. David Murray
R. David Murray added the comment: Hmm. Upon reflection I guess I can see the validity of "if you are using the C locale you or the OS are broken anyway, so we'll just pass the bytes through". I'm not entirely convinced this won't cause issues, but I suppose it might not cause any more issue

[issue23989] Add recommendation to use requests to the documentation, per summit

2015-04-18 Thread Gregory P. Smith
Gregory P. Smith added the comment: nice and simple. that wording looks good to me. -- nosy: +gregory.p.smith ___ Python tracker ___ _

[issue23994] argparse fails to detect program name when there is a slash at the end of the program's path

2015-04-18 Thread Gregory P. Smith
Gregory P. Smith added the comment: I think this was just overlooked when implementing argparse. Most code out there is likely to get the executable name using: os.path.basename(sys.argv[0]) Which is going to do exactly what you are seeing here when sys.argv[0] ends with a /. feel free to s

[issue23990] Callable builtin doesn't respect descriptors

2015-04-18 Thread R. David Murray
R. David Murray added the comment: I understand Ionel's point, and it is indeed 'callable' that is the outlier here. It only looks for the *existence* of the attribute, rather than actually retrieving it through the descriptor protocol (and therefore getting the AttributeError from the proper

[issue23995] msvcrt could not be imported

2015-04-18 Thread petrikas
petrikas added the comment: Edit: I am using a windows 8.1 system and django 1.8 -- ___ Python tracker ___ ___ Python-bugs-list mailin

[issue23995] msvcrt could not be imported

2015-04-18 Thread petrikas
New submission from petrikas: Python cannot access msvcrt's putwch() when using manage.py syncdb To reproduce: 1. Call manage.py syncdb and try to create a new superuser 2. It crashes after inputting email (or before asking for the password) Reproducible with 3.5a3, seems to be a regression fro

[issue23496] Steps for Android Native Build of Python 3.4.2

2015-04-18 Thread Ryan Gonzalez
Ryan Gonzalez added the comment: Here: diff -r 38f5b3beeb2a Python/pylifecycle.c --- a/Python/pylifecycle.c Thu Mar 19 15:16:03 2015 -0500 +++ b/Python/pylifecycle.c Sat Apr 18 13:07:36 2015 -0500 @@ -217,6 +217,10 @@ char codepage[100]; PyOS_snprintf(codepage, sizeof(codepage), "cp%d"

[issue23990] Callable builtin doesn't respect descriptors

2015-04-18 Thread Christian Heimes
Christian Heimes added the comment: On 2015-04-18 19:43, Ionel Cristian Mărieș wrote: > > Ionel Cristian Mărieș added the comment: > > On Sat, Apr 18, 2015 at 8:35 PM, Christian Heimes > wrote: > >> You also haven't shown that this behavior violates the documentation and >> language spec. >

[issue23964] Update README documentation for IDLE tests.

2015-04-18 Thread Al Sweigart
Al Sweigart added the comment: I'll add a note about running the human-mediated tests to section 0. Running "python -m test.test_idle" for 64-bit 3.4.3 on Windows 7 works fine for me ("Ran 142 tests in 0.605s OK") I'll take out the indented code. You make a good point about copy/paste. I've a

[issue23994] argparse fails to detect program name when there is a slash at the end of the program's path

2015-04-18 Thread Mert Bora Alper
New submission from Mert Bora Alper: Sorry if the title is not descriptive enough. When I try to execute a program from a directory which contains an `__main__.py` file, argparse fails to detect programs name. For example: $ ls foo __main__.py $ python3 foo usage: foo [-h] [-c

[issue23990] Callable builtin doesn't respect descriptors

2015-04-18 Thread Ionel Cristian Mărieș
Ionel Cristian Mărieș added the comment: On Sat, Apr 18, 2015 at 8:35 PM, Christian Heimes wrote: > You also haven't shown that this behavior violates the documentation and > language spec. ​How can I show it violates the "spec" when there's not such thing? :-) AFAIK, `callable` is not specifi

[issue23496] Steps for Android Native Build of Python 3.4.2

2015-04-18 Thread Cyd Haselton
Cyd Haselton added the comment: Do you have the time/means to create a quick patch for that? I ask because even a simple flip like that becomes a major pain when working with nano on a tablet. If not, I'll start on it. Just thought I"d ask -- ___ P

[issue23990] Callable builtin doesn't respect descriptors

2015-04-18 Thread Christian Heimes
Christian Heimes added the comment: All major Python implementation have a mutual agreement that callable() just checks for a __call__ member on the type. You also haven't shown that this behavior violates the documentation and language spec. The check for existence of __call__ on the type is

[issue23990] Callable builtin doesn't respect descriptors

2015-04-18 Thread Ethan Furman
Ethan Furman added the comment: I am happy to be proven wrong. :) -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubsc

[issue15786] IDLE code completion window can hang or misbehave with mouse

2015-04-18 Thread Al Sweigart
Al Sweigart added the comment: Additionally, pressing tab after the autocomplete window has appeared should not just update the text but also close the autocomplete window. The repro steps are (on Windows 7 64-bit, Python 3.5): 1. Type "pri" 2. Press Ctrl+Space or click Edit > Show Completions

[issue23961] IDLE autocomplete window does not automatically close when selection is made

2015-04-18 Thread Al Sweigart
Al Sweigart added the comment: I should clarify: I'm referring to the "Show Completion" feature. The repro steps are (on Windows 7 64-bit, Python 3.5) 1. Type "pri" 2. Press Ctrl+Space or click Edit > Show Completions. The autocomplete window appears. 3. Press Tab. The text updates from "pri"

[issue23984] Documentation error: Descriptors

2015-04-18 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- assignee: docs@python -> rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubsc

[issue23496] Steps for Android Native Build of Python 3.4.2

2015-04-18 Thread Ryan Gonzalez
Ryan Gonzalez added the comment: Ok...try going to Python/pylifecycle.c and changing lines 220-230 from: #elif defined(HAVE_LANGINFO_H) && defined(CODESET) char* codeset = nl_langinfo(CODESET); if (!codeset || codeset[0] == '\0') { PyErr_SetString(PyExc_ValueError, "CODESET is no

[issue23990] Callable builtin doesn't respect descriptors

2015-04-18 Thread Ionel Cristian Mărieș
Ionel Cristian Mărieș added the comment: Turns out I've replied through email, and code got mangled. This is the correct version: class GenericProxy: def __init__(self, proxied): self.proxied = proxied @property def __iter__(self): if not hasattr(self.proxied, '__it

[issue23990] Callable builtin doesn't respect descriptors

2015-04-18 Thread Ionel Cristian Mărieș
Ionel Cristian Mărieș added the comment: On Sat, Apr 18, 2015 at 7:23 PM, Ethan Furman wrote: > > class GenericProxy: > def __init__(self, proxied): > self.proxied = proxied > # in case proxied is an __iter__ iterator > @property > def __iter__(self): >

[issue23955] Add python.ini file for embedded/applocal installs

2015-04-18 Thread Steve Dower
Steve Dower added the comment: Arguably we should be making 'home' in pyvenv.cfg relative to the pyvenv.cfg file's directory anyway... AFAIK it's always generated as an absolute path, but I see no good reason to prevent people from manually configuring a relative path here. -- __

[issue23990] Callable builtin doesn't respect descriptors

2015-04-18 Thread Ethan Furman
Ethan Furman added the comment: Your example shows /having/ an iterator, while mine is /being/ an iterator. A simple iterator: # iterator protocol class uc_iter(): def __init__(self, text): self.text = text self.index = 0 def __iter__(self): return

[issue23955] Add python.ini file for embedded/applocal installs

2015-04-18 Thread Steve Dower
Steve Dower added the comment: I could reuse the venv config file but it would need a new property to forcibly use the 'home' value regardless of whether '$home\Lib\os.py' exists (in case the stdlib is zipped) and to make it relative to the file's path rather than the user's current directory.

[issue5784] raw deflate format and zlib module

2015-04-18 Thread A.M. Kuchling
A.M. Kuchling added the comment: Thanks! Here's an updated version with some more rewriting -- the list is now in only one place and is linked-to from the decompression documentation. -- Added file: http://bugs.python.org/file39105/patch-5784.txt ___

[issue23725] update tempfile docs to say that TemporaryFile is secure

2015-04-18 Thread Zbyszek Jędrzejewski-Szmek
Changes by Zbyszek Jędrzejewski-Szmek : Added file: http://bugs.python.org/file39104/tempfile_docs.patch ___ Python tracker ___ ___ Python-bug

[issue23725] update tempfile docs to say that TemporaryFile is secure

2015-04-18 Thread Zbyszek Jędrzejewski-Szmek
Zbyszek Jędrzejewski-Szmek added the comment: Replying to review here... I get 500 server error in the patch review reply dialogue :( On 2015/04/15 02:40:14, r.david.murray wrote: > http://bugs.python.org/review/23725/diff/14592/Doc/library/tempfile.rst > File Doc/library/tempfile.rst (left): >

[issue23993] Use surrogateescape error handler by default in open() if the LC_CTYPE locale is C at startup

2015-04-18 Thread STINNER Victor
STINNER Victor added the comment: For a more concrete use case, see the "makefile problem" in Mercurial wiki page: http://mercurial.selenic.com/wiki/EncodingStrategy#The_.22makefile_problem.22 -- ___ Python tracker

[issue23993] Use surrogateescape error handler by default in open() if the LC_CTYPE locale is C at startup

2015-04-18 Thread STINNER Victor
Changes by STINNER Victor : -- title: Use surrogateescape error handler by default in open() if the locale is C -> Use surrogateescape error handler by default in open() if the LC_CTYPE locale is C at startup ___ Python tracker

[issue23993] Use surrogateescape error handler by default in open() if the locale is C

2015-04-18 Thread STINNER Victor
STINNER Victor added the comment: > I am -1 on this. (Or may be more). What's the rationale? See the issue #19977. In many cases you get the C locale by mistake. For example, by setting the LANG environment variable to an empty string to run a program in english (whereas LC_MESSAGES is the

[issue23993] Use surrogateescape error handler by default in open() if the locale is C

2015-04-18 Thread STINNER Victor
STINNER Victor added the comment: Updated and better patch: version 2. - revert changes on fileutils.c: it's not useful to check for check_force_ascii(), because this function is more strict than checking of the LC_CTYPE is "C" - fix _pyio.py: add sys import - complete the documentation - test

[issue23993] Use surrogateescape error handler by default in open() if the locale is C

2015-04-18 Thread R. David Murray
R. David Murray added the comment: I am -1 on this. (Or may be more). What's the rationale? I could see using utf-8 by default if the locale is C, but I don't think we want to encourage going back to a world where people don't pay attention to the encoding of their data. A more productive a

[issue20962] Rather modest chunk size in gzip.GzipFile

2015-04-18 Thread Martin Panter
Martin Panter added the comment: The gzip (as well as LZMA and bzip) modules should now use buffer and chunk sizes of 8 KiB (= io.DEFAULT_BUFFER_SIZE) for most read() and seek() type operations. I have a patch that adds a buffer_size parameter to the three compression modules if anyone is int

[issue5784] raw deflate format and zlib module

2015-04-18 Thread Martin Panter
Martin Panter added the comment: Looks good in general (apart from one grammar comment). It might be best to only include one copy, and reference the others. There are actually three places “wbits” is allowed that I can see: * compressobj() * decompress() * decompressobj() Maybe just pointing

[issue5784] raw deflate format and zlib module

2015-04-18 Thread A.M. Kuchling
Changes by A.M. Kuchling : -- stage: needs patch -> patch review ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue23536] Add explicit information on config file format not supporting filters

2015-04-18 Thread Roundup Robot
Roundup Robot added the comment: New changeset df28044b7e14 by Vinay Sajip in branch '2.7': Issue #23536: Clarified scope of fileConfig()'s API. https://hg.python.org/cpython/rev/df28044b7e14 New changeset 968c086bf6cc by Vinay Sajip in branch '3.4': Issue #23536: Clarified scope of fileConfig()

[issue17703] Trashcan mechanism segfault during interpreter finalization in Python 2.7.4

2015-04-18 Thread Daniel
Daniel added the comment: Guillaume already mentioned this, its still causing a Fatal Error. To fix this PyThreadState_GET() in Py_TRASHCAN_SAFE_BEGIN must be replaced with _PyThreadState_Current #define Py_TRASHCAN_SAFE_BEGIN(op) \ do { \ PyThreadState *_tstate = _PyThreadState_Cu

[issue10544] yield expression inside generator expression does nothing

2015-04-18 Thread levkivskyi
levkivskyi added the comment: I would like to add that since the introduction of asyncio module that heavily uses "yield from" syntax, binding of yield inside comprehensions/generator expressions could lead to unexpected results/confusing behavior. See for example this question on SO: http://

[issue5784] raw deflate format and zlib module

2015-04-18 Thread A.M. Kuchling
A.M. Kuchling added the comment: Here's a short patch that expands the discussion of wbits, and duplicates it under both the compressobj() and decompress() methods. Should I avoid the duplication and just have a reference? -- nosy: +akuchling Added file: http://bugs.python.org/file391

[issue17475] Better doc on using python-gdb.py

2015-04-18 Thread Carol Willing
Carol Willing added the comment: The current devguide on gdb (https://docs.python.org/devguide/gdb.html?highlight=gdb) satisfies this issue. I am marking this languishing issue as a duplicate and closing it. -- nosy: +willingc resolution: -> duplicate stage: patch review -> resolved

[issue16574] clarify policy on updates to final peps

2015-04-18 Thread Carol Willing
Carol Willing added the comment: This patch should close this languishing devguide issue. This patch adds wording suggested by Terry Reedy re: pep documentation reference to section 7.4.5 Inline markup (https://docs.python.org/devguide/documenting.html#id3). The devguide covers the pep process

[issue23990] Callable builtin doesn't respect descriptors

2015-04-18 Thread Ionel Cristian Mărieș
Ionel Cristian Mărieș added the comment: > This is exactly analogous to what you are seeing with __call__ and callable(). Your example is incorrect, __next__ is what makes an object iterable but not what makes an object have an iterator (what __iter__ does). This correctly characterises the is

[issue23993] Use surrogateescape error handler by default in open() if the locale is C

2015-04-18 Thread STINNER Victor
STINNER Victor added the comment: The patch is a work-in-progress, I didn't have time to run unit tests, and the documentation is not completed. -- ___ Python tracker ___ __

[issue23993] Use surrogateescape error handler by default in open() if the locale is C

2015-04-18 Thread STINNER Victor
New submission from STINNER Victor: As a following of the issue #19977, I propose to use also the surrogateescape error handler in open() by default if the locale is C. Attached issue adds a new sys.getdefaulterrorhandler() function and use it in io.TextIOWrapper (and _pyio.TextIOWrapper). We

[issue23992] multiprocessing: MapResult shouldn't fail fast upon exception

2015-04-18 Thread Charles-François Natali
New submission from Charles-François Natali: hanger.py """ from time import sleep def hang(i): sleep(i) raise ValueError("x" * 1024**2) """ The following code will deadlock on pool.close(): """ from multiprocessing import Pool from time import sleep from hanger import hang with Poo

[issue19051] Unify buffered readers

2015-04-18 Thread Martin Panter
Martin Panter added the comment: The LZMA, gzip and bzip modules now all use BufferedReader, so Serhiy’s patch is no longer relevant for them. Serhiy’s patch also changed the zipfile module, which may be still relevant. On the other hand, perhaps it would be more ideal to use BufferedReader fo

[issue23991] ZipFile sanity checks

2015-04-18 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- nosy: +alanmcintyre, serhiy.storchaka, twouters ___ Python tracker ___ ___ Python-bugs-list mailing l

[issue13756] Python3.2.2 make fail on cygwin

2015-04-18 Thread Masayuki Yamamoto
Changes by Masayuki Yamamoto : -- nosy: +masamoto ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.