[issue24416] Return a namedtuple from date.isocalendar()

2015-06-09 Thread Tal Einat
Tal Einat added the comment: You can take a look at lru_cache_cache_info in Modules/_functoolsmodule.c for an example of namedtuple instantiation in C code. But that code gets the namedtuple class as a parameter. This is not my area of expertise, but you could try using PyObject_CallFunction

[issue24416] Return a namedtuple from date.isocalendar()

2015-06-09 Thread Tal Einat
Tal Einat added the comment: Now for the color of the bike-shed: What should the namedtuple returned by date.isocalendar() be named? Perhaps CalendarDate or DateTuple? Baptiste's patches use ISOCalendarResult. In my opinion that is a poor name since it does not tell you anything about wh

[issue24416] Return a namedtuple from date.isocalendar()

2015-06-09 Thread Tal Einat
Tal Einat added the comment: How about IsoCalendarDate? -- ___ Python tracker <http://bugs.python.org/issue24416> ___ ___ Python-bugs-list mailing list Unsub

[issue24379] slice.literal notation

2015-06-10 Thread Tal Einat
Tal Einat added the comment: So, is this in any ways different than NumPy's s_? -- ___ Python tracker <http://bugs.python.org/issue24379> ___ ___ Pytho

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

2015-06-12 Thread Tal Einat
Tal Einat added the comment: Attached is a revised patch for Modules/mathmodule.c incorporating changes suggested by Serhiy in his review. The major change is the reformatting of the doc-strings of most of the functions in the module to use the same format as doc-strings generated by AC

[issue24402] input() uses sys.__stdout__ instead of sys.stdout for prompt

2015-06-12 Thread Tal Einat
Tal Einat added the comment: Okay, so the change is straightforward. With this change the entire test suite passes on my machine. We'll need a test for this for the test suite, and that's far less straightforward. It seems that test.test_builtin.BuiltinTest.check_input_tty()

[issue24402] input() uses sys.__stdout__ instead of sys.stdout for prompt

2015-06-12 Thread Tal Einat
Tal Einat added the comment: Here's a patch with just the required fix (no tests). -- keywords: +patch Added file: http://bugs.python.org/file39697/issue24402.fix_only.patch ___ Python tracker <http://bugs.python.org/is

[issue24412] setUpClass equivalent for addCleanup

2015-06-12 Thread Tal Einat
Tal Einat added the comment: Is this really needed? One can use try/except/raise, and since addClassCleanup() would only be called from setUpClass(), I don't quite see the utility of it. -- nosy: +taleinat ___ Python tracker

[issue24403] Missing fixer for changed round() behavior

2015-06-12 Thread Tal Einat
Tal Einat added the comment: See the existing issue and discussion about this on the six library's issue tracker (opened nearly a year ago): https://bitbucket.org/gutworth/six/issue/94/introduce-sixround -- nosy: +taleinat ___ Python tracker

[issue24421] Race condition compiling Modules/_math.c

2015-06-12 Thread Tal Einat
Tal Einat added the comment: Confirmed on OSX 10.10. Here's my output: running build running build_ext building 'cmath' extension ./slow-cc.py -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -Werror=declaration-after-stateme

[issue24412] setUpClass equivalent for addCleanup

2015-06-13 Thread Tal Einat
Tal Einat added the comment: I'm not convinced this would be worth the effort required to implement and maintain it. Can someone find examples from existing test suites where this would clearly be useful? For example, a setUpClass() or setUpModule() function with multiple try/finally cl

[issue24412] setUpClass equivalent for addCleanup

2015-06-13 Thread Tal Einat
Tal Einat added the comment: Ahh, that makes sense. Sounds good to me! -- ___ Python tracker <http://bugs.python.org/issue24412> ___ ___ Python-bugs-list mailin

[issue24421] Race condition compiling Modules/_math.c

2015-06-18 Thread Tal Einat
Tal Einat added the comment: Adding Thomas Wouters to the nosy list, since he's listed on the Experts Index under "autoconf/makefiles" as an interest area. Hopefully he can help move this forward. -- nosy: +twouters ___ Python

[issue23020] New matmul operator crashes modules compiled with CPython3.4

2015-06-18 Thread Tal Einat
Changes by Tal Einat : -- assignee: -> docs@python components: +Documentation nosy: +docs@python ___ Python tracker <http://bugs.python.org/issue23020> ___ _

[issue24412] setUpClass equivalent for addCleanup

2015-06-19 Thread Tal Einat
Tal Einat added the comment: I'm convinced. +1 -- ___ Python tracker <http://bugs.python.org/issue24412> ___ ___ Python-bugs-list mailing list Unsubscr

[issue24483] Avoid repeated hash calculation in C implementation of functools.lru_cache()

2015-06-29 Thread Tal Einat
Tal Einat added the comment: With clru_cache_known_hash_4.patch on the current default branch, the entire test suite passes here (OSX 10.10). -- nosy: +taleinat ___ Python tracker <http://bugs.python.org/issue24

[issue24514] tarfile fails to extract archive (handled fine by gnu tar and bsdtar)

2015-06-29 Thread Tal Einat
Tal Einat added the comment: The patch is very simple, but this needs tests. At the very least, a simple tar file which reproduces this issue could be added to the tests. Taking this a step further would be writing some unit tests for the internal nti() and itn() functions, and perhaps also

[issue1927] raw_input behavior incorrect if readline not enabled

2015-07-07 Thread Tal Einat
Tal Einat added the comment: See also issue #24402: input() uses sys.__stdout__ instead of sys.stdout for prompt -- nosy: +taleinat ___ Python tracker <http://bugs.python.org/issue1

[issue24483] Avoid repeated hash calculation in C implementation of functools.lru_cache()

2015-07-20 Thread Tal Einat
Tal Einat added the comment: Ping? Let's not miss the final 3.5 beta. -- ___ Python tracker <http://bugs.python.org/issue24483> ___ ___ Python-bugs-list m

[issue13884] IDLE: Remove tear-off menu feature

2015-07-30 Thread Tal Einat
Tal Einat added the comment: +1 for removal. -- nosy: +taleinat ___ Python tracker <http://bugs.python.org/issue13884> ___ ___ Python-bugs-list mailing list Unsub

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

2015-08-04 Thread Tal Einat
Tal Einat added the comment: Summary of the current state of this AC conversion derby group: 1) The collections, itertools and random modules should not be converted (at least for now). 2) The three example modules should not be converted (Modules/xxlimited.c, Modules/xxmodule.c and Modules

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

2015-08-15 Thread Tal Einat
Tal Einat added the comment: I'll commit #3 (unicodeobject.c) when I first get the chance, which should be in a few days. I'll be happy to improve the rest as needed if someone can find the time to review them! -- ___ Python trac

[issue1927] raw_input behavior incorrect if readline not enabled

2015-12-05 Thread Tal Einat
Tal Einat added the comment: The entire test suite passes with the v2 patch on my OSX 10.10. -- ___ Python tracker <http://bugs.python.org/issue1927> ___ ___ Pytho

[issue21765] Idle: make 3.x HyperParser work with non-ascii identifiers.

2015-12-15 Thread Tal Einat
Tal Einat added the comment: It turns out that staying with str.translate in PyParse payed off! An optimization in 3.5 (issue21118) has made it much much faster on ASCII-only inputs, which are the vast majority in this case. -- ___ Python tracker

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

2016-03-19 Thread Tal Einat
Tal Einat added the comment: My patches haven't been looked at for a while, anyone considering them should make sure they still apply cleanly and don't break anything. Here their status as far as I can tell: Quite a bit of work went into Modules/_operator.c, and it got an "LGT

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

2016-05-13 Thread Tal Einat
Tal Einat added the comment: Regarding your questions about completion behavior: You don't have to scroll, you can continue typing and the completion list will filter itself to options that match the additional characters. Deleting characters works too (options reappear in the list).

[issue27013] IDLE completion for dict keys

2016-05-13 Thread Tal Einat
New submission from Tal Einat: I just wanted to mention that I once added this feature to IDLE and it's really great for interactive work, especially with data structures such as tables or JSON. If there's ever interest, I can try to hunt down my old code. -- components: IDL

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

2015-04-22 Thread Tal Einat
Tal Einat added the comment: Attaching new patch for unicodeobject.c, which supersedes the previous patches. I've changed the name of the parameter of str.join() to "iterable" to match the docs. (In the previous patch I had changed it from "seq" to "iterable_o

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

2015-04-23 Thread Tal Einat
Tal Einat added the comment: Note: Despite not appearing in any of these patches, the zlib module seems to have already been converted. -- nosy: +taleinat ___ Python tracker <http://bugs.python.org/issue20

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

2015-04-23 Thread Tal Einat
Tal Einat added the comment: I'm working on a new version of Georg's patch which applies to the current default branch. I'm having trouble with AC output going into a separate file, since this requires a lot of things to be declared before the #include of the .c.h file. Shoul

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

2015-04-23 Thread Tal Einat
Tal Einat added the comment: Here's a new version of Georg's patch which applies to the current default branch. On my OSX 10.8, CPython compiles fine and all tests pass, though test_devpoll and test_epoll were skipped. I haven't made additional changes, so there is still AC-rel

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

2015-04-24 Thread Tal Einat
Tal Einat added the comment: Serhiy, I agree on both points. I can easily replace all of the converters and upload it as three separate patches. If you haven't started reviewing the patch yet, let me know and I'll do these t

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

2015-04-24 Thread Tal Einat
Tal Einat added the comment: Here's a new patch for Objects/unicodeobject.c with all of Serhiy's suggestions integrated. -- Added file: http://bugs.python.org/file39190/unicodeobject.c.v4.patch ___ Python tracker <http://bugs.python.o

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

2015-04-24 Thread Tal Einat
Tal Einat added the comment: Version of patch with PyUnicodeObject * warnings fixed. -- Added file: http://bugs.python.org/file39191/unicodeobject.c.v5.patch ___ Python tracker <http://bugs.python.org/issue20

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

2015-04-24 Thread Tal Einat
Tal Einat added the comment: Hurrah! And that seems to be it for this group, since collections, itertools and random are not to be converted at this point, as well as the Modules/xx*.c files, and the stringlib files probably require overly extensive changes for conversion

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

2015-04-24 Thread Tal Einat
Tal Einat added the comment: Here's a patch just for Modules/signalmodule.c (and related files), based on Georg's patch, updated to apply against current default, including fixes thanks to Serhiy's review. This include one minor doc change, since I changed the name of the secon

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

2015-04-24 Thread Tal Einat
Tal Einat added the comment: Here's a patch just for Modules/selectmodule.c (and related files), based on Georg's patch, updated to apply against current default, including fixes thanks to Serhiy's review. It took a while since I had to get a Linux VM up to run the epoll tes

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

2015-04-25 Thread Tal Einat
Tal Einat added the comment: Here's a slightly modified version of the most recent patch for Modules/selectmodule.c. The only difference relative to the previous version is that I've set the epoll method function names back to what they used to be. My reasoning is to stay consisten

[issue24009] Get rid of rare format units in PyArg_Parse*

2015-04-25 Thread Tal Einat
Tal Einat added the comment: +1. I was recently trying to use the C API for a 3rd party library, and all of these subtly different string parameter formats made things surprisingly confusing. These are part of the Python C API, so removing them could break 3rd party code. Simply searching

[issue24037] Argument Clinic: add the boolint converter

2015-04-25 Thread Tal Einat
Tal Einat added the comment: If this was for internal use only, intended to ease the transition to Argument Clinic, then extensibility isn't an issue. An upside to this is that it would make it easy in the future to find all of the places in the stdlib using integers instead of bool

[issue24037] Argument Clinic: add the boolint converter

2015-04-27 Thread Tal Einat
Tal Einat added the comment: If I was writing a function/method with a conceptually boolean parameter (True/False), I wouldn't want that to accept any Python object. For example, I would want passing a tuple or list to raise a TypeError. But according to the docs[1], that's w

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

2015-05-03 Thread Tal Einat
Tal Einat added the comment: Do you mean the v2.patch file, or the one before it? -- ___ Python tracker <http://bugs.python.org/issue20182> ___ ___ Python-bug

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

2015-05-03 Thread Tal Einat
Tal Einat added the comment: Sorry, my mistake, got mixed up with selectmodule. -- ___ Python tracker <http://bugs.python.org/issue20182> ___ ___ Python-bug

[issue24145] Support |= for parameters in converters

2015-05-09 Thread Tal Einat
Tal Einat added the comment: Well, the main reasons I'm +1 on the "|=" feature (regardless of specific syntax) are: 1) the intent is much clearer: e.g. also accept None, nothing else special going on 2) much easier maintenance if the default set of accepted types ever changes

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

2015-05-16 Thread Tal Einat
Tal Einat added the comment: Here's a patch just for Modules/sysmodule.c (and related files), based on Georg's patch, updated to apply against current default, including fixes thanks to Serhiy's review. Despite Serhiy's suggestions, I've not used parameter groups, due

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

2015-05-16 Thread Tal Einat
Tal Einat added the comment: Attached in a conversion patch for Modules/_hashopenssl.c. Since it appear that zlib has already been converted, that's the last file to convert in this batch! All tests pass on my OSX 10.10 (after running "touch Modules/hashlib.h" to get make to r

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

2015-05-16 Thread Tal Einat
Tal Einat added the comment: Serhiy: Indeed, you're right about sys.getsizeof(). I'm tending towards changign it to use an optional group and per Serhiy's suggestion. Larry? -- ___ Python tracker <http://bugs.pyt

[issue24270] PEP 485 (math.isclose) implementation

2015-05-24 Thread Tal Einat
Tal Einat added the comment: I'm now working this into a patch against current default. -- nosy: +taleinat ___ Python tracker <http://bugs.python.org/is

[issue24270] PEP 485 (math.isclose) implementation

2015-05-24 Thread Tal Einat
Tal Einat added the comment: Attached is a patch based on Chris Barker's implementation on github[1]. This includes only the C implementation, as well as tests, documentation and entries in NEWS and whatsnew. I had to keep the (PyCFunction) cast in the module method list in Mo

[issue24270] PEP 485 (math.isclose) implementation

2015-05-24 Thread Tal Einat
Tal Einat added the comment: I have a question regarding complex values. The code (from Chris Barker) doesn't support complex values (only things that can be converted into doubles). However, the PEP states the following under "Non-float types": "complex : for complex, t

[issue24270] PEP 485 (math.isclose) implementation

2015-05-24 Thread Tal Einat
Changes by Tal Einat : -- nosy: +mark.dickinson, rhettinger, stutzbach ___ Python tracker <http://bugs.python.org/issue24270> ___ ___ Python-bugs-list mailin

[issue24416] Return a namedtuple from date.isocalendar()

2016-09-20 Thread Tal Einat
Tal Einat added the comment: Regarding the name "IsoCalendarDate", see for example this question on Stack Overflow[1] where both of the leading answers suggest beginning with "Iso" or "iso" rather than "ISO". However, taking a look at the relatively new

<    10   11   12   13   14   15