[issue15783] decimal.localcontext(None) fails when using the C accelerator module

2012-08-28 Thread Nick Coghlan
Nick Coghlan added the comment: Note that it's only the 3.2 interactive help that specifies ctx=None, and it's almost certainly lifting that directly from the Python implementation. The C implementation is definitely in compliance with the prose docs, which give the signature as

[issue9694] argparse required arguments displayed under optional arguments

2012-08-28 Thread Martin Burger
Changes by Martin Burger m...@rtin-burger.net: -- nosy: +mburger ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9694 ___ ___ Python-bugs-list

[issue14880] csv.reader and .writer use wrong kwargs notation in 2.7 docs

2012-08-28 Thread Hynek Schlawack
Hynek Schlawack added the comment: What does bother you? Both sigs look like in py3 if I'm looking correctly. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14880 ___

[issue15775] Add StopParser() to expat

2012-08-28 Thread Nemeskey Dávid
Nemeskey Dávid added the comment: OK, then this issue has a bug part, too: it is not mentioned in the documentation that exceptions from the handler methods propagate through the Parse() method. I guess the parser can be then stopped in this way too, but it is a dirty method as opposed to

[issue15789] mention shell-like parts of the std lib in the subprocess docs

2012-08-28 Thread Chris Rebert
Chris Rebert added the comment: Revised patch in response to comments. -- Added file: http://bugs.python.org/file27029/subprocess.rst.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15789

[issue15794] test_importlib: test_locks failure

2012-08-28 Thread Stefan Krah
Stefan Krah added the comment: The patch works fine here (as expected). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15794 ___ ___

[issue11176] give more meaningful argument names in argparse documentation

2012-08-28 Thread David Lam
David Lam added the comment: here's a patch that covers all but one of the foo/bar/baz examples it also has fixes for the sample code near the beginning from the review Ezio did the one example I didn't do was the Arguments containing - part. I guess it felt like changing the names in that

[issue1185124] pydoc doesn't find all module doc strings

2012-08-28 Thread Mike Hoy
Changes by Mike Hoy mho...@gmail.com: -- nosy: +mikehoy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1185124 ___ ___ Python-bugs-list mailing

[issue11964] Undocumented change to indent param of json.dump in 3.2

2012-08-28 Thread Roundup Robot
Roundup Robot added the comment: New changeset 5bff555168ab by Petri Lehtinen in branch '3.2': #11964: Document a change in v3.2 to the json indent parameter http://hg.python.org/cpython/rev/5bff555168ab New changeset 0fb511659ef4 by Petri Lehtinen in branch 'default': #11964: Document a change

[issue11964] Undocumented change to indent param of json.dump in 3.2

2012-08-28 Thread Petri Lehtinen
Petri Lehtinen added the comment: Fixed, thanks. -- resolution: - fixed stage: commit review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11964

[issue14880] csv.reader and .writer use wrong kwargs notation in 2.7 docs

2012-08-28 Thread Petri Lehtinen
Petri Lehtinen added the comment: Well, I wasn't sure about [optional] params before **kwargs. But if that's ok, then I think the patch is good. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14880

[issue15797] bdist_msi does not pass -install/remove flags to install_script

2012-08-28 Thread B Maqueira
New submission from B Maqueira: When building an msi package using the --install-script=xx.py, the script xx.py is called on msi package install/removal as expected. However the cmd line flags -install/-remove are not passed to the script making it hard to write step specific code. I

[issue9668] strings in json.dump in '' instead of

2012-08-28 Thread Petri Lehtinen
Petri Lehtinen added the comment: No activity in 2 years, closing. -- nosy: +petri.lehtinen status: pending - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9668 ___

[issue11489] json.dumps not parsable by json.loads (on Linux only)

2012-08-28 Thread Petri Lehtinen
Petri Lehtinen added the comment: Bear in mind that Douglas Crockford thinks a JSON document is valid even if it contains unpaired surrogates: http://tech.groups.yahoo.com/group/json/message/1603 http://tech.groups.yahoo.com/group/json/message/1583 It's Unicode that considers unpaired

[issue14880] csv.reader and .writer use wrong kwargs notation in 2.7 docs

2012-08-28 Thread Hynek Schlawack
Hynek Schlawack added the comment: It seems correct like that: static PyObject * csv_register_dialect(PyObject *module, PyObject *args, PyObject *kwargs) { PyObject *name_obj, *dialect_obj = NULL; PyObject *dialect; if (!PyArg_UnpackTuple(args, , 1, 2, name_obj, dialect_obj))

[issue15783] decimal.localcontext(None) fails when using the C accelerator module

2012-08-28 Thread Stefan Krah
Stefan Krah added the comment: Nick Coghlan rep...@bugs.python.org wrote: Any third party Decimal manipulating function that accepts an optional context and passes it down to the standard Decimal API will be confronted with the same problem in 3.3: passing None as the context no longer means

[issue14880] csv.reader and .writer use wrong kwargs notation in 2.7 docs

2012-08-28 Thread Roundup Robot
Roundup Robot added the comment: New changeset dc080e19f7aa by Hynek Schlawack in branch '2.7': #14880: Fix kwargs notation in csv.reader, .writer .register_dialect http://hg.python.org/cpython/rev/dc080e19f7aa -- nosy: +python-dev ___ Python

[issue14880] csv.reader and .writer use wrong kwargs notation in 2.7 docs

2012-08-28 Thread Hynek Schlawack
Hynek Schlawack added the comment: Thank you for your contribution Chris! -- resolution: - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14880

[issue13405] Add DTrace probes

2012-08-28 Thread Samuel John
Samuel John added the comment: I did your test. Thank you! You are absolutely right, it seems, dtrace does not honor CPP or PATH or any other flags and bluntly looks in a hard-coded location. It's not up to you to patch that. -- ___ Python tracker

[issue13769] json.dump(ensure_ascii=False) return str instead of unicode

2012-08-28 Thread Petri Lehtinen
Petri Lehtinen added the comment: It may also be unicode if the encoding parameter is used even if there are no unicode objects in the input. json.dumps([u'Ş'.encode('iso-8859-9')], encoding='iso-8859-9', ensure_ascii=False) u'[\u015e]' -- ___

[issue14042] json.dumps() documentation is slightly incorrect.

2012-08-28 Thread Petri Lehtinen
Petri Lehtinen added the comment: This is a documentation bug for 2.7. Setting as duplicate of #13769. -- nosy: +petri.lehtinen resolution: - duplicate stage: needs patch - committed/rejected status: open - closed superseder: - json.dump(ensure_ascii=False) return str instead of

[issue15785] curses.get_wch() returns keypad codes incorrectly

2012-08-28 Thread STINNER Victor
STINNER Victor added the comment: If the function returned either a single-character unicode string or an integer keycode, this would also make it possible to completely drop the is_key_code part of the return value. (Callers could simply check the type of the return value to see if it is a

[issue13769] json.dump(ensure_ascii=False) return str instead of unicode

2012-08-28 Thread Petri Lehtinen
Petri Lehtinen added the comment: Attached a patch for 2.7 that updates docs and docstrings. -- keywords: +needs review, patch stage: needs patch - patch review Added file: http://bugs.python.org/file27032/issue13769.patch ___ Python tracker

[issue13769] json.dump(ensure_ascii=False) return str instead of unicode

2012-08-28 Thread Petri Lehtinen
Changes by Petri Lehtinen pe...@digip.org: -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13769 ___ ___ Python-bugs-list mailing

[issue1185124] pydoc doesn't find all module doc strings

2012-08-28 Thread Nick Coghlan
Nick Coghlan added the comment: The standard library has moved on quite a bit since this patch was written... 1. source_synopsis() should be using the tokeniser module when reading the docstring. The current implementation is broken in more ways than just those noted here (e.g. it completely

[issue1185124] pydoc doesn't find all module doc strings

2012-08-28 Thread Nick Coghlan
Nick Coghlan added the comment: Oops, I somehow ended up looking at an old revision of pydoc.py The current version *is* using tokenize.open and importlib in synopsis(), so those aspects of my comments are incorrect. However, the point that pydoc should probably be using the tokenize module

[issue15798] subprocess.Popen() fails if 0, 1 or 2 descriptor is closed

2012-08-28 Thread Aleksey Filippov
New submission from Aleksey Filippov: System info: kernel: 3.4.8-1-ARCH dist: Arch linux python: 3.2.3 subprocess.Popen() fails if python interpreter is started with closed 0, 1 or 2 descriptor. Traceback (most recent call last): File string, line 14, in module File

[issue15798] subprocess.Popen() fails if 0, 1 or 2 descriptor is closed

2012-08-28 Thread Ezio Melotti
Ezio Melotti added the comment: #10806 seems related. -- components: +Library (Lib) nosy: +ezio.melotti, pitrou, rosslagerwall type: - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15798

[issue15751] Support subinterpreters in the GIL state API

2012-08-28 Thread Mark Hammond
Mark Hammond added the comment: The GIL state api was mainly interested in the case of a thread which has (possibly) never been seen before calling into Python. IIUC, the proposal here is so that a thread that *has* been seen before can be associated with a thread-state specified by the

[issue14783] Update int() docstring from manual

2012-08-28 Thread Ezio Melotti
Ezio Melotti added the comment: .. function:: int(n=0) int(s, base=10) should do the trick. +1 on using this instead of int([number | string[, base]]) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14783

[issue15751] Support subinterpreters in the GIL state API

2012-08-28 Thread Mark Hammond
Mark Hammond added the comment: To clarify, I wrote: can be associated with a thread-state specified by the embedding application Where I meant to say: Can be associated with an interpreter state and corresponding thread-state ... Or something like that - it's been a while since I've

[issue15775] Add StopParser() to expat

2012-08-28 Thread Martin v . Löwis
Martin v. Löwis added the comment: nemeskeyd: would you like to work on a patch (for Python 3.4)? -- nosy: +loewis ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15775 ___

[issue15762] Windows 8 certification

2012-08-28 Thread Martin v . Löwis
Martin v. Löwis added the comment: The change you proposed cannot be applied to Python 2.7, or any distutils code bases, for a number of reasons: - it's not clear (and probably not the case) that the proposed command line flags are correct for all distutils code. It may well be that some code

[issue11489] json.dumps not parsable by json.loads (on Linux only)

2012-08-28 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It's Unicode that considers unpaired surrogates invalid, not UTF-8 by itself. It's UTF-8 too. See RFC 3629: The definition of UTF-8 prohibits encoding character numbers between U+D800 and U+DFFF, which are reserved for use with the UTF-16 encoding

[issue15751] Support subinterpreters in the GIL state API

2012-08-28 Thread Nick Coghlan
Nick Coghlan added the comment: Thinking about it, I believe there still needs to be a concept of an active thread state TLS key in order to deal with Graham's original problem. Specifically, if PyGILState_EnsureEx is used to associate the thread with a particular interpreter, then subsequent

[issue13266] Add inspect.unwrap(f) to easily unravel __wrapped__ chains

2012-08-28 Thread Éric Araujo
Changes by Éric Araujo mer...@netwok.org: -- versions: +Python 3.4 -Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13266 ___ ___

[issue15775] Add StopParser() to expat

2012-08-28 Thread Nemeskey Dávid
Nemeskey Dávid added the comment: loewis: I don't think it would be difficult to fix, so theoretically I'd be in. However, I don't really have the time to work on this right now. -- ___ Python tracker rep...@bugs.python.org

[issue15797] bdist_msi does not pass -install/remove flags to install_script

2012-08-28 Thread B Maqueira
Changes by B Maqueira brau...@ferrarihaines.com: Added file: http://bugs.python.org/file27033/patch1.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15797 ___

[issue15751] Support subinterpreters in the GIL state API

2012-08-28 Thread Antoine Pitrou
Antoine Pitrou added the comment: Le mardi 28 août 2012 à 14:12 +, Nick Coghlan a écrit : old_interp = PyGILState_SwitchInterpreter(target_interp); old_gil = PyGILState_Ensure(); /* Call into Python using target_interp */ PyGILState_Release(old_gil);

[issue15591] when building the extensions, stdout is lost when stdout is redirected

2012-08-28 Thread Matthias Klose
Matthias Klose added the comment: bah, this happens when you do a parallel build. --jobserver-fds is passed in MAKEFLAGS, and the test for sharedmods turns on the quiet mode, because it matches just *s* in MAKEFLAGS :-/ The patch tries to parse MAKEFLAGS using getopt, and if getopt is not

[issue13592] repr(regex) doesn't include actual regex

2012-08-28 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- stage: needs patch - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13592 ___ ___

[issue15591] when building the extensions, stdout is lost when stdout is redirected

2012-08-28 Thread Roundup Robot
Roundup Robot added the comment: New changeset 1a1d097b17e2 by Matthias Klose in branch '2.7': - Issue #15591: Fix parsing MAKEFLAGS in the sharedmods target. http://hg.python.org/cpython/rev/1a1d097b17e2 New changeset 763d188a96bb by Matthias Klose in branch '3.2': - Issue #15591: Fix parsing

[issue15591] when building the extensions, stdout is lost when stdout is redirected

2012-08-28 Thread Matthias Klose
Matthias Klose added the comment: fixed. -- resolution: - fixed status: open - closed versions: -Python 2.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15591 ___

[issue15794] test_importlib: test_locks failure

2012-08-28 Thread Roundup Robot
Roundup Robot added the comment: New changeset 454dceb5fd56 by Antoine Pitrou in branch 'default': Issue #15794: Relax a test case due to the deadlock detection's conservativeness. http://hg.python.org/cpython/rev/454dceb5fd56 -- nosy: +python-dev

[issue15794] test_importlib: test_locks failure

2012-08-28 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- resolution: - fixed stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15794 ___

[issue15591] when building the extensions, stdout is lost when stdout is redirected

2012-08-28 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: -- nosy: +Arfrever ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15591 ___

[issue14468] Update cloning guidelines in devguide

2012-08-28 Thread Mike Hoy
Changes by Mike Hoy mho...@gmail.com: -- nosy: +mikehoy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14468 ___ ___ Python-bugs-list mailing list

[issue15784] OSError.__str__() should distinguish between errno and winerror

2012-08-28 Thread Roundup Robot
Roundup Robot added the comment: New changeset 2e587b9bae35 by Richard Oudkerk in branch 'default': Issue #15784: Modify OSError.__str__() to better distinguish between http://hg.python.org/cpython/rev/2e587b9bae35 -- nosy: +python-dev ___ Python

[issue15783] decimal.localcontext(None) fails when using the C accelerator module

2012-08-28 Thread Stefan Krah
Stefan Krah added the comment: I don't want to block this, BTW. Personally I'm +-0 on the issue. If more people think this is needed for backwards compatibility, I'll write a patch for localcontext. But I'd rather do that *very* soon. FWIW, none of the cdecimal users has ever complained about

[issue15799] httplib client and statusline

2012-08-28 Thread karl
New submission from karl: The current parsing of HTTP status line seems strange with regards to its definition in HTTP. http://hg.python.org/cpython/file/3.2/Lib/http/client.py#l307 Currently the code is version, status, reason = line.split(None, 2) status1 = HTTP/1.1 200 OK status2 =

[issue15799] httplib client and statusline

2012-08-28 Thread R. David Murray
R. David Murray added the comment: Could you explain the error you are seeing in more detail first? You are talk about parsing and fixes here, but I'm not clear on what the actual bug is you are reporting. -- nosy: +r.david.murray ___ Python

[issue15783] decimal.localcontext(None) fails when using the C accelerator module

2012-08-28 Thread Mark Dickinson
Mark Dickinson added the comment: I don't really feel that strongly either way, either. I understand Nick's arguments, but can't help feeling that we're letting a doc mistake dictate the API here. (And my inner type-system has an aversion to APIs where arguments are expected to be *either*

[issue15800] Closing of sys.std* files in gzip test.

2012-08-28 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: When porting gzip module from Python 2 to Python 3, binary files sys.std(in|out) was replaced by sys.std(in|out).buffer in gzip module internal testing code (when gzip used as executable). But in one place the replacement was skipped. As the result the

[issue15799] httplib client and statusline

2012-08-28 Thread karl
karl added the comment: ok. status lines 1 and 2 are valid. the third one is invalid and should trigger a raise BadStatusLine(line) The code at line 318 is bogus as it will parse happily the third line without raising an exception.

[issue15799] httplib client and statusline

2012-08-28 Thread R. David Murray
R. David Murray added the comment: Why should it raise an error? The postel principle suggests that we should treat it as equivalent to the second line. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15799

[issue15799] httplib client and statusline

2012-08-28 Thread Antoine Pitrou
Antoine Pitrou added the comment: I would point out that the goal of the http module is to provide interoperability with real-life servers, rather than be a strict implementation of RFCs. So, starting to raise errors for HTTP/1.1 200 while HTTP/1.1 200 remains ok might not be the best idea.

[issue15801] Weird string interpolation behaviour

2012-08-28 Thread Erik Allik
New submission from Erik Allik: class Foo(object): ... pass ... asdads % Foo() 'asdads' Doesn't look like it's supposed to be this way. As per the documentation: If format requires a single argument, values may be a single non-tuple object. [5] Otherwise, values must be a tuple with

[issue15801] Weird string interpolation behaviour

2012-08-28 Thread Alex Gaynor
Alex Gaynor added the comment: Additional detail, if and only if Foo defines an __str__ method, this raises an exception. -- nosy: +alex ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15801

[issue15801] Weird string interpolation behaviour

2012-08-28 Thread R. David Murray
R. David Murray added the comment: That doesn't appear to be true in 3.2. I happened to test this on email.message.Message, and it also did not raise an error, but it defines an __str__. I suspect this is some oddball result of the coercion rules. -- nosy: +r.david.murray

[issue15801] Weird string interpolation behaviour

2012-08-28 Thread R. David Murray
R. David Murray added the comment: Didn't get an error in 2.7, either, with Message(). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15801 ___

[issue15801] Weird string interpolation behaviour

2012-08-28 Thread Mike Graham
Mike Graham added the comment: Line 13464 of unicodeobject.c is if (Py_TYPE(args)-tp_as_mapping !PyTuple_Check(args) !PyUnicode_Check(args)) Too lazy to check, but don't user-created types have a tp_as_mapping? If so, I think it mistakes Foo() for a dict. -- nosy:

[issue15799] httplib client and statusline

2012-08-28 Thread karl
karl added the comment: Fair enough, it could be a warning when * more than one space in between http version and status code * if there is a missing space after the status code I'm not advocating for being strict only. I'm advocating for giving the tools to developer to assess that things

[issue15591] when building the extensions, stdout is lost when stdout is redirected

2012-08-28 Thread Benjamin Peterson
Benjamin Peterson added the comment: This seems to have broken parallel building of modules. -- nosy: +benjamin.peterson ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15591 ___

[issue15802] Illegal test for mailbox

2012-08-28 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: Test for mailbox contains meaningless asserts. Here is a patch that corrects testing, if I correctly understand it. -- components: Tests files: test_mailbox_create_tmp.patch keywords: patch messages: 169307 nosy: akuchling, barry, r.david.murray,

[issue15802] Illegal test for mailbox

2012-08-28 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: Added file: http://bugs.python.org/file27037/test_mailbox_create_tmp-2.7.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15802 ___

[issue15802] Illegal test for mailbox

2012-08-28 Thread R. David Murray
R. David Murray added the comment: Looks right to me on a quick scan, but I'm not familiar with that test. -- nosy: +petri.lehtinen ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15802 ___

[issue15802] Illegal test for mailbox

2012-08-28 Thread A.M. Kuchling
Changes by A.M. Kuchling li...@amk.ca: -- nosy: -akuchling ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15802 ___ ___ Python-bugs-list mailing

[issue15801] Weird string interpolation behaviour

2012-08-28 Thread Roundup Robot
Roundup Robot added the comment: New changeset 2801bf875a24 by Benjamin Peterson in branch '2.7': use the stricter PyMapping_Check (closes #15801) http://hg.python.org/cpython/rev/2801bf875a24 New changeset 4d431e719646 by Benjamin Peterson in branch '3.2': use the stricter PyMapping_Check

[issue15751] Support subinterpreters in the GIL state API

2012-08-28 Thread Graham Dumpleton
Graham Dumpleton added the comment: Sorry, Mark. Is not for associating thread state specified by embedding application. In simple terms it is exactly like existing PyGILState_Ensure() in that caller doesn't have a thread state, whether it has already been created. Only difference is to allow

[issue15785] curses.get_wch() returns keypad codes incorrectly

2012-08-28 Thread STINNER Victor
STINNER Victor added the comment: New patch fixing the issue with a better API: window.get_wch()-int or str depending on the key (int for key codes, str for other keys). Oh, I realized that test_curses does also fail on my laptop without the patch. My laptop is running Fedora 11 which uses

[issue15785] curses.get_wch() returns keypad codes incorrectly

2012-08-28 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@gmail.com: Removed file: http://bugs.python.org/file27007/curses_get_wch.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15785 ___

[issue15785] curses.get_wch() returns keypad codes incorrectly

2012-08-28 Thread Antoine Pitrou
Antoine Pitrou added the comment: Perhaps you should simply remove the new function, and re-add it in 3.4 when you've thought it out a bit more. -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15785

[issue15785] curses.get_wch() returns keypad codes incorrectly

2012-08-28 Thread STINNER Victor
STINNER Victor added the comment: window.get_wch() has been added by the issue #6755, and curses.unget_wch() by #12567. Copy the nosy of the issue #6755. -- nosy: +Nicholas.Cole, akuchling, cben, gpolo, inigoserna, jcea, phep, python-dev, r.david.murray, schodet, zeha

[issue15785] curses.get_wch() returns keypad codes incorrectly

2012-08-28 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@gmail.com: Removed file: http://bugs.python.org/file27038/curses_get_wch-2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15785 ___

[issue15785] curses.get_wch() returns keypad codes incorrectly

2012-08-28 Thread STINNER Victor
STINNER Victor added the comment: New patch with a test for this specific issue. (It's not easy to me to write a patch because my version of libncurses doesn't work with integers bigger than 128...) -- Added file: http://bugs.python.org/file27039/curses_get_wch-3.patch

[issue14649] doctest.DocTestSuite error misleading when module has no docstrings

2012-08-28 Thread R. David Murray
R. David Murray added the comment: With your patch 5 applied, test_zipimport_support fails. I took a quick look at this and it looks like it is because we've added a dependency on an external data file to the test for DocTestSuite. Note that with patch 4 applied, test_pyclbr fails...I found

[issue15785] curses.get_wch() returns keypad codes incorrectly

2012-08-28 Thread STINNER Victor
STINNER Victor added the comment: Perhaps you should simply remove the new function, and re-add it in 3.4 when you've thought it out a bit more. Python 3 forces somehow to use Unicode, and the Unicode support of the curses module in Python 3.2 is incomplete or broken (see . Many issues have

[issue15785] curses.get_wch() returns keypad codes incorrectly

2012-08-28 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@gmail.com: Added file: http://bugs.python.org/file27038/curses_get_wch-2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15785 ___

[issue14649] doctest.DocTestSuite error misleading when module has no docstrings

2012-08-28 Thread Chris Jerdonek
Chris Jerdonek added the comment: With your patch 5 applied, test_zipimport_support fails. You're right. It looks like test_zipimport_support is tightly coupled to test_doctest. For example-- http://hg.python.org/cpython/file/786d9516663e/Lib/test/test_zipimport_support.py#l94 My

[issue15785] curses.get_wch() returns keypad codes incorrectly

2012-08-28 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@gmail.com: Removed file: http://bugs.python.org/file27039/curses_get_wch-3.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15785 ___

[issue15785] curses.get_wch() returns keypad codes incorrectly

2012-08-28 Thread STINNER Victor
STINNER Victor added the comment: bitdancer tested the patch version 3 for me and it fails: unget_wch(KEY_UP) inserts the character U+0103 (259, à) instead of KEY_UP in get_wch() buffer. unget_wch() cannot be used to insert key codes, only classic keys like letters. So I removed the patch

[issue15785] curses.get_wch() returns keypad codes incorrectly

2012-08-28 Thread STINNER Victor
STINNER Victor added the comment: @simpkins: can you please try my patch? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15785 ___ ___

[issue15801] Weird string interpolation behaviour

2012-08-28 Thread Erik Allik
Erik Allik added the comment: Respectable reaction time. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15801 ___ ___ Python-bugs-list mailing

[issue15785] curses.get_wch() returns keypad codes incorrectly

2012-08-28 Thread STINNER Victor
STINNER Victor added the comment: bitdancer proposes (on IRC) a better doc for get_wch(): Get a wide character. Return a character for most keys, or an integer for function keys, keypad keys, and other special keys. We may also replace and so on by and other special keys in getkey()

[issue15785] curses.get_wch() returns keypad codes incorrectly

2012-08-28 Thread Roundup Robot
Roundup Robot added the comment: New changeset c58789634d22 by Victor Stinner in branch 'default': Issue #15785: Modify window.get_wch() API of the curses module: return a http://hg.python.org/cpython/rev/c58789634d22 -- ___ Python tracker

[issue14649] doctest.DocTestSuite error misleading when module has no docstrings

2012-08-28 Thread Chris Jerdonek
Chris Jerdonek added the comment: I updated the patch to fix the test_zipimport_support tests. All tests now pass. The only changes were to Lib/test/test_zipimport_support.py. I'll make a note about test_pyclbr and test_zipimport_support when I create the issue to move the supporting

[issue15800] Closing of sys.std* files in gzip test.

2012-08-28 Thread Jesús Cea Avión
Changes by Jesús Cea Avión j...@jcea.es: -- nosy: +jcea ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15800 ___ ___ Python-bugs-list mailing list

[issue15802] Illegal test for mailbox

2012-08-28 Thread Jesús Cea Avión
Changes by Jesús Cea Avión j...@jcea.es: -- nosy: +jcea ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15802 ___ ___ Python-bugs-list mailing list

[issue15803] Incorrect docstring on ConfigParser.items()

2012-08-28 Thread Nathan Trapuzzano
New submission from Nathan Trapuzzano: The docstring on ConfigParser.items() is self-evidently bass ackwards. Fix is in attached patch. -- components: Library (Lib) files: cpython.patch keywords: patch messages: 169324 nosy: nbtrap priority: normal severity: normal status: open title:

[issue15783] decimal.localcontext(None) fails when using the C accelerator module

2012-08-28 Thread Nick Coghlan
Nick Coghlan added the comment: I agree it's an acceptable risk for 3.3.0. Most third party decimal operations simply won't accept an explicit context argument at all - avoiding the need to pass the current context around explicitly is the whole point of it being stored in the thread locals.

[issue15804] Feature request, implicit except : pass

2012-08-28 Thread gd2shoe
New submission from gd2shoe: I'm constantly finding myself writing itty-bitty try blocks like such: process stuff try : someSubProcess.kill() except : pass process stuff I realize this isn't a rigorous use of except, but it's good enough for a vast majority of what I need it for. Still, it

[issue15804] Feature request, implicit except : pass

2012-08-28 Thread Raymond Hettinger
Raymond Hettinger added the comment: FWIW, this is already easy to do with decorators: class Pass: def __init__(self, exc): self.exc = exc def __enter__(self): return self def __exit__(self, exctype, excinst, exctb):

[issue15804] Feature request, implicit except : pass

2012-08-28 Thread Jesús Cea Avión
Jesús Cea Avión added the comment: No way this is going to be in 2.7. -- nosy: +jcea versions: -Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15804 ___

[issue15751] Support subinterpreters in the GIL state API

2012-08-28 Thread Nick Coghlan
Nick Coghlan added the comment: The reason I'm proposing going back to the original SwitchInterpreter idea is because the EnsureEx idea doesn't nest cleanly - if your thread is already associated with interpreter A, you can't readily call into interpeter B, because the API provides no way to

[issue15751] Support subinterpreters in the GIL state API

2012-08-28 Thread Graham Dumpleton
Graham Dumpleton added the comment: Nick. Valid point. I guess I hadn't been thinking about case of one thread calling out of one interpreter and then into another, as I don't do it in mod_wsgi and even I regard doing that as partly evil. Does that mean this switch interpreter call somehow

[issue15804] Feature request, implicit except : pass

2012-08-28 Thread Benjamin Peterson
Benjamin Peterson added the comment: Please submit your idea to the python-ideas list. -- nosy: +benjamin.peterson resolution: - wont fix status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15804

[issue15751] Support subinterpreters in the GIL state API

2012-08-28 Thread Nick Coghlan
Nick Coghlan added the comment: No, those wouldn't change at all. However, after thinking about it further, I'm leaning back towards the option of an EnsureEx/ReleaseEx pair that allows the previous interpreter to be reported and restored along with the GIL state. I'd also like to make the

[issue15751] Support subinterpreters in the GIL state API

2012-08-28 Thread Graham Dumpleton
Graham Dumpleton added the comment: So you are saying that as user of this I am meant to call it as: PyGILState_INFO info; PyGILState_EnsureEx(interp, info); ... PyGILState_ReleaseEx(info); What is the potential error code from PyGILState_EnsureEx() considering that right now for

[issue15751] Support subinterpreters in the GIL state API

2012-08-28 Thread Nick Coghlan
Nick Coghlan added the comment: Currently, both PyGILState_Ensure and PyGILState_Release just call PyFatal_Error if anything goes wrong. With the *Ex versions, it would be possible to replace those fatal errors with more conventional error handling. For Ensure, the likely error is failing to

[issue15805] Add stdout redirection tool to contextlib

2012-08-28 Thread Raymond Hettinger
New submission from Raymond Hettinger: The technique of temporarily redirecting stdout could be encapsulated in a context manager. print('This goes to stdout') with RedirectStdout(sys.stderr): print('This goes to stderr') print('So does this') print('This goes to stdout') The print

  1   2   >