[issue23081] Document PySequence_List(o) as equivalent to list(o)

2014-12-18 Thread Lars Buitinck
New submission from Lars Buitinck: PySequence_List has accepted iterables since changeset 6c82277e77f3 of May 1, 2001 (NEEDS DOC CHANGES :), but its documentation still only speaks of sequences. I suggest that it is changed to promise to handle arbitrary iterables, just like PySequence_Tuple

[issue22565] missing const in declaration of PyErr_WarnEx in C-API docs

2014-10-06 Thread Lars Buitinck
New submission from Lars Buitinck: The declaration for PyErr_WarnEx in Doc/c-api/exceptions.rst is missing a const compared to Include/warnings.h. -- assignee: docs@python components: Documentation files: pyerr_warnex_const.patch keywords: patch messages: 228657 nosy: docs@python

[issue18999] Support different contexts in multiprocessing

2013-10-19 Thread Lars Buitinck
Lars Buitinck added the comment: Strange, I can't actually get it to work: from multiprocessing import Pool, get_context forkserver = get_context('forkserver') Pool(context=forkserver) Traceback (most recent call last): File stdin, line 1, in module TypeError: Pool() got an unexpected

[issue18999] Support different contexts in multiprocessing

2013-10-19 Thread Lars Buitinck
Lars Buitinck added the comment: I also tried from multiprocessing.pool import Pool but that died with ImportError: cannot import name get_context -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18999

[issue18999] Support different contexts in multiprocessing

2013-10-16 Thread Lars Buitinck
Lars Buitinck added the comment: Thanks, much better than my solution! -- status: pending - open ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18999

[issue18999] Robustness issues in multiprocessing.{get, set}_start_method

2013-10-13 Thread Lars Buitinck
Lars Buitinck added the comment: BTW, the context objects are singletons. I haven't read all of your patch yet, but does this mean a forkserver will be started regardless of whether it is later used? That would be a good thing, since starting the fork server after reading in large data sets

[issue18999] Robustness issues in multiprocessing.{get, set}_start_method

2013-10-13 Thread Lars Buitinck
Lars Buitinck added the comment: Ok, great. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18999 ___ ___ Python-bugs-list mailing list

[issue18999] Robustness issues in multiprocessing.{get, set}_start_method

2013-09-13 Thread Lars Buitinck
Lars Buitinck added the comment: Ok. Do you (or jnoller?) have time to review my proposed patch, at least before 3.4 is released? I didn't see it in the release schedule, so it's probably not planned soon, but I wouldn't want the API to change *again* in 3.5

[issue18999] Robustness issues in multiprocessing.{get, set}_start_method

2013-09-12 Thread Lars Buitinck
Changes by Lars Buitinck larsm...@gmail.com: -- nosy: +jnoller ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18999 ___ ___ Python-bugs-list

[issue18999] Robustness issues in multiprocessing.{get, set}_start_method

2013-09-12 Thread Lars Buitinck
Lars Buitinck added the comment: I don't really see the benefit of a context manager over an argument. It's a power user feature anyway, and context managers (at least to me) signal cleanup actions, rather than construction options. -- ___ Python

[issue18999] Robustness issues in multiprocessing.{get, set}_start_method

2013-09-10 Thread Lars Buitinck
Changes by Lars Buitinck larsm...@gmail.com: -- title: Allow multiple calls to multiprocessing.set_start_method - Robustness issues in multiprocessing.{get,set}_start_method ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18999

[issue18999] Allow multiple calls to multiprocessing.set_start_method

2013-09-10 Thread Lars Buitinck
New submission from Lars Buitinck: The new multiprocessing based on forkserver (issue8713) looks great, but it has two problems. The first: set_start_method() should not be used more than once in the program. The documentation does not explain what the effect of calling it twice would

[issue18999] Allow multiple calls to multiprocessing.set_start_method

2013-09-10 Thread Lars Buitinck
Changes by Lars Buitinck l.j.buiti...@uva.nl: -- nosy: +sbt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18999 ___ ___ Python-bugs-list mailing

[issue18999] Robustness issues in multiprocessing.{get, set}_start_method

2013-09-10 Thread Lars Buitinck
Changes by Lars Buitinck larsm...@gmail.com: Removed file: http://bugs.python.org/file31721/mp_getset_start_method.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18999

[issue18999] Robustness issues in multiprocessing.{get, set}_start_method

2013-09-10 Thread Lars Buitinck
Lars Buitinck added the comment: Cleaned up the patch. -- Added file: http://bugs.python.org/file31722/mp_getset_start_method.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18999

[issue18999] Robustness issues in multiprocessing.{get, set}_start_method

2013-09-10 Thread Lars Buitinck
Lars Buitinck added the comment: In my patched version, the private popen.get_start_method gets a kwarg set_if_needed=True. popen.Popen calls that as before, so its behavior should not change, while the public get_start_method sets the kwarg to False. I realise now that this has the side

[issue9369] const char* for PyObject_CallMethod and PyObject_CallFunction

2013-02-15 Thread Lars Buitinck
Lars Buitinck added the comment: I'm sorry, I really don't understand this refcounts.dat file and I'm not going to hack it further. Does the patch as it currently stands solve the issue with CallMethod and CallFunction, or not? (It has the changes to the docs

[issue9369] const char* for PyObject_CallMethod and PyObject_CallFunction

2013-01-09 Thread Lars Buitinck
Lars Buitinck added the comment: Any reason why this issue is still open? I just got a lot of compiler warnings when building Numpy, so this isn't just relevant to C++ programmers. (Btw., I did RTFM: the issue's Resolution is accepted but that option is not documented.) -- nosy

[issue9369] const char* for PyObject_CallMethod and PyObject_CallFunction

2013-01-09 Thread Lars Buitinck
Lars Buitinck added the comment: Redid the patch. -- Added file: http://bugs.python.org/file28653/constness.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9369

[issue9369] const char* for PyObject_CallMethod and PyObject_CallFunction

2013-01-09 Thread Lars Buitinck
Lars Buitinck added the comment: Oops, forgot to save changes to Doc/c-api/object.rst. PyObject_CallMethodObjArgs takes a PyObject*, mustn't that be non-const for reference counting to work? PyDict_GetItemString already has const, just not in refcounts.dat. Fixed. -- Added file: http

[issue16052] Typo in What's new in 3.3

2012-09-26 Thread Lars Buitinck
New submission from Lars Buitinck: I spotted a minor typo in the What's new for Py 3.3, introduced yesterday. See attached patch. -- assignee: docs@python components: Documentation files: typo.hg messages: 171333 nosy: docs@python, larsmans priority: normal severity: normal status

[issue16052] Typo in What's new in 3.3

2012-09-26 Thread Lars Buitinck
Lars Buitinck added the comment: Sorry about the bundle, I'm an hg noob and only noticed that bundles are binary after I submitted it. Will create a regular patch next time. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org

[issue14968] Section Inplace Operators of :mod:`operator` should be a subsection

2012-05-31 Thread Lars Buitinck
New submission from Lars Buitinck l.j.buiti...@uva.nl: The section Inplace Operators of the module docs for operator now show up in TOC at http://docs.python.org/dev/library/. I don't think that's intended as it does not describe a separate module. -- assignee: docs@python components

[issue13121] collections.Counter's += copies the entire object

2011-10-07 Thread Lars Buitinck
New submission from Lars Buitinck l.j.buiti...@uva.nl: I've found some counterintuitive behavior in collections.Counter while hacking on the scikit-learn project [1]. I wanted to use a bunch of Counters to do some simple term counting in a set of documents, roughly as follows: count_total

[issue13121] collections.Counter's += copies the entire object

2011-10-07 Thread Lars Buitinck
Lars Buitinck l.j.buiti...@uva.nl added the comment: If this is not implemented because it is backwards incompat, then it might be useful to add a note to update's docstring explaining that it is much more efficient than +=. I was very surprised that it took *minutes* to add a few thousand