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

2014-01-14 Thread Ryan Smith-Roberts
Ryan Smith-Roberts added the comment: Here's the socketmodule patch. I aggressively imported text from the docs for the docstrings, along with matching parameter names, given how far the old docstrings have drifted over time. The Windows-specific code is untested, but otherwise the tests

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

2014-01-15 Thread Ryan Smith-Roberts
Ryan Smith-Roberts added the comment: Forgot to linewrap a paragraph. -- Added file: http://bugs.python.org/file33489/argument_clinic_socketmodule_v2.patch ___ Python tracker <http://bugs.python.org/issue20

[issue20232] Argument Clinic NULL default falsely implies None acceptability

2014-01-15 Thread Ryan Smith-Roberts
Ryan Smith-Roberts added the comment: I've realized this is basically insoluble without PEP 457, because any other solution involves changing behavior (None being silently accepted where it would previously raise an exception). If that's OK, then per-function defensive programming i

[issue20232] Argument Clinic NULL default falsely implies None acceptability

2014-01-15 Thread Ryan Smith-Roberts
Ryan Smith-Roberts added the comment: sha1 is Vajrasky's module. I have a much more complicated example (and Vajrasky and I just both posted on python-dev separately about this issue): sockobj.sendmsg(buffers[, ancdata[, flags[, address]]]) -> sockobj.sendmsg(buffers, ancdata=None,

[issue20232] Argument Clinic NULL default falsely implies None acceptability

2014-01-15 Thread Ryan Smith-Roberts
Ryan Smith-Roberts added the comment: No, that still leaves address broken since neither None nor an empty tuple are acceptable. -- ___ Python tracker <http://bugs.python.org/issue20

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

2014-01-15 Thread Ryan Smith-Roberts
Ryan Smith-Roberts added the comment: Tweaked the argument list for functions using a NULL default. Kludgy but doesn't lie to the user. -- Added file: http://bugs.python.org/file33490/argument_clinic_socketmodule_v3.patch ___ Python tracker

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

2014-01-16 Thread Ryan Smith-Roberts
Ryan Smith-Roberts added the comment: The use case is primarily to minimize code churn for the derby, but since you're the one (heroically) doing the code review it's really your call. I whipped up a quick patch for this feature, and even if you remove c_name from __init__ I think

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

2014-01-16 Thread Ryan Smith-Roberts
Changes by Ryan Smith-Roberts : Added file: http://bugs.python.org/file33494/argument_clinic_ensure_legal_cleanup.patch ___ Python tracker <http://bugs.python.org/issue20

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

2014-01-16 Thread Ryan Smith-Roberts
Ryan Smith-Roberts added the comment: Here's sendmsg with only nested bracket optional args. If Rietveld doesn't like this patch I may cry. -- Added file: http://bugs.python.org/file33496/argument_clinic_socketmodule_v4.patch ___ Pyth

[issue20232] Argument Clinic NULL default falsely implies None acceptability

2014-01-16 Thread Ryan Smith-Roberts
Ryan Smith-Roberts added the comment: After all our discussions I'm closing this with resolution "don't do that then". -- resolution: -> wont fix status: open -> closed ___ Python tracker <http

[issue20260] Argument Clinic: add unsigned integers converters

2014-01-17 Thread Ryan Smith-Roberts
Ryan Smith-Roberts added the comment: socketmodule has three builtins which use PyLong_AsUnsignedLong on their arguments and would benefit from these converters, but only if they raise OverflowError. So I vote for #2. I don't think it's unreasonable to continue to have local

[issue20292] clinic.py str_converter with encoding throws exception

2014-01-17 Thread Ryan Smith-Roberts
New submission from Ryan Smith-Roberts: Find test file attached. The exception: Exception raised during parsing: Traceback (most recent call last): ... File "proj/python/trunk.hg/Tools/clinic/clinic.py", line 1535, in render self.parse_argument(data.parse_arguments) File &q

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

2014-01-18 Thread Ryan Smith-Roberts
Ryan Smith-Roberts added the comment: I believe the feature you starred resolves this enhancement issue, in which case my patches are obsolete. And yes, the 'as' syntax makes a lot more sense. Here's how I hope it works (the arg parsing wrapper remains unchanged): foo

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

2014-01-18 Thread Ryan Smith-Roberts
Ryan Smith-Roberts added the comment: Yes, that makes more sense. The specific syntax is nearly irrelevant compared to the feature existing at all. You still haven't indicated whether your starred feature matches the *result* that I outlined. Do

[issue20252] Argument Clinic howto: small typo in y# translation

2014-01-18 Thread Ryan Smith-Roberts
Ryan Smith-Roberts added the comment: I saw the fix for this in the commit stream. Closing. -- resolution: -> fixed ___ Python tracker <http://bugs.python.org/issu

[issue20252] Argument Clinic howto: small typo in y# translation

2014-01-18 Thread Ryan Smith-Roberts
Changes by Ryan Smith-Roberts : -- status: open -> closed ___ Python tracker <http://bugs.python.org/issue20252> ___ ___ Python-bugs-list mailing list Un

[issue20246] buffer overflow in socket.recvfrom_into

2014-01-18 Thread Ryan Smith-Roberts
Ryan Smith-Roberts added the comment: Perhaps the test is sending an infeasibly large message. If you remove the '*2048' does it pass? (I set up a FreeBSD 9.2 amd64 VM but all tests are passing here). -- ___ Python tracker <http://bu

[issue20299] Argument Clinic CConverter.__init__() overrides c_default and py_default

2014-01-18 Thread Ryan Smith-Roberts
New submission from Ryan Smith-Roberts: The docs indicate that you can do: class foo_converter(CConverter): ... c_default = 'bar()' py_default = 'Bar' except that CConverter.__init__() unconditionally overwrites these values. Patch attached. -- com

[issue20300] Argument Clinic raises exception for custom converter with default

2014-01-18 Thread Ryan Smith-Roberts
New submission from Ryan Smith-Roberts: If a custom converter declares both default and converter class attributes, you get this exception (test file attached): Exception raised during parsing: Traceback (most recent call last): File "Tools/clinic/clinic.py", line 1445

[issue20300] Argument Clinic raises exception for custom converter with default

2014-01-18 Thread Ryan Smith-Roberts
Changes by Ryan Smith-Roberts : -- components: +Build type: -> crash versions: +Python 3.4 ___ Python tracker <http://bugs.python.org/issue20300> ___ ___ Py

[issue20299] Argument Clinic CConverter.__init__() overrides c_default and py_default

2014-01-18 Thread Ryan Smith-Roberts
Changes by Ryan Smith-Roberts : -- nosy: +Nikratio ___ Python tracker <http://bugs.python.org/issue20299> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue20299] Argument Clinic CConverter.__init__() overrides c_default and py_default

2014-01-18 Thread Ryan Smith-Roberts
Ryan Smith-Roberts added the comment: No, I'm happy. It isn't really news anyway, since the patch just brings reality inline with the docs :). -- ___ Python tracker <http://bugs.python.o

[issue20294] Argument Clinic: add support for __init__

2014-01-18 Thread Ryan Smith-Roberts
Ryan Smith-Roberts added the comment: I have reviewed this as best I am able. I'll be honest that a lot of clinic.py makes my eyes cross; I'm used to webdev templating, which is inverted from AC (flow control inside the template). Not complaining, it's a complicated subject

[issue20246] buffer overflow in socket.recvfrom_into

2014-01-20 Thread Ryan Smith-Roberts
Ryan Smith-Roberts added the comment: The send part of the test doesn't matter, since what's being tested happens before any reads. The MSG multiplier should be removed completely, since none of the other tests do that. Patch attached. -- Added file: http://bugs.python.org

[issue20246] buffer overflow in socket.recvfrom_into

2014-02-25 Thread Ryan Smith-Roberts
Ryan Smith-Roberts added the comment: I notified secur...@python.org and waited for the go-ahead (from Guido I think) before opening this bug. If today is the first that the PSRT is hearing about this, then the issue is broader than just the bugtracker

<    1   2   3   4   5