[issue20158] Argument Clinic: add --clean option

2014-01-12 Thread Georg Brandl
Georg Brandl added the comment: Another use case here is if you want to check the remaining call sites of (say) PyArg_ParseTuple that aren't generated by clinic. Call it '--remove' if you want, but the functionality should be useful. -- nosy: +georg.brandl

[issue20186] Derby #18: Convert 31 sites to Argument Clinic across 23 files

2014-01-12 Thread Georg Brandl
Georg Brandl added the comment: OK, here's a patch for _csv. Two problems here: First problem is the __new__ method of the Dialect class: * it has no docstring and no methoddef entry * it is a class method, but the first arg is conventionally called type I tried to hack something into clinic

[issue20186] Derby #18: Convert 31 sites to Argument Clinic across 23 files

2014-01-12 Thread Georg Brandl
Georg Brandl added the comment: Tried to tackle symtable -- it uses an O converter. The clinic howto says ``'O'````object(converter='name_of_c_function')`` but Traceback (most recent call last): File Tools/clinic/clinic.py, line 2817, in module sys.exit(main(sys.argv[1:])) File

[issue20186] Derby #18: Convert 31 sites to Argument Clinic across 23 files

2014-01-12 Thread Georg Brandl
Georg Brandl added the comment: _tracemalloc converted. Its existing docstrings did use the func(arg: argtype) - rettype convention. Is there a way in clinic to retain that? -- Added file: http://bugs.python.org/file33423/tracemalloc_clinic.patch

[issue20186] Derby #18: Convert 31 sites to Argument Clinic across 23 files

2014-01-12 Thread Georg Brandl
Georg Brandl added the comment: Here's _iomodule. _io.open has a whopping 100-line docstring, which is ... unfortunate ... to have duplicated in the file :) -- Added file: http://bugs.python.org/file33424/io_clinic.patch ___ Python tracker

[issue20186] Derby #18: Convert 31 sites to Argument Clinic across 23 files

2014-01-12 Thread Georg Brandl
Georg Brandl added the comment: And _heapq. No problems there, except that it also used - return annotations in the docstring. -- Added file: http://bugs.python.org/file33425/heapq_clinic.patch ___ Python tracker rep...@bugs.python.org

[issue20186] Derby #18: Convert 31 sites to Argument Clinic across 23 files

2014-01-12 Thread Georg Brandl
Georg Brandl added the comment: And lsprof. -- Added file: http://bugs.python.org/file33426/lsprof_clinic.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20186 ___

[issue20115] NUL bytes in commented lines

2014-01-12 Thread Georg Brandl
Georg Brandl added the comment: I'm in favor of PyPy's behavior: null bytes anywhere in the source, even in comments, usually mean there's something weird or fishy going on with either the editor or (if downloaded/copied) the source of the code. -- nosy: +georg.brandl

[issue20138] wsgiref on Python 3.x incorrectly implements URL handling causing mangled Unicode

2014-01-12 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- assignee: - serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20138 ___ ___

[issue19995] %c, %o, %x, %X accept non-integer values instead of raising an exception

2014-01-12 Thread STINNER Victor
STINNER Victor added the comment: Typo in the C code: depracation :-) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19995 ___ ___

[issue20182] Derby #13: Convert 50 sites to Argument Clinic across 5 files

2014-01-12 Thread Georg Brandl
Georg Brandl added the comment: Here's the signalmodule. -- keywords: +patch nosy: +georg.brandl Added file: http://bugs.python.org/file33427/signal_clinic.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20182

[issue20138] wsgiref on Python 3.x incorrectly implements URL handling causing mangled Unicode

2014-01-12 Thread Roundup Robot
Roundup Robot added the comment: New changeset 29732b43ccf2 by Serhiy Storchaka in branch '3.3': Issue #20138: The wsgiref.application_uri() and wsgiref.request_uri() http://hg.python.org/cpython/rev/29732b43ccf2 New changeset 73781fe1daa2 by Serhiy Storchaka in branch 'default': Issue #20138:

[issue20225] Argument Clinic: simplify METH_NOARGS generated code

2014-01-12 Thread Georg Brandl
New submission from Georg Brandl: For METH_NOARGS, you can get rid of the separate _impl function. This makes the generated code much smaller. -- messages: 207943 nosy: georg.brandl priority: normal severity: normal status: open title: Argument Clinic: simplify METH_NOARGS generated

[issue20225] Argument Clinic: simplify METH_NOARGS generated code

2014-01-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Seconded. But only if there are no self or result converters. -- nosy: +serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20225 ___

[issue20182] Derby #13: Convert 50 sites to Argument Clinic across 5 files

2014-01-12 Thread Georg Brandl
Georg Brandl added the comment: Now without crap. -- Added file: http://bugs.python.org/file33428/signal_clinic.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20182 ___

[issue20182] Derby #13: Convert 50 sites to Argument Clinic across 5 files

2014-01-12 Thread Georg Brandl
Changes by Georg Brandl ge...@python.org: Removed file: http://bugs.python.org/file33427/signal_clinic.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20182 ___

[issue20226] Argument Clinic: support for simple expressions?

2014-01-12 Thread Georg Brandl
New submission from Georg Brandl: Take for example select.epoll.__new__(): static PyObject * pyepoll_new(PyTypeObject *type, PyObject *args, PyObject *kwds) { int flags = 0, sizehint = FD_SETSIZE - 1; static char *kwlist[] = {sizehint, flags, NULL}; if

[issue20225] Argument Clinic: simplify METH_NOARGS generated code

2014-01-12 Thread Georg Brandl
Changes by Georg Brandl ge...@python.org: -- assignee: - larry nosy: +larry ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20225 ___ ___

[issue20226] Argument Clinic: support for simple expressions?

2014-01-12 Thread Georg Brandl
Changes by Georg Brandl ge...@python.org: -- assignee: - larry nosy: +larry ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20226 ___ ___

[issue20226] Argument Clinic: support for simple expressions?

2014-01-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: See also a discussion in issue20193. zlib needs this in many functions. -- nosy: +serhiy.storchaka versions: +Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20226

[issue20227] Argument Clinic: rename arguments in generated C?

2014-01-12 Thread Georg Brandl
New submission from Georg Brandl: This is a request to be able to name C arguments differently from Python arguments. Two reasons: * like for function renaming, some Python argument names are reserved in C (default for example, used in sys.getsizeof()) * sometimes the function uses 'O' in

[issue20227] Argument Clinic: rename arguments in generated C?

2014-01-12 Thread Georg Brandl
Changes by Georg Brandl ge...@python.org: -- nosy: +serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20227 ___ ___ Python-bugs-list

[issue20227] Argument Clinic: rename arguments in generated C?

2014-01-12 Thread Georg Brandl
Georg Brandl added the comment: OK, I see that AC automatically handles case 1, great! Still you have to decide if you like the code churn caused by case 2. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20227

[issue20227] Argument Clinic: rename arguments in generated C?

2014-01-12 Thread Georg Brandl
Georg Brandl added the comment: One more: I can't have an argument called args. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20227 ___ ___

[issue20182] Derby #13: Convert 50 sites to Argument Clinic across 5 files

2014-01-12 Thread Georg Brandl
Georg Brandl added the comment: Here's sys. For it to generate the correct code you need to add args to c_keywords in clinic.py. -- Added file: http://bugs.python.org/file33429/sys_clinic.patch ___ Python tracker rep...@bugs.python.org

[issue20218] Add `pathlib.Path.write` and `pathlib.Path.read`

2014-01-12 Thread Ram Rachum
Ram Rachum added the comment: (Replace `is` with `if` in my code sample, typo.) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20218 ___ ___

[issue20158] Argument Clinic: add --clean option

2014-01-12 Thread Larry Hastings
Larry Hastings added the comment: You can accomplish that workflow by using the Clinic buffer prototype and moving all your output to the side. Or by using the buffer approach, and stopping when you hit the generated code. One of these might actually happen in Clinic, too, so hang on to

[issue20225] Argument Clinic: simplify METH_NOARGS generated code

2014-01-12 Thread Larry Hastings
Larry Hastings added the comment: (Actually a self converter would be fine too. Those are only allowed to cast.) I'm not doing this; here's why. I want the call signature to the impl function to be the *idealized* signature of that function. And METH_NOARGS passes in a dumb stupid second

[issue20225] Argument Clinic: simplify METH_NOARGS generated code

2014-01-12 Thread Georg Brandl
Georg Brandl added the comment: Sure, I wasn't concerned with compilation, only saving lines of code. But I agree that the buffer way sounds much more promising. Just seemed odd that METH_O was clean and METH_NOARGS less so :) -- ___ Python tracker

[issue20226] Argument Clinic: support for simple expressions?

2014-01-12 Thread Larry Hastings
Larry Hastings added the comment: Yes, this is supported, just undocumented (for now). The magic you want is, for example in Modules/_sre.c: endpos: Py_ssize_t(c_default=PY_SSIZE_T_MAX) = sys.maxsize -- ___ Python tracker rep...@bugs.python.org

[issue20226] Argument Clinic: support for simple expressions?

2014-01-12 Thread Georg Brandl
Georg Brandl added the comment: Nice, thanks. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20226 ___ ___ Python-bugs-list mailing list

[issue18394] cgi.FieldStorage triggers ResourceWarning sometimes

2014-01-12 Thread Marcel Hellkamp
Marcel Hellkamp added the comment: This change breaks existing applications. The cgi.FieldStorage.file attribute is public and mentioned in the documentation. It even states You can then read the data at leisure from the file attribute. Consider this example:: form = cgi.FieldStorage()

[issue19092] ExitStack.__exit__ incorrectly suppresses exceptions in __exit__ callbacks of inner context managers

2014-01-12 Thread Senthil Kumaran
Senthil Kumaran added the comment: The last tracker message msg207926 is applicable to issue #19097 and not here. Sorry for the confusion. -- nosy: +orsenthil ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19092

[issue19097] bool(cgi.FieldStorage(...)) may be False unexpectedly

2014-01-12 Thread Senthil Kumaran
Senthil Kumaran added the comment: Fixed in: New changeset a3e49868cfd0 by Senthil Kumaran in branch '3.3': Issue #19092 - Raise a correct exception when cgi.FieldStorage is given an http://hg.python.org/cpython/rev/a3e49868cfd0 New changeset 1638360eea41 by Senthil Kumaran in branch

[issue20214] Argument Clinic rollup fixes

2014-01-12 Thread Larry Hastings
Larry Hastings added the comment: Freshened patch, -- nosy: +georg.brandl ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20214 ___ ___

[issue20201] Argument Clinic: rwbuffer support broken

2014-01-12 Thread Larry Hastings
Larry Hastings added the comment: Do you have commit rights? I can commit this patch for you if you don't. Just wondering what (if anything) is holding this up. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20201

[issue20196] Argument Clinic generates invalid code for optional parameter

2014-01-12 Thread Larry Hastings
Larry Hastings added the comment: Georg, you mind reviewing this too? Six line patch. Just trying to clean my plate a little before I fix a bug for you :D -- nosy: +georg.brandl ___ Python tracker rep...@bugs.python.org

[issue20201] Argument Clinic: rwbuffer support broken

2014-01-12 Thread Larry Hastings
Larry Hastings added the comment: Looks like you don't, so I'll commit this on your behalf. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20201 ___

[issue20214] Argument Clinic rollup fixes

2014-01-12 Thread Larry Hastings
Larry Hastings added the comment: Also adding the one-byte fix from #20201 to the rollup patch here. (Not bothering to upload a fresh patch because it is literally one byte, fixing a misspelled variable name.) -- ___ Python tracker

[issue19995] %c, %o, %x, %X accept non-integer values instead of raising an exception

2014-01-12 Thread Roundup Robot
Roundup Robot added the comment: New changeset cc8b21988efb by Ethan Furman in branch 'default': Issue19995: fixed typo; switched from test.support.check_warnings to assertWarns http://hg.python.org/cpython/rev/cc8b21988efb -- ___ Python tracker

[issue20214] Argument Clinic rollup fixes

2014-01-12 Thread Larry Hastings
Larry Hastings added the comment: I goofed, I do have some additional fixes. Here's everything. Changes since patch #1: * Added 'converter' argument to 'object' converter. * Fixed misspelled variable name (see #20201). * Several documentation updates. -- Added file:

[issue20196] Argument Clinic generates invalid code for optional parameter

2014-01-12 Thread Roundup Robot
Roundup Robot added the comment: New changeset 250b481a0d28 by Larry Hastings in branch 'default': Issue #20196: Fixed a bug where Argument Clinic did not generate correct http://hg.python.org/cpython/rev/250b481a0d28 -- nosy: +python-dev ___ Python

[issue20196] Argument Clinic generates invalid code for optional parameter

2014-01-12 Thread Larry Hastings
Larry Hastings added the comment: Easy fix. Thanks for the report! -- resolution: - fixed stage: patch review - commit review status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20196

[issue18394] cgi.FieldStorage triggers ResourceWarning sometimes

2014-01-12 Thread Brett Cannon
Changes by Brett Cannon br...@python.org: -- assignee: - brett.cannon keywords: +3.3regression -patch nosy: +larry priority: normal - release blocker status: closed - open ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18394

[issue17373] Add inspect.Signature.from_callable()

2014-01-12 Thread Eric Snow
Eric Snow added the comment: The difference is that inspect.signature is not friendly to Signature subclasses. Without from_callable you can't customize the behavior in inspect.signature easily. -- ___ Python tracker rep...@bugs.python.org

[issue17373] Add inspect.Signature.from_callable()

2014-01-12 Thread Yury Selivanov
Yury Selivanov added the comment: The difference is that inspect.signature is not friendly to Signature subclasses. Without from_callable you can't customize the behavior in inspect.signature easily. OK, suppose you have Signature.from_callable. You then create a subclass MySignature, and

[issue17373] Add inspect.Signature.from_callable()

2014-01-12 Thread Yury Selivanov
Yury Selivanov added the comment: Eric, Moreover, 'Signature.from_function' and newly added 'Signature.from_builtin' are private API, or implementation detail (they are not part of PEP, not mentioned in the docs). If at some point it is needed to rewrite Signature in C, probably those two

[issue17373] Add inspect.Signature.from_callable()

2014-01-12 Thread Eric Snow
Eric Snow added the comment: It's not about customizing inspect.signature. It's about customizing the nice behavior of that function, including what type it returns. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17373

[issue17373] Add inspect.Signature.from_callable()

2014-01-12 Thread Yury Selivanov
Yury Selivanov added the comment: OK, got it now. Green light from me. Looking through the code, I saw that 'from_builtin' doesn't use the 'Signature._parameter_cls' (as in from_function). That's probably needs to be fixed as well, maybe in a separate issue. --

[issue20189] inspect.Signature doesn't recognize all builtin types

2014-01-12 Thread Yury Selivanov
Yury Selivanov added the comment: Larry, just a small thing.. Could you please add something like Parameter = cls._parameter_cls in the from_builtin method? (see the discussion in #17373) -- ___ Python tracker rep...@bugs.python.org

[issue7776] http.client.HTTPConnection tunneling is broken

2014-01-12 Thread Nikolaus Rath
Nikolaus Rath added the comment: I've updated the patch again to fix a problem with HTTPSConnection. -- Added file: http://bugs.python.org/file33431/issue7776.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7776

[issue20214] Argument Clinic rollup fixes

2014-01-12 Thread Larry Hastings
Larry Hastings added the comment: Third patch, with these new features: * Relaxed rules regarding c_default and py_default; they can now be used even when no default value is supplied. * Added bool return converter. * Made one fail() call easier to read, through the power of str.format(). *

[issue20214] Argument Clinic rollup fixes

2014-01-12 Thread Roundup Robot
Roundup Robot added the comment: New changeset 3eee3967d03f by Larry Hastings in branch 'default': Issue #20214: Fixed a number of small issues and documentation errors in http://hg.python.org/cpython/rev/3eee3967d03f -- nosy: +python-dev ___ Python

[issue20201] Argument Clinic: rwbuffer support broken

2014-01-12 Thread Larry Hastings
Larry Hastings added the comment: Fixed as part of the rollup patch in #20214. -- assignee: - larry resolution: - fixed stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20201

[issue20228] Argument Clinic should understand Python special methods

2014-01-12 Thread Larry Hastings
New submission from Larry Hastings: As per Georg's request (and hacks in other places), Argument Clinic should have support for special methods. To wit: __init__ should be required to be an instance method. Clinic should suppress its methoddef #define. __new__ should be required to be a

[issue8876] distutils should not assume that hardlinks will work

2014-01-12 Thread Fabian Kochem
Changes by Fabian Kochem fkoc...@gmail.com: -- nosy: +Fabian.Kochem ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8876 ___ ___ Python-bugs-list

[issue20228] Argument Clinic should understand Python special methods

2014-01-12 Thread Larry Hastings
Larry Hastings added the comment: Updated patch incorporating changes from Georg Brandl. Thanks Georg! -- Added file: http://bugs.python.org/file33434/larry.special.methods.support.patch.2.txt ___ Python tracker rep...@bugs.python.org

[issue20202] ArgumentClinic howto: document change in Py_buffer lifecycle management

2014-01-12 Thread Ryan Smith-Roberts
Ryan Smith-Roberts added the comment: Thank you for including the doc change in your other patch. As the grammar was off, instead of just fixing it I naturally rewrote it. Use this patch or just remove the extraneous for you as you prefer. -- keywords: +patch Added file:

[issue20202] ArgumentClinic howto: document change in Py_buffer lifecycle management

2014-01-12 Thread Larry Hastings
Larry Hastings added the comment: Fixed in revision 43e109ca9018. Well, changed anyway, maybe it's still not wonderful text. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20202 ___

[issue20174] Derby #5: Convert 50 sites to Argument Clinic across 3 files

2014-01-12 Thread Ryan Smith-Roberts
Ryan Smith-Roberts added the comment: Just discovered that the bugtracker mail was all going into my spam filter, yay. Didn't notice your reply until just now. The functools patch was just a quickie to get it out of my mental queue, and I'm still working on socketmodule. This is my first time

[issue20174] Derby #5: Convert 50 sites to Argument Clinic across 3 files

2014-01-12 Thread Larry Hastings
Larry Hastings added the comment: I don't know what you mean by a multipart patch, but the bug tracker has handled every patch I've thrown at it so far. (Assuming that the patch is based on a reasonably fresh checkout of trunk.) -- ___ Python

[issue20228] Argument Clinic should understand Python special methods

2014-01-12 Thread Larry Hastings
Changes by Larry Hastings la...@hastings.org: -- resolution: - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20228 ___

[issue20228] Argument Clinic should understand Python special methods

2014-01-12 Thread Roundup Robot
Roundup Robot added the comment: New changeset bc5f257f5cc1 by Larry Hastings in branch 'default': Issue #20228: Argument Clinic now has special support for class special http://hg.python.org/cpython/rev/bc5f257f5cc1 -- nosy: +python-dev ___ Python

[issue20229] platform.py uses deprecated feature of plistlib

2014-01-12 Thread Marc Tamlyn
New submission from Marc Tamlyn: platform.mac_ver() triggers the following deprecation warning: python3.4 -Wall Python 3.4.0b2 (v3.4.0b2:ba32913eb13e, Jan 5 2014, 11:02:52) [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin Type help, copyright, credits or license for more information.

[issue19082] Lib/xmlrpc/client.py demo code points to the dead server

2014-01-12 Thread Roundup Robot
Roundup Robot added the comment: New changeset 1730f4a97cbb by Senthil Kumaran in branch '2.7': Issue #19082: Working SimpleXMLRPCServer and xmlrpclib examples, both in modules and documentation. http://hg.python.org/cpython/rev/1730f4a97cbb New changeset 72560f9bb2a2 by Senthil Kumaran in

[issue19082] Lib/xmlrpc/client.py demo code points to the dead server

2014-01-12 Thread Senthil Kumaran
Senthil Kumaran added the comment: Addressed this in all active branches (2.7, 3.3 and 3.4). Thanks! -- resolution: - fixed stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org

[issue18983] Specify time unit for timeit CLI

2014-01-12 Thread Julian Gindi
Julian Gindi added the comment: What needs to be done to close this one out? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18983 ___ ___

[issue20230] structseq types should expose _fields

2014-01-12 Thread Andrew Barnert
New submission from Andrew Barnert: A PyStructSequence type doesn't expose its field names in any way to Python code (except indirectly, via the repr, which you could parse if you really wanted to…). The docs claim that Struct sequence objects are the C equivalent of namedtuple() objects, so

[issue20230] structseq types should expose _fields

2014-01-12 Thread Meador Inge
Changes by Meador Inge mead...@gmail.com: -- nosy: +meador.inge ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20230 ___ ___ Python-bugs-list

[issue7796] No way to find out if an object is an instance of a namedtuple

2014-01-12 Thread Andrew Barnert
Andrew Barnert added the comment: I believe the structseq issues are a lot easier to solve than the appear. See #20230, which adds a _fields member to every structseq type. Having done that, a NamedTuple ABC works on them just fine. And of course duck typing them without an ABC does too.

[issue20230] structseq types should expose _fields

2014-01-12 Thread Andrew Barnert
Andrew Barnert added the comment: After more searching (I should have searched on structseq instead of PyStructSequence…), this might be a dup of #1820. If so, apologies. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20230

[issue1820] Enhance Object/structseq.c to match namedtuple and tuple api

2014-01-12 Thread Andrew Barnert
Andrew Barnert added the comment: See issue20230, which includes a patch implementing just the first part of part 2 (adding _fields, but not _asdict or _replace). Since this one has been open for 5+ years, if it's not going to be done soon, any chance of the easy (_fields) change being

[issue1820] Enhance Object/structseq.c to match namedtuple and tuple api

2014-01-12 Thread Ethan Furman
Changes by Ethan Furman et...@stoneleaf.us: -- nosy: +ethan.furman ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1820 ___ ___ Python-bugs-list

[issue20230] structseq types should expose _fields

2014-01-12 Thread Ethan Furman
Changes by Ethan Furman et...@stoneleaf.us: -- nosy: +ethan.furman ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20230 ___ ___ Python-bugs-list

[issue18983] Specify time unit for timeit CLI

2014-01-12 Thread Vajrasky Kok
Vajrasky Kok added the comment: This feature is for Python 3.5. I think, we will not commit anything to Python 3.5 until Python 3.4 branch is created (in other world, released). So, be patient. :) -- nosy: +vajrasky ___ Python tracker

[issue20229] platform.py uses deprecated feature of plistlib

2014-01-12 Thread Ned Deily
Ned Deily added the comment: Thanks for the report! Here's a patch. -- keywords: +needs review nosy: +ned.deily stage: - patch review Added file: http://bugs.python.org/file33437/issue20229.py ___ Python tracker rep...@bugs.python.org

[issue20231] Argument Clinic accepts no-default args after default args

2014-01-12 Thread Ryan Smith-Roberts
Changes by Ryan Smith-Roberts r...@lab.net: -- type: - crash ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20231 ___ ___ Python-bugs-list mailing

[issue20231] Argument Clinic accepts no-default args after default args

2014-01-12 Thread Ryan Smith-Roberts
New submission from Ryan Smith-Roberts: A signature of the form a: object = None b: object results in b being uninitialized in the generated C code prior to the PyArgs_ParseTuple call. If ParseTuple does not set a value for b (as it is an optional argument), b then contains a garbage pointer

[issue20232] Argument Clinic NULL default falsely implies None acceptability

2014-01-12 Thread Ryan Smith-Roberts
New submission from Ryan Smith-Roberts: When one specifies a default of NULL, the generated signature doc indicates a default of None. However, if the user actually supplies None, perhaps as a placeholder in a positional-only call, C code which only checks for NULL will fail inappropriately.

[issue20232] Argument Clinic NULL default falsely implies None acceptability

2014-01-12 Thread Vajrasky Kok
Vajrasky Kok added the comment: Yes, this issue bothers me. Currently _sha1.sha1 constructor will use NULL (not None) value if used without parameters: _sha1.sha1() _sha1.sha1(None) will throw error while _sha1.sha1() won't. So for NULL (not None) default value, the generated signature

[issue20178] Derby #9: Convert 52 sites to Argument Clinic across 11 files

2014-01-12 Thread Meador Inge
Meador Inge added the comment: Larry, the attached patch converts what is convertible of Modules/_ctypes/_ctypes. Although, I ran into an odd case with this conversion: the converted functions are each used in *multiple* PyMethodDef tables. So while clinic can generate equivalent code, the

[issue20178] Derby #9: Convert 52 sites to Argument Clinic across 11 files

2014-01-12 Thread Meador Inge
Meador Inge added the comment: None of the sites in Modules/_curses_panel.c look convertible. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20178 ___

[issue20233] Re-enable buffer API slots for heap types

2014-01-12 Thread Benno Rice
Changes by Benno Rice be...@jeamland.net: -- nosy: +ncoghlan ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20233 ___ ___ Python-bugs-list mailing

[issue20233] Re-enable buffer API slots for heap types

2014-01-12 Thread Benno Rice
New submission from Benno Rice: The API slots for bf_getbuffer and bf_releasebuffer are still disabled despite the bug referenced (issue 10181) being marked as fixed. These should be re-enabled if the stable ABI is to be used for types that use buffers. -- components: Extension

[issue20227] Argument Clinic: rename arguments in generated C?

2014-01-12 Thread Zachary Ware
Zachary Ware added the comment: I second this request. Every PyArg_ParseTupleAndKeywords-using function in _winapi has a keyword argument overlapped which is stuffed into a C variable use_overlapped, while the local variable overlapped is used for an Overlapped object, which makes for a big

[issue20230] structseq types should expose _fields

2014-01-12 Thread Yury Selivanov
Changes by Yury Selivanov yseliva...@gmail.com: -- nosy: +yselivanov ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20230 ___ ___ Python-bugs-list

[issue20230] structseq types should expose _fields

2014-01-12 Thread Yury Selivanov
Changes by Yury Selivanov yseliva...@gmail.com: -- components: +Interpreter Core, Library (Lib) versions: +Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20230 ___

[issue20172] Derby #3: Convert 67 sites to Argument Clinic across 4 files (Windows)

2014-01-12 Thread Zachary Ware
Zachary Ware added the comment: And here is the patch to _winapi.c. -- Added file: http://bugs.python.org/file33439/issue20172._winapi.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20172

[issue20227] Argument Clinic: rename arguments in generated C?

2014-01-12 Thread Georg Brandl
Georg Brandl added the comment: There are also several PyArg_ParseTuple-using functions that have the same kind of name mismatch, but since the names don't really mean anything on the Python side when they're positional-only, I don't feel too bad about changing them to make them make

[issue6625] UnicodeEncodeError on pydoc's CLI

2014-01-12 Thread Akira Kitada
Akira Kitada added the comment: I suppose this is a duplicate of #1065986. -- nosy: +akitada ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6625 ___

[issue20234] Argument Clinic: use PyTuple_GET_SIZE?

2014-01-12 Thread Georg Brandl
New submission from Georg Brandl: In the presence of [ ] , clinic generates PyTuple_Size() calls. Since argument tuples always are tuples, you can use the macro form PyTuple_GET_SIZE() to speed it up. -- assignee: larry messages: 208007 nosy: georg.brandl, larry priority: normal

[issue20235] Argument Clinic: recover a bit more gracefully from exceptions

2014-01-12 Thread Georg Brandl
New submission from Georg Brandl: I had specified c_default=-1 (note missing quotes) somewhere, and it raises an exception during the clinic --make run; there was no indication which file/line this was on. Suggested patch attached. -- assignee: larry files:

[issue20186] Derby #18: Convert 31 sites to Argument Clinic across 23 files

2014-01-12 Thread Georg Brandl
Changes by Georg Brandl ge...@python.org: Removed file: http://bugs.python.org/file33425/heapq_clinic.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20186 ___

[issue20186] Derby #18: Convert 31 sites to Argument Clinic across 23 files

2014-01-12 Thread Georg Brandl
Changes by Georg Brandl ge...@python.org: Removed file: http://bugs.python.org/file33419/mathmodule_part1.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20186 ___

[issue20186] Derby #18: Convert 31 sites to Argument Clinic across 23 files

2014-01-12 Thread Georg Brandl
Changes by Georg Brandl ge...@python.org: Removed file: http://bugs.python.org/file33422/csv_module_clinic.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20186 ___

[issue20186] Derby #18: Convert 31 sites to Argument Clinic across 23 files

2014-01-12 Thread Georg Brandl
Changes by Georg Brandl ge...@python.org: Removed file: http://bugs.python.org/file33423/tracemalloc_clinic.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20186 ___

[issue20186] Derby #18: Convert 31 sites to Argument Clinic across 23 files

2014-01-12 Thread Georg Brandl
Changes by Georg Brandl ge...@python.org: Removed file: http://bugs.python.org/file33424/io_clinic.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20186 ___

[issue20186] Derby #18: Convert 31 sites to Argument Clinic across 23 files

2014-01-12 Thread Georg Brandl
Changes by Georg Brandl ge...@python.org: Removed file: http://bugs.python.org/file33426/lsprof_clinic.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20186 ___

[issue20186] Derby #18: Convert 31 sites to Argument Clinic across 23 files

2014-01-12 Thread Georg Brandl
Georg Brandl added the comment: OK, new patches coming in. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20186 ___ ___ Python-bugs-list mailing

[issue20182] Derby #13: Convert 50 sites to Argument Clinic across 5 files

2014-01-12 Thread Georg Brandl
Changes by Georg Brandl ge...@python.org: Removed file: http://bugs.python.org/file33429/sys_clinic.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20182 ___

  1   2   >