[issue46660] datetime.timestamp() fails for naive-datetime values prior to the start of the epoch

2022-02-06 Thread Sam Roberts
Change by Sam Roberts : -- resolution: -> not a bug ___ Python tracker <https://bugs.python.org/issue46660> ___ ___ Python-bugs-list mailing list Unsubscrib

[issue46660] datetime.timestamp() fails for naive-datetime values prior to the start of the epoch

2022-02-06 Thread Sam Roberts
Sam Roberts added the comment: this seems like an expected discrepancy because of a difference in the mechanism used for aware datatimes vs. naive datetimes, although I'm not sure I understand why the computation with naive datetimes uses the mktime() function rather than invoking

[issue46660] datetime.timestamp() fails for naive-datetime values prior to the start of the epoch

2022-02-06 Thread Sam Roberts
Sam Roberts added the comment: the first sentence should have read: datetime.timestamp() fails for naive-datetime values prior to the start of the epoch, but for some reason works properly for aware-datetime values prior to the start of the epoch. -- title: datetime.fromtimestamp

[issue46660] datetime.fromtimestamp() fails for naive-datetime values prior to the start of the epoch

2022-02-06 Thread Sam Roberts
Change by Sam Roberts : -- title: datetime.datetime.fromtimestamp -> datetime.fromtimestamp() fails for naive-datetime values prior to the start of the epoch ___ Python tracker <https://bugs.python.org/issu

[issue46660] datetime.datetime.fromtimestamp

2022-02-06 Thread Sam Roberts
New submission from Sam Roberts : Python 3.9.2 (tags/v3.9.2:1a79785, Feb 19 2021, 13:44:55) [MSC v.1928 64 bit (AMD64)] on win32 datetime.fromtimestamp() fails for naive-datetime values prior to the start of the epoch, but for some reason works properly for aware-datetime values prior

[issue36225] [subinterpreters] Lingering subinterpreters should be implicitly cleared on shutdown

2021-12-16 Thread Chris Roberts
Change by Chris Roberts : -- nosy: +nasageek ___ Python tracker <https://bugs.python.org/issue36225> ___ ___ Python-bugs-list mailing list Unsubscribe:

for line3 in myips matching too longer matches.

2019-06-26 Thread Chris Roberts
### CODE: elif line1.rstrip(‘\n’) in line2.strip(‘\n’): for line3 in myips: print “###” print “line1 is %s” % line1.rstrip(‘\n’) print “line2 is %s” % line2.strip(‘\n’) ### OUTPUT: line1 is 10.10.168.2 line2 is

[issue33895] LoadLibraryExW called with GIL held can cause deadlock

2018-06-19 Thread Tony Roberts
Tony Roberts added the comment: Sure, that's reasonable :) For my case I have a usable workaround so not back porting it to < 3.8 is fine for me. My workaround will just leak the thread state if another thread is in __import__, which happens so rarely that it's not really a prob

[issue33895] LoadLibraryExW called with GIL held can cause deadlock

2018-06-19 Thread Tony Roberts
Tony Roberts added the comment: GetProcAddress and GetModuleHandle do block in the same way as LoadLibrary and FreeLibrary - they acquire the loader lock too. Yes, ideally the application would terminate its threads cleanly, however when Python is embedded in another application it may

[issue33895] LoadLibraryExW called with GIL held can cause deadlock

2018-06-19 Thread Tony Roberts
Change by Tony Roberts : -- keywords: +patch pull_requests: +7393 stage: needs patch -> patch review ___ Python tracker <https://bugs.python.org/issu

[issue33895] LoadLibraryExW called with GIL held can cause deadlock

2018-06-18 Thread Tony Roberts
Tony Roberts added the comment: Sure, I'll get that done in the next couple of days. -- ___ Python tracker <https://bugs.python.org/issue33895> ___ ___ Pytho

[issue33895] LoadLibraryExW called with GIL held can cause deadlock

2018-06-18 Thread Tony Roberts
New submission from Tony Roberts : In dynload_win.c LoadLibraryExW is called with the GIL held. This can cause a deadlock in an uncommon case where the GIL also needs to be acquired when another thread is being detached. Both LoadLibrary and FreeLibrary acquire the Windows loader-lock

Re: Python... feeding an instance as an argument into a new instance.

2017-09-03 Thread Chris Roberts
On Saturday, September 2, 2017 at 6:34:59 PM UTC-4, Chris Roberts wrote: > Perhaps someone here could help me to get this into perspective. > Somehow when we start to feed an instance as the argument in a new instance. > my head explodes.. > in this case... > a = Foo() &g

Python... feeding an instance as an argument into a new instance.

2017-09-02 Thread Chris Roberts
Perhaps someone here could help me to get this into perspective. Somehow when we start to feed an instance as the argument in a new instance. my head explodes.. in this case... a = Foo() b = Bar(a) So... a is a 'Foo instance' with properties and methods. b is a 'Bar instance' Since b is using

[issue30537] Using PyNumber_AsSsize_t in itertools.islice

2017-06-07 Thread Will Roberts
Will Roberts added the comment: Github PR adds simple test, as well as an entry in Misc/NEWS. -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/i

[issue30537] Using PyNumber_AsSsize_t in itertools.islice

2017-06-05 Thread Will Roberts
Will Roberts added the comment: Thanks for feedback, Serhiy and Raymond! Github PR now has reverted changes except to the calls in islice_new; I am happy to squash if you would like. Serhiy, this is my first time poking around in CPython code. What are the potential consequences of making

[issue30537] Using PyNumber_AsSsize_t in itertools.islice

2017-06-02 Thread Will Roberts
Will Roberts added the comment: Note that this issue also seems to affect other methods in the itertools package, such as permutations. -- nosy: +Will Roberts ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/i

[issue28304] Condition.wait() doesn't raise KeyboardInterrupt

2016-09-28 Thread Adam Roberts
New submission from Adam Roberts: This was fixed for Python 3 in https://bugs.python.org/issue8844 but needs to be backported. -- components: Library (Lib) messages: 277639 nosy: Adam Roberts priority: normal severity: normal status: open title: Condition.wait() doesn't raise

[no subject]

2016-01-09 Thread tommy roberts
It will not allow my to run python 3.5.1 -- https://mail.python.org/mailman/listinfo/python-list

Re: Python, convert an integer into an index?

2015-09-23 Thread Chris Roberts
PM, Laura Creighton <l...@openend.se> wrote: > In a message of Tue, 22 Sep 2015 14:43:55 -0700, Chris Roberts writes: > > > > > >(How do I make it into an index? ) > >Preferably something fairly easy to understand as I am new at this. > > > >re

Python, convert an integer into an index?

2015-09-22 Thread Chris Roberts
(How do I make it into an index? ) Preferably something fairly easy to understand as I am new at this. results = 134523 #(Integer) Desired: results = [1, 2, 3, 4, 5, 2, 3] #(INDEX) Somehow I see ways to convert index to list to int, but not back again. Thanks, crzzy1 --

Re: A simple single line, triple-quoted comment is giving syntax error. Why?

2015-03-28 Thread Tim Roberts
is single-quoted or triple-quoted is irrelevant. That is, these two things are equivalent: def func(a): This is a function return a*2 def func(a): This is a function return a*2 -- Tim Roberts, t...@probo.com Providenza Boekelheide, Inc. -- https

Re: [Python-Dev] Python 2.x and 3.x use survey, 2014 edition

2014-12-12 Thread Mark Roberts
easy to move over just because merely most of the top 20 libraries have been moved over. :-/ -Mark On Thu, Dec 11, 2014 at 12:14 PM, Dan Stromberg drsali...@gmail.com wrote: On Thu, Dec 11, 2014 at 11:35 AM, Mark Roberts wiz...@gmail.com wrote: I disagree. I know there's a huge focus on The Big

[issue23036] Crash Error?

2014-12-12 Thread E Roberts
New submission from E Roberts: New to the world of Python. The picture attached is an error that a teacher at my school is receiving when he tries to run anything in IDLE. I know nothing about coding/python/idle or anything of that nature. Sorry I am of little help. Please can someone help

Re: [Python-Dev] Python 2.x and 3.x use survey, 2014 edition

2014-12-11 Thread Mark Roberts
I disagree. I know there's a huge focus on The Big Libraries (and wholesale migration is all but impossible without them), but the long tail of libraries is still incredibly important. It's like saying that migrating the top 10 Perl libraries to Perl 6 would allow people to completely ignore all

[issue22687] horrible performance of textwrap.wrap() with a long word

2014-10-21 Thread Ben Roberts
Changes by Ben Roberts bjr.robe...@gmail.com: -- nosy: +roippi ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22687 ___ ___ Python-bugs-list

Re: Python 3.4.1 on W2K?

2014-10-11 Thread Tim Roberts
-bit app is pretty impressive. Actually, Microsoft made it pretty easy to call 32-bit DLLs in a 16-bit process and vice versa. That's why many of us were surprised when they did not provide the same capability in the 32/64 transition. -- Tim Roberts, t...@probo.com Providenza Boekelheide, Inc

[issue19119] duplicate test name in Lib/test/test_heapq.py

2014-10-03 Thread Ben Roberts
Ben Roberts added the comment: Any thoughts/reviews on the patch? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19119 ___ ___ Python-bugs-list

[issue19119] duplicate test name in Lib/test/test_heapq.py

2014-10-03 Thread Ben Roberts
Ben Roberts added the comment: That is one approach, of course, but imo pretty incomplete. A test that is named test_get_only presumably would be expected to test __getitem__, not __cmp__. Confusingly there is still a GetOnly item declared in the module, but it is not used. Compare

Re: very lightweight gui for win32 + python 3.4

2014-09-22 Thread Tim Roberts
adds significant functionality on the top of that. -- Tim Roberts, t...@probo.com Providenza Boekelheide, Inc. -- https://mail.python.org/mailman/listinfo/python-list

[issue22454] Adding the opposite function of shlex.split()

2014-09-21 Thread Ben Roberts
Ben Roberts added the comment: ' '.join(shlex.quote(x) for x in split_command) -- nosy: +roippi ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22454

[issue22454] Adding the opposite function of shlex.split()

2014-09-21 Thread Ben Roberts
Ben Roberts added the comment: For the record I am on board with a shlex.join. Even though the implementation is simple: - It is not obvious to many users if there are any gotchas by doing a ' '.join yourself, /even if/ you know that strings with spaces in them need to pass through

[issue19119] duplicate test name in Lib/test/test_heapq.py

2014-09-21 Thread Ben Roberts
Ben Roberts added the comment: The major issue (there are other issues as well but not so difficult) is whether nlargest and nsmallest should support iterator that could be endless iterator or reject it (by checking __len__ attribute) straight away. Well, failing with an exception isn't

[issue19119] duplicate test name in Lib/test/test_heapq.py

2014-09-21 Thread Ben Roberts
Ben Roberts added the comment: Attached patch fixes the tests. -- Added file: http://bugs.python.org/file36683/fix_heapq_tests.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19119

Re: ANN: binario - simple work with binary files

2014-09-06 Thread Tim Roberts
Rustom Mody rustompm...@gmail.com wrote: On Tuesday, September 2, 2014 6:05:19 AM UTC+5:30, Tim Roberts wrote: Rustom Mody wrote: On Tuesday, August 26, 2014 6:58:42 AM UTC+5:30, Tim Roberts wrote: To the equivalent code with struct: import struct dscrp = H?fs5B f = open

[issue22192] dict_values objects are hashable

2014-09-05 Thread Ben Roberts
Ben Roberts added the comment: Going to close this down - implementing rich comparisons for values() does feel like the correct solution... but I don't think it's possible to implement __eq__ in better than nlogn time (and possibly space). So nothing can realistically be done, yeah

Re: ANN: binario - simple work with binary files

2014-09-01 Thread Tim Roberts
Rustom Mody rustompm...@gmail.com wrote: On Tuesday, August 26, 2014 6:58:42 AM UTC+5:30, Tim Roberts wrote: To the equivalent code with struct: import struct dscrp = H?fs5B f = open('file.dat') stuff = struct.unpack( dscrp, f.read() ) print stuff In both cases, you have

Re: ANN: binario - simple work with binary files

2014-08-25 Thread Tim Roberts
a read_short where you happen to have written a float, disaster ensues. I don't really see that you've added very much. -- Tim Roberts, t...@probo.com Providenza Boekelheide, Inc. -- https://mail.python.org/mailman/listinfo/python-list

[issue2527] Pass a namespace to timeit

2014-08-23 Thread Ben Roberts
Ben Roberts added the comment: Thanks Antoine. Cheers :-) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2527 ___ ___ Python-bugs-list mailing

Re: Very basic question. How do I start again?

2014-08-22 Thread Tim Roberts
Seymore4Head Seymore4Head@Hotmail.invalid wrote: I want to give the computer 100 tries to guess a random number between 1 and 100 picked by the computer. If it takes more than 7, you're doing it wrong... -- Tim Roberts, t...@probo.com Providenza Boekelheide, Inc. -- https://mail.python.org

[issue2527] Pass a namespace to timeit

2014-08-21 Thread Ben Roberts
Ben Roberts added the comment: I did sign one right after I submitted the patch. Takes a few days for the asterisks to propagate I guess :) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2527

[issue2527] Pass a namespace to timeit

2014-08-21 Thread Ben Roberts
Ben Roberts added the comment: Ah yes. New patch improves the docs. -- Added file: http://bugs.python.org/file36432/timeit_global_arg_v2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2527

[issue2527] Pass a namespace to timeit

2014-08-18 Thread Ben Roberts
Ben Roberts added the comment: Attached is a patch that adds a 'global' kwarg to the Timeit constructor, which does pretty much what it says on the tin: specifies a global namespace that exec() will use. I originally had a 'locals' arg as well (to mirror the signature of eval/exec

[issue2527] Pass a namespace to timeit

2014-08-18 Thread Ben Roberts
Ben Roberts added the comment: Correction, the name of the argument is 'globals', not 'global'. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2527

[issue2527] Pass a namespace to timeit

2014-08-17 Thread Ben Roberts
Changes by Ben Roberts bjr.robe...@gmail.com: -- nosy: +roippi ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2527 ___ ___ Python-bugs-list mailing

[issue22192] dict_values objects are hashable

2014-08-15 Thread Ben Roberts
Ben Roberts added the comment: I have a patch with tests for this (running the test suite now) but I am increasingly unsure if python isn't doing the right thing already. Intuitively, it feels wrong (to me) to allow a dict_values view to be hashable since the mapping onto which it provides

[issue22192] dict_values objects are hashable

2014-08-13 Thread Ben Roberts
New submission from Ben Roberts: In python 3.4 these result in a TypeError: hash({}.keys()) hash({}.items()) But this succeeds: hash({}.values()) The 2.7 backports of these - viewkeys, viewitems, and viewvalues respectively - behave equivalently. See more discussion on StackOverflow

Re: Python 3 is killing Python

2014-07-16 Thread Tim Roberts
that helped turn the tide in what otherwise would have been an ugly war of attrition, much like WWI. -- Tim Roberts, t...@probo.com Providenza Boekelheide, Inc. -- https://mail.python.org/mailman/listinfo/python-list

Re: Python 3 is killing Python

2014-07-16 Thread Tim Roberts
! Please note that iPhones come configured from the factory to say that. Some users probably don't even know it is happening. -- Tim Roberts, t...@probo.com Providenza Boekelheide, Inc. -- https://mail.python.org/mailman/listinfo/python-list

Re: Success with subprocess communicate on Windows?

2014-07-01 Thread Tim Roberts
) -- Tim Roberts, t...@probo.com Providenza Boekelheide, Inc. -- https://mail.python.org/mailman/listinfo/python-list

Re: Psycopg2 : error message.

2014-05-19 Thread Tim Roberts
) or do this: conn=psycopg2.connect(database='busard_test', user='laurent', host='localhost', password='cactus') -- Tim Roberts, t...@probo.com Providenza Boekelheide, Inc. -- https://mail.python.org/mailman/listinfo/python-list

Re: Need help with executing DB query in two different places in a test

2014-05-19 Thread Tim Roberts
of the record for the session after each transaction, and make sure the contents match what you expect. -- Tim Roberts, t...@probo.com Providenza Boekelheide, Inc. -- https://mail.python.org/mailman/listinfo/python-list

Re: Two Questions about Python on Windows

2014-04-05 Thread Tim Roberts
executable program: xxx -- Tim Roberts, t...@probo.com Providenza Boekelheide, Inc. -- https://mail.python.org/mailman/listinfo/python-list

[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

[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/file33573

Re: Python declarative

2014-01-18 Thread Tim Roberts
to BE Python code, then you have little alternative except to use the suggestions offered. But if you simply want your scripts to be interpreted by a Python program, then you can do whatever you want. -- Tim Roberts, t...@probo.com Providenza Boekelheide, Inc. -- https://mail.python.org/mailman/listinfo

Re: numpy.where() and multiple comparisons

2014-01-18 Thread Tim Roberts
the and operator. -- Tim Roberts, t...@probo.com Providenza Boekelheide, Inc. -- https://mail.python.org/mailman/listinfo/python-list

[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: int ... _impl

[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. Does

[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 rep...@bugs.python.org http://bugs.python.org/issue20252

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

2014-01-18 Thread Ryan Smith-Roberts
Changes by Ryan Smith-Roberts r...@lab.net: -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20252 ___ ___ Python-bugs-list

[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 rep...@bugs.python.org

[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. -- components: Build files

[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, in parse

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

2014-01-18 Thread Ryan Smith-Roberts
Changes by Ryan Smith-Roberts r...@lab.net: -- components: +Build type: - crash versions: +Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20300

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

2014-01-18 Thread Ryan Smith-Roberts
Changes by Ryan Smith-Roberts r...@lab.net: -- nosy: +Nikratio ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20299 ___ ___ Python-bugs-list

[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 rep...@bugs.python.org http://bugs.python.org/issue20299

[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. I do like

[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 locally-defined

[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 proj/python

[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 it's still

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

2014-01-16 Thread Ryan Smith-Roberts
Changes by Ryan Smith-Roberts r...@lab.net: Added file: http://bugs.python.org/file33494/argument_clinic_ensure_legal_cleanup.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20227

[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 ___ Python tracker rep

[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 rep...@bugs.python.org http://bugs.python.org/issue20232

[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 rep...@bugs.python.org http://bugs.python.org/issue20174

[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 is probably

[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, flags=0

[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 rep...@bugs.python.org http://bugs.python.org/issue20232

[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 rep

[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 pass

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

2014-01-13 Thread Ryan Smith-Roberts
Ryan Smith-Roberts added the comment: Even more imperative than my version. Excellent! -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20202

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

2014-01-13 Thread Ryan Smith-Roberts
Changes by Ryan Smith-Roberts r...@lab.net: -- nosy: +rmsr ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20227 ___ ___ Python-bugs-list mailing

[issue20246] buffer overflow in socket.recvfrom_into

2014-01-13 Thread Ryan Smith-Roberts
New submission from Ryan Smith-Roberts: recvfrom_into fails to check that the supplied buffer object is big enough for the requested read and so will happily write off the end. I will attach patches for 3.4 and 2.7, I'm not familiar with the backporting procedure to go further but all

[issue20246] buffer overflow in socket.recvfrom_into

2014-01-13 Thread Ryan Smith-Roberts
Changes by Ryan Smith-Roberts r...@lab.net: Added file: http://bugs.python.org/file33453/recvfrom_into_buffer_overflow_2.7.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20246

[issue20246] buffer overflow in socket.recvfrom_into

2014-01-13 Thread Ryan Smith-Roberts
Changes by Ryan Smith-Roberts r...@lab.net: -- keywords: +patch Added file: http://bugs.python.org/file33452/recvfrom_into_buffer_overflow_3.4.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20246

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

2014-01-13 Thread Ryan Smith-Roberts
Ryan Smith-Roberts added the comment: Georg Brandl wrote: Although now is a good time to ensure sensible argument names (I usually look at the docs to find the documented ones), so that switching the function to keyword arg support is basically just a removal of '/' I started doing

[issue20248] docs: socket.recvmsg{,_into} are keword-compatible

2014-01-13 Thread Ryan Smith-Roberts
New submission from Ryan Smith-Roberts: The docs indicate their arguments are positional-only. Trivial patch attached. -- assignee: docs@python components: Documentation files: docs_socket_recvmsg_args.patch keywords: patch messages: 208067 nosy: docs@python, rmsr priority: normal

[issue20248] docs: socket.recvmsg{,_into} are keword-compatible

2014-01-13 Thread Ryan Smith-Roberts
Ryan Smith-Roberts added the comment: Never mind, it's actually recvfrom{,_into}. Sigh. -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20248

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

2014-01-13 Thread Ryan Smith-Roberts
New submission from Ryan Smith-Roberts: type - types -- assignee: docs@python components: Documentation files: argument_clinic_howto_y-hash.patch keywords: patch messages: 208076 nosy: docs@python, larry, rmsr priority: normal severity: normal status: open title: Argument Clinic howto

[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: http

[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

[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

[issue20201] Argument Clinic: rwbuffer support broken

2014-01-10 Thread Ryan Smith-Roberts
Ryan Smith-Roberts added the comment: Accepts only a writable bytearray, when the function needs to mutate-in-place. The rw_buffer support is for PyPy I guess. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20201

[issue20203] ArgumentClinic: support middle optional argument

2014-01-09 Thread Ryan Smith-Roberts
New submission from Ryan Smith-Roberts: socket.sendto is apparently even weirder than addch or range: the optional argument is in the *middle*. Attempting this configuration gets me: Function sendto has an unsupported group configuration. (Unexpected state 5) An expected unexpected

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

2014-01-08 Thread Ryan Smith-Roberts
Ryan Smith-Roberts added the comment: Taking a crack at this. socketmodule.h: just a comment, skipping. _functools.c: kind-of skipping, because the relevant functions are not normally directly called (pickle protocol __reduce__ and __setstate__ on partial, __call__ on cmp wrapper). Will add

[issue20200] Argument Clinic howto: custom self_converter example broken

2014-01-08 Thread Ryan Smith-Roberts
New submission from Ryan Smith-Roberts: The custom converter declaration is wrapped with [clinic input] when it should be [python input]. Patch attached. -- files: argument_clinic_docfix.patch keywords: patch messages: 207724 nosy: rmsr priority: normal severity: normal status: open

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

2014-01-08 Thread Ryan Smith-Roberts
Changes by Ryan Smith-Roberts r...@lab.net: -- keywords: +patch Added file: http://bugs.python.org/file33372/argument_clinic_functools.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20174

[issue20201] Argument Clinic: rwbuffer support broken

2014-01-08 Thread Ryan Smith-Roberts
Ryan Smith-Roberts added the comment: I'm such a goofball, how about some bug metadata -- components: +Build type: - compile error versions: +Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20201

  1   2   3   4   5   6   7   8   9   10   >