[issue41176] revise Tkinter mainloop dispatching flag behavior

2020-07-06 Thread Richard Sheridan
Richard Sheridan added the comment: I'm planning to write the long-awaited Tkinter Internals section of the docs. (https://github.com/python/cpython/blame/master/Doc/library/tk.rst#L48) I've spent too much time at this point to let it all go down the memory hole. Unfortunately, I

[issue39093] tkinter objects garbage collected from non-tkinter thread cause crash

2020-07-15 Thread Richard Sheridan
Richard Sheridan added the comment: I stumbled into this in another project and I want to +1 the uncommenting solution. The problem occurs on __del__ rather than specifically in the gc somewhere (it happens when refs drop to zero too), so I wouldn't worry too much about killing the ga

[issue39093] tkinter objects garbage collected from non-tkinter thread cause crash

2020-07-15 Thread Richard Sheridan
Richard Sheridan added the comment: I stumbled into this in another project and I want to +1 the uncommenting solution. The problem occurs on __del__ rather than specifically in the gc somewhere (it happens when refs drop to zero too), so I wouldn't worry too much about killing the ga

[issue39093] tkinter objects garbage collected from non-tkinter thread cause crash

2020-07-15 Thread Richard Sheridan
Richard Sheridan added the comment: I stumbled into this in another project and I want to +1 the uncommenting solution. The problem occurs on __del__ rather than specifically in the gc somewhere (it happens when refs drop to zero too), so I wouldn't worry too much about killing the ga

[issue39093] tkinter objects garbage collected from non-tkinter thread cause crash

2020-07-15 Thread Richard Sheridan
Richard Sheridan added the comment: I stumbled into this in another project and I want to +1 the uncommenting solution. The problem occurs on __del__ rather than specifically in the gc somewhere (it happens when refs drop to zero too), so I wouldn't worry too much about killing the ga

[issue33479] Document tkinter and threads

2020-08-12 Thread Richard Sheridan
Change by Richard Sheridan : -- nosy: +Richard Sheridan ___ Python tracker <https://bugs.python.org/issue33479> ___ ___ Python-bugs-list mailing list Unsub

[issue41714] multiprocessing.Queue deadlock

2020-09-04 Thread Richard Purdie
New submission from Richard Purdie : We're having some problems with multiprocessing.Queue where the parent process ends up hanging with zombie children. The code is part of bitbake, the task execution engine behind OpenEmbedded/Yocto Project. I've cut down our code to the pieces i

[issue41714] multiprocessing.Queue deadlock

2020-09-04 Thread Richard Purdie
Richard Purdie added the comment: I should also add that if we don't use cancel_join_thread() in the parser processes, things all work out ok. There is therefore seemingly something odd about the state that is leaving things in. This issue doesn't occur every time, its maybe 1

[issue41714] multiprocessing.Queue deadlock

2020-09-04 Thread Richard Purdie
Richard Purdie added the comment: Even my hack to call _writer.close() doesn't seem to be enough, it makes the problem rarer but there is still an issue. Basically, if you call cancel_join_thread() in one process, the queue is potentially totally broken in all other processes that m

[issue41795] Allow assignment in yield statement

2020-09-16 Thread Richard Neumann
New submission from Richard Neumann : I often write factory (deserialization) methods for ORM models for web application backends that produce a number of records (ORM model instances) of itself and related database tables: @classmethod def from_json(cls, json): "&qu

[issue41795] Allow assignment in yield statement

2020-09-16 Thread Richard Neumann
Richard Neumann added the comment: Awesome, I didn't know that. I tried it without the parens and it gave me a SyntaxError. This can be closed then as it's obviously already implemented. Let's get to refactoring. -- ___ Python

[issue41891] asyncio.wait_for does not wait for task/future to be completed in all cases

2020-09-30 Thread Richard Kojedzinszky
New submission from Richard Kojedzinszky : This code should run without errors: ``` #!/usr/bin/env python import asyncio async def task1(): cv = asyncio.Condition() async with cv: await asyncio.wait_for(cv.wait(), 10) async def main(loop): task = loop.create_task(task1

[issue41891] asyncio.wait_for does not wait for task/future to be completed in all cases

2020-09-30 Thread Richard Kojedzinszky
Change by Richard Kojedzinszky : -- keywords: +patch pull_requests: +21487 stage: -> patch review pull_request: https://github.com/python/cpython/pull/22461 ___ Python tracker <https://bugs.python.org/issu

[issue37113] 'ß'.upper() should return 'ẞ'

2019-05-31 Thread Richard Neumann
New submission from Richard Neumann : Currently, calling the method .upper() on a string containing 'ß' will replace this character by 'SS'. It should, however, be replaced by 'ẞ'. -- components: Unicode messages: 344065 nosy: Richard Neumann, ezio.melo

[issue37113] 'ß'.upper() should return 'ẞ'

2019-05-31 Thread Richard Neumann
Richard Neumann added the comment: See also: https://en.wikipedia.org/wiki/Capital_%E1%BA%9E -- ___ Python tracker <https://bugs.python.org/issue37113> ___ ___

[issue16535] json encoder unable to handle decimal

2019-08-08 Thread Richard Musil
Richard Musil added the comment: It looks like I am resurrecting an old item, but I have been just hit by this and was directed to this issue (https://mail.python.org/archives/list/python-id...@python.org/thread/WT6Z6YJDEZXKQ6OQLGAPB3OZ4OHCTPDU/) I wonder if adding something similar to what

[issue28287] Refactor subprocess.Popen to let a subclass handle IO asynchronously

2017-08-25 Thread Martin Richard
Martin Richard added the comment: Yes, the goal is to isolate the blocking IO in __init__ into other methods so Popen can be subclassed in asyncio. The end goal is to ensure that when asyncio calls Popen(), it doesn't block the process. In the context of asyncio, there's no need to

[issue21622] ctypes.util incorrectly fails for libraries without DT_SONAME

2017-09-18 Thread Richard Eames
Changes by Richard Eames : -- nosy: +Richard Eames ___ Python tracker <https://bugs.python.org/issue21622> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35342] email "default" policy raises exception iterating over unparseable date headers

2018-11-28 Thread Richard Brooksby
New submission from Richard Brooksby : It is not possible to loop over the headers of a message with an unparseable date field using the "default" policy. This means that a poison email can break email processing. I expect to be able to process an email with an unparseable date f

[issue35342] email "default" policy raises exception iterating over unparseable date headers

2018-11-28 Thread Richard Brooksby
Change by Richard Brooksby : -- versions: +Python 3.6 -Python 3.7 ___ Python tracker <https://bugs.python.org/issue35342> ___ ___ Python-bugs-list mailin

[issue35342] email "default" policy raises exception iterating over unparseable date headers

2018-11-28 Thread Richard Brooksby
Change by Richard Brooksby : -- versions: +Python 3.7 ___ Python tracker <https://bugs.python.org/issue35342> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue18078] threading.Condition to allow notify on a specific waiter

2019-01-23 Thread Richard Whitehead
Richard Whitehead added the comment: Condition.wait_for_any is still a desirable feature, e.g. to wait on multiple command queues, or a work queue and a command queue. Is there any chance of pulling this into the latest version? -- nosy: +richardnwhitehead

[issue18078] threading.Condition to allow notify on a specific waiter

2019-01-24 Thread Richard Whitehead
Richard Whitehead added the comment: Thanks João. We are working on a medical prototype, and I wouldn't want to rely on our own version of something so fundamental without having a thorough test harness for it, which would obviously be quite time-consuming, and something of a dead-end.

[issue29851] importlib.reload references None object

2017-03-18 Thread Richard Cooper
New submission from Richard Cooper: importlib.reload doesn't work; gives an error about NoneType having no name attribute. See attached a simple repo testcase When run it yields the following [disappointing] result. I'm running Python3.0.6.1 (installed from brew) on O

[issue29573] NamedTemporaryFile with delete=True should not fail if file already deleted

2017-03-27 Thread Richard Xia
Richard Xia added the comment: Thanks for the discussion. I ended up doing something similar to the code snippet Christian posted, except I also had a second try/except FileNotFoundError within the original finally block to catch the case that David pointed out. In retrospect, I probably

[issue30177] pathlib.resolve(strict=False) only includes first child

2017-05-28 Thread Richard Cooper
Richard Cooper added the comment: Pull Request (PR 1649) treats this as a documentation problem. I would argue that the documentation is correct and this is a bug in the code. The `strict` flag was added as a result of issue19717. The decision on what to do when strict=False seems to come in

[issue32664] Connector "|" missing between ImportError and LookupError

2018-01-25 Thread Richard Neumann
New submission from Richard Neumann : In the documentation of the built-in exceptions hierarchy, there is a "|" missing connecting ImportError and LookupError. https://docs.python.org/3/library/exceptions.html#exception-hierarchy >From LookupError.__mro__ we can tell, that i

[issue33028] tempfile.TemporaryDirectory incorrectly documented

2018-03-08 Thread Richard Neumann
New submission from Richard Neumann : The tempfile.TemporaryDirectory is incorrectly documented at https://docs.python.org/3.6/library/tempfile.html#tempfile.TemporaryDirectory. It is described as a function, though actually being a class (unlinke tempfile.NamedTemporaryFile). The respective

[issue33450] unexpected EPROTOTYPE returned by sendto on MAC OSX

2018-05-09 Thread Richard C
New submission from Richard C : The following exception is raised unexpectedly on macOS versions 10.13, 10.12 & 10.11 at least. It appears to be macOS specific (works okay on Linux). Further information can be found at the following links: https://github.com/benoitc/gunicorn/issues/1487

[issue31737] Documentation renders incorrectly

2017-10-09 Thread Richard Gibson
New submission from Richard Gibson : The content at docs.python.org seems to be inserting language-dependent "smart quotes" in code blocks, which mangles backslashes and sequences like `'''`. Observed at https://docs.python.org/3/reference/lexical_analysis.html#

[issue1566331] Bad behaviour in .obuf*

2017-10-11 Thread Richard Aplin
Richard Aplin added the comment: Hi there yes this is very much an issue on Arm linux (e.g. Armbian). Calling any function that triggers a call to _ssize(..) - a function which is clearly intended to have no side-effects - instead resets the number of channels (and sample format?) by calling

[issue31992] Make iteration over dict_items yield namedtuples

2017-11-09 Thread Richard Neumann
New submission from Richard Neumann : Currently, iterating over dict_items will yield plain tuples, where the first item will be the key and the second item will be the respective value. This has some disadvantages when e.g. sorting dict items by value and key: def sort_by_value_len

[issue31992] Make iteration over dict_items yield namedtuples

2017-11-10 Thread Richard Neumann
Richard Neumann added the comment: Maybe there is no need to sacrifice performance, if a new, optional keyword argument would be introduced to dict.items(): def items(self, named=False): if named: else: Currently I need to define a namedtuple

[issue16487] Allow ssl certificates to be specified from memory rather than files.

2017-11-30 Thread Martin Richard
Martin Richard added the comment: FWIW, PyOpenSSL allows to load certificates and keys from a memory buffer and much more. It's also fairly easy to switch from ssl to PyOpenSSL. It's probably a viable alternative in many cases. --

[issue34524] Format conversion documentation example don't match comment

2018-08-27 Thread Richard Evans
New submission from Richard Evans : When reading the documentation for string formats I found that the conversion examples had comments that didn't match the example. -- assignee: docs@python components: Documentation messages: 324207 nosy: Richard Evans, docs@python priority: n

[issue34524] Format conversion documentation example don't match comment

2018-08-27 Thread Richard Evans
Change by Richard Evans : -- resolution: -> not a bug stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue34732] uuid returns version more than 5

2018-09-19 Thread Richard Neumann
Richard Neumann added the comment: I'm not sure whether the property method should be changed. I think it'd be more appropriate to raise a value error upon __init__ in this case as it is done with other checks. -- nosy: +conqp ___ Pyth

[issue34732] uuid returns version more than 5

2018-09-19 Thread Richard Neumann
Richard Neumann added the comment: @xtreak RFC 4122, section 4.1.3. specifies only versions 1 to 5. For explicitely checking the version, there is already a test in UUID.__init__, raising a ValueError on not 1<= verision 1<=5. I moved it to the bottom of __init__, i.e. after setting th

[issue34732] uuid returns version more than 5

2018-09-19 Thread Richard Neumann
Richard Neumann added the comment: Typos: "For explicitely checking the version" → "For explicitely *setting* the version". "on not 1<= verision 1<=5" → "on not 1 <= version <= 5". -- ___

[issue31958] UUID versions are not validated to lie in the documented range

2018-09-19 Thread Richard Neumann
Richard Neumann added the comment: @xtreak Indeed. It fails on _windll_getnode(). == ERROR: test_windll_getnode (test.test_uuid.TestInternalsWithoutExtModule

[issue34732] uuid returns version more than 5

2018-09-20 Thread Richard Neumann
Richard Neumann added the comment: I updated my pull request. Since "_windll_getnode()" is only returning a (random?) node for a UUID, I circumevented the value checking by introducing a new keyword-only argument "strict" defaulting to "True&qu

[issue17314] Stop using imp.find_module() in multiprocessing

2013-05-25 Thread Richard Oudkerk
Richard Oudkerk added the comment: Looks good to me. (Any particular reason for ignoring AttributeError?) -- ___ Python tracker <http://bugs.python.org/issue17

[issue17314] Stop using imp.find_module() in multiprocessing

2013-05-25 Thread Richard Oudkerk
Richard Oudkerk added the comment: The unit tests pass with the patch already (if we don't delete the "import imp" line). What attributes will be set by init_module_attrs()? -- ___ Python tracker <http://bugs.pyt

[issue18078] threading.Condition to allow notify on a specific waiter

2013-05-28 Thread Richard Oudkerk
Richard Oudkerk added the comment: > BTW, I find .notify(N) not much useful, because the docs say it may wake > more threads on a different implementation and also I can't never know > whom am I waking. The fact that more than N threads can wake up is not a problem if you are

[issue18078] threading.Condition to allow notify on a specific waiter

2013-05-28 Thread Richard Oudkerk
Richard Oudkerk added the comment: > This could solve the waiting problem for the "thread", but also may > keep the other Condition objs waiting -- and that may not be problem > because I'm already using .notify_all() I don't understand what you mean. > Prob

[issue18078] threading.Condition to allow notify on a specific waiter

2013-05-28 Thread Richard Oudkerk
Richard Oudkerk added the comment: > You cannot associate several conditions to the *inner lock*, because you > don't have access to them (otherwise I wouldn't open this issue). Condition.wait_for_any() would create a single inner lock and add it to the _waiters list for each

[issue16895] Batch file to mimic 'make' on Windows

2013-05-28 Thread Richard Oudkerk
Richard Oudkerk added the comment: I can't say I know enough about batch files to understand much of the code, but a few notes: Windows XP does not have the command "where" which you use -- Python 3.4 will still support XP. Except perhaps for looping I would prefer to get ri

[issue16895] Batch file to mimic 'make' on Windows

2013-05-28 Thread Richard Oudkerk
Richard Oudkerk added the comment: > Can't this just be a Python script? That would cause bootstrap issues for people who do not already have python installed. -- ___ Python tracker <http://bugs.python.org

[issue18040] SIGINT catching regression on windows in 2.7

2013-05-30 Thread Richard Oudkerk
Richard Oudkerk added the comment: I am not to familiar with the signal handling machinery. (I only did some refactoring to expose the event handle already used by time.sleep().) The change looks reasonable, but I am also not sure how necessary it is

[issue18120] multiprocessing: garbage collector fails to GC Pipe() end when spawning child process

2013-06-02 Thread Richard Oudkerk
Richard Oudkerk added the comment: The way to deal with this is to pass the write end of the pipe to the child process so that the child process can explicitly close it -- there is no reason to expect garbage collection to make this happen automatically. You don't explain the diffe

[issue18120] multiprocessing: garbage collector fails to GC Pipe() end when spawning child process

2013-06-02 Thread Richard Oudkerk
Richard Oudkerk added the comment: > The write end of that pipe goes out of scope and has no references in the > child thread. Therefore, per my understanding, it should be garbage > collected (in the child thread). Where am I wrong about this? The function which starts the child p

[issue18120] multiprocessing: garbage collector fails to GC Pipe() end when spawning child process

2013-06-02 Thread Richard Oudkerk
Richard Oudkerk added the comment: > So you're telling me that when I spawn a new child process, I have to > deal with the entirety of my parent process's memory staying around > forever? With a copy-on-write implementation of fork() this quite likely to use less memory th

[issue18121] antigravity leaks subprocess.Popen object

2013-06-02 Thread Richard Oudkerk
Richard Oudkerk added the comment: Presumably this is caused by the fact that Popen.__del__() ressurects self by appending self to _active if the process is still alive. On Windows this is unnecessary. On Unix it would be more sensible to just append the *pid* to _active. -- nosy

[issue18120] multiprocessing: garbage collector fails to GC Pipe() end when spawning child process

2013-06-02 Thread Richard Oudkerk
Richard Oudkerk added the comment: > What I'm still trying to grasp is why Python explicitly leaves the > parent processes info around in the child. It seems like there is > no benefit (besides, perhaps, speed) and that this choice leads to > non-intuitive behavior - like t

[issue18120] multiprocessing: garbage collector fails to GC Pipe() end when spawning child process

2013-06-03 Thread Richard Oudkerk
Richard Oudkerk added the comment: On 03/06/2013 1:02am, spresse1 wrote: > Whats really bugging me is that it remains open and I can't fetch a reference. > If I could do either of these, I'd be happy. > ... > Perhaps I really want to be implementing with os.fork(). Si

[issue18122] RuntimeError: not holding the import lock

2013-06-03 Thread Richard Oudkerk
Richard Oudkerk added the comment: Forking as a side effect of importing a module is evil. I think raising a RuntimeError is preferable to trying to make it Just Work. But maybe one could do void _PyImport_ReInitLock(void) { if (import_lock != NULL

[issue18120] multiprocessing: garbage collector fails to GC Pipe() end when spawning child process

2013-06-03 Thread Richard Oudkerk
Richard Oudkerk added the comment: On 03/06/2013 3:07pm, spresse1 wrote: > I could reimplement the close_all_fds_except() call (in straight python, using > os.closerange()). That seems like a reasonable solution, if a bit of a hack. > However, given that pipes are exposed by multiproce

[issue18120] multiprocessing: garbage collector fails to GC Pipe() end when spawning child process

2013-06-03 Thread Richard Oudkerk
Richard Oudkerk added the comment: Actually, you can use gc.get_referents(obj) which returns the direct children of obj (and is presumably implemented using tp_traverse). I will close. -- resolution: -> rejected stage: -> committed/rejected status: open -&g

[issue18078] threading.Condition to allow notify on a specific waiter

2013-06-04 Thread Richard Oudkerk
Richard Oudkerk added the comment: > Furthermore, the complexity is rather bad: if T is the average number > of waiting threads, an C the number of conditions being waited on, the > wait is O(C) (appending to C wait queues) and wakeup is O(CT) (C > removal from a T-length deque).

[issue17931] PyLong_FromPid() is not correctly defined on Windows 64-bit

2013-06-05 Thread Richard Oudkerk
Richard Oudkerk added the comment: > pid_t is HANDLE on Windows, which is a pointer. I think this is wrong. The signature of getpid() is int _getpid(void); so pid_t should be equivalent to int. The complication is that the return values of spawn*() etc are process handles (cast

[issue17931] PyLong_FromPid() is not correctly defined on Windows 64-bit

2013-06-05 Thread Richard Oudkerk
Richard Oudkerk added the comment: > @sbt: Would you like to have a strict separation between UNIX-like pid > (pid_t) and Windows process identifier (HANDLE)? Yes. And would I certainly like SIZEOF_PID_T == sizeof(pid_t) ;-) Note that _winapi takes the policy of treating HANDLE

[issue17931] PyLong_FromPid() is not correctly defined on Windows 64-bit

2013-06-05 Thread Richard Oudkerk
Richard Oudkerk added the comment: I see _Py_PARSE_PID already exists but no others ... -- ___ Python tracker <http://bugs.python.org/issue17931> ___ ___ Pytho

[issue17931] PyLong_FromPid() is not correctly defined on Windows 64-bit

2013-06-05 Thread Richard Oudkerk
Richard Oudkerk added the comment: Attached is a patch that adds _Py_PARSE_INTPTR and _Py_PARSE_UINTPTR to Include/longobject.h. It also uses _Py_PARSE_INTPTR in Modules/posixmodule.c and PC/msvcrtmodule.c and removes the definition for SIZEOF_PID. -- Added file: http

[issue17931] PyLong_FromPid() is not correctly defined on Windows 64-bit

2013-06-06 Thread Richard Oudkerk
Changes by Richard Oudkerk : -- status: open -> closed ___ Python tracker <http://bugs.python.org/issue17931> ___ ___ Python-bugs-list mailing list Unsubscri

[issue15528] Better support for finalization with weakrefs

2013-06-08 Thread Richard Oudkerk
Richard Oudkerk added the comment: > PJE suggests importing atexit and registering finalize only when it's > actually used. I guess this would be the easiest workaround. Done. -- status: open -> closed ___ Python tracker <http:

[issue18174] Make regrtest with --huntrleaks check for fd leaks

2013-06-09 Thread Richard Oudkerk
New submission from Richard Oudkerk: regrtest already tests for refcount leaks and memory allocation leaks. It can also be made to check for file descriptor leaks (and perhaps also handles on Windows). Running with the attached patch makes it look like test_openpty, test_shutil

[issue18175] os.listdir(fd) leaks fd on error

2013-06-09 Thread Richard Oudkerk
New submission from Richard Oudkerk: If os.listdir() is used with an fd, but fdopendir() fails (e.g. if the the fd is a normal file) then a duplicated fd is leaked. This explains the leaks in test_shutil mentioned in #18174. -- messages: 190875 nosy: sbt priority: normal severity

[issue18180] Refleak in test_imp on Windows

2013-06-10 Thread Richard Oudkerk
New submission from Richard Oudkerk: Seems to be in error path of _PyImport_GetDynLoadWindows(). -- files: load_dynamic.patch keywords: patch messages: 190901 nosy: sbt priority: normal severity: normal status: open title: Refleak in test_imp on Windows Added file: http

[issue18180] Refleak in test_imp on Windows

2013-06-10 Thread Richard Oudkerk
Changes by Richard Oudkerk : -- resolution: -> fixed stage: -> committed/rejected status: open -> closed type: -> resource usage versions: +Python 3.3, Python 3.4 ___ Python tracker <http://bugs.python

[issue18174] Make regrtest with --huntrleaks check for fd leaks

2013-06-10 Thread Richard Oudkerk
Richard Oudkerk added the comment: The test_shutil leak is caused by #17899. The others are fixed by a7381fe515e8 and 46fe1bb0723c. -- ___ Python tracker <http://bugs.python.org/issue18

[issue18174] Make regrtest with --huntrleaks check for fd leaks

2013-06-12 Thread Richard Oudkerk
Richard Oudkerk added the comment: Updated version which adds checks for handle leaks on Windows. -- Added file: http://bugs.python.org/file30561/fdleak.patch ___ Python tracker <http://bugs.python.org/issue18

[issue9122] Problems with multiprocessing, Python embedding and Windows

2013-06-14 Thread Richard Oudkerk
Changes by Richard Oudkerk : -- nosy: +sbt ___ Python tracker <http://bugs.python.org/issue9122> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue18214] Stop purging modules which are garbage collected before shutdown

2013-06-14 Thread Richard Oudkerk
New submission from Richard Oudkerk: Currently when a module is garbage collected its dict is purged by replacing all values except __builtins__ by None. This helps clear things at shutdown. But this can cause problems if it occurs *before* shutdown: if we use a function defined in a module

[issue18212] No way to check whether Future is finished?

2013-06-14 Thread Richard Oudkerk
Richard Oudkerk added the comment: Do you want something like f.done() and not f.cancelled() and f.exception() is None -- nosy: +sbt ___ Python tracker <http://bugs.python.org/issue18

[issue18214] Stop purging modules which are garbage collected before shutdown

2013-06-15 Thread Richard Oudkerk
Changes by Richard Oudkerk : -- nosy: +pitrou ___ Python tracker <http://bugs.python.org/issue18214> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue18214] Stop purging modules which are garbage collected before shutdown

2013-06-15 Thread Richard Oudkerk
Richard Oudkerk added the comment: On 15/06/2013 7:11pm, Antoine Pitrou wrote: >> Usually garbage collection will end up clearing the module's dict anyway. > > This is not true, since global objects might have a __del__ and then hold > the whole module dict alive throu

[issue18252] timeit makes code run faster?

2013-06-18 Thread Richard Oudkerk
Richard Oudkerk added the comment: I think if you use timeit then the code is wrapped inside a function before it is compiled. This means that your code can mostly use faster local lookups rather than global lookups. -- nosy: +sbt ___ Python

[issue18252] timeit makes code run faster?

2013-06-18 Thread Richard Oudkerk
Changes by Richard Oudkerk : -- stage: committed/rejected -> ___ Python tracker <http://bugs.python.org/issue18252> ___ ___ Python-bugs-list mailing list Un

[issue18252] timeit makes code run faster?

2013-06-18 Thread Richard Oudkerk
Changes by Richard Oudkerk : -- stage: -> committed/rejected ___ Python tracker <http://bugs.python.org/issue18252> ___ ___ Python-bugs-list mailing list Un

[issue16507] Patch selectmodule.c to support WSAPoll on Windows

2013-06-20 Thread Richard Oudkerk
Changes by Richard Oudkerk : -- keywords: +gsoc -patch resolution: -> rejected stage: -> committed/rejected status: open -> closed ___ Python tracker <http://bugs.python.or

[issue9122] Problems with multiprocessing, Python embedding and Windows

2013-06-20 Thread Richard Oudkerk
Richard Oudkerk added the comment: We don't do non-security updates on Python 2.6 anymore. As a workaround you might be able to do something like import sys, multiprocessing sys.frozen = True# or multiprocessing.forking.WINEXE = True ... if __name__ == 

[issue6461] multiprocessing: freezing apps on Windows

2013-06-20 Thread Richard Oudkerk
Richard Oudkerk added the comment: I just tried freezing the program from multiprocessing import freeze_support,Manager if __name__ == '__main__': freeze_support() m=Manager() l = m.list([1,2,3]) l.append(4) print(l) print(repr(l)) using cx_F

[issue17018] Inconsistent behaviour of methods waiting for child process

2013-06-20 Thread Richard Oudkerk
Changes by Richard Oudkerk : -- resolution: -> fixed stage: -> committed/rejected status: open -> closed ___ Python tracker <http://bugs.python.or

[issue18122] RuntimeError: not holding the import lock

2013-06-20 Thread Richard Oudkerk
Richard Oudkerk added the comment: See also #9573 and #15914. -- ___ Python tracker <http://bugs.python.org/issue18122> ___ ___ Python-bugs-list mailing list Unsub

[issue15198] multiprocessing Pipe send of non-picklable objects doesn't raise error

2013-06-20 Thread Richard Oudkerk
Changes by Richard Oudkerk : -- resolution: -> works for me stage: -> committed/rejected status: open -> closed ___ Python tracker <http://bugs.python.or

[issue17913] stat.filemode returns "-" for sockets and unknown types

2013-06-21 Thread Richard Milne
Richard Milne added the comment: I've added some changes to the module which (I believe) not only fix this bug, but add the reverse function, converting a permission string to a number. The diff was made against Lib/stat.py @ 84234:f32dad3a243e, which was the most recent version of the f

[issue17913] stat.filemode returns "-" for sockets and unknown types

2013-06-21 Thread Richard Milne
Richard Milne added the comment: I already see my name change will cause problems. The tarfile.py (Lib/tarfile.py:277) module relies on the function being named 'filemode'. As the stat.filemode function is relatively new, I don't know how many other modules rely on it. I c

[issue18277] Queue is empty right after put from the same process/thread

2013-06-21 Thread Richard Oudkerk
Richard Oudkerk added the comment: This is a very similar issue to #17985. While it may seem counter-intuitive, I don't see how it makes any difference. Another thread/process might remove the item before you can get it. I find it very difficult to imagine a real program where you can s

[issue18277] Queue is empty right after put from the same process/thread

2013-06-21 Thread Richard Oudkerk
Richard Oudkerk added the comment: Why would you use a multi-process queue to "pass messages from one part of the program to another part, in the same process and thread"? Why not just use a deque? Is this something you actually did, or are you just trying to come up with a

[issue17621] Create a lazy import loader mixin

2013-06-22 Thread Richard Oudkerk
Richard Oudkerk added the comment: Apologies for being dense, but how would you actually use such a loader? Would you need to install something in sys.meta_path/sys.path_hooks? Would it make all imports lazy or only imports of specified modules? -- nosy: +sbt

[issue17621] Create a lazy import loader mixin

2013-06-22 Thread Richard Oudkerk
Richard Oudkerk added the comment: Shouldn't the import lock be held to make it threadsafe? -- ___ Python tracker <http://bugs.python.org/issue17621> ___ ___

[issue18277] Queue is empty right after put from the same process/thread

2013-06-24 Thread Richard Oudkerk
Richard Oudkerk added the comment: > I did this to use the same abstraction that was used extensively for > other purposes, instead of recreating the same abstraction with a deque > as its basis. So you wanted a FIFO queue and preferred the API of Queue to that of deque? Well i

[issue7292] Multiprocessing Joinable race condition?

2013-06-24 Thread Richard Oudkerk
Richard Oudkerk added the comment: unfinished_tasks is simply used as a counter. It is only accessed while holding self._cond. If you get this error then I think the error text is correct -- your progam calls task_done() to many times. The proposed patch silences the sanity check by making

[issue15818] multiprocessing documentation of Process.exitcode

2013-06-24 Thread Richard Oudkerk
Changes by Richard Oudkerk : -- resolution: -> fixed stage: -> committed/rejected status: open -> closed ___ Python tracker <http://bugs.python.or

[issue17621] Create a lazy import loader mixin

2013-06-24 Thread Richard Oudkerk
Richard Oudkerk added the comment: I was thinking about the line self.__dict__.update(state) overwriting new data with stale data. -- ___ Python tracker <http://bugs.python.org/issue17

[issue18277] Queue is empty right after put from the same process/thread

2013-06-24 Thread Richard Oudkerk
Richard Oudkerk added the comment: > 1. "but should not cause any pratical difficulties" <-- you have a typo in > 'pratical' there. > 2. What exactly do you mean by "managed" queues in the new addition? Woops. Fixed now see 860fc6a2bd21, 347647a1f

[issue18277] Queue is empty right after put from the same process/thread

2013-06-24 Thread Richard Oudkerk
Changes by Richard Oudkerk : -- assignee: -> docs@python components: +Documentation -IO, Interpreter Core nosy: +docs@python resolution: -> fixed stage: -> committed/rejected status: open -> closed type: behavior -> ___ Python

[issue17985] multiprocessing Queue.qsize() and Queue.empty() with different results

2013-06-24 Thread Richard Oudkerk
Richard Oudkerk added the comment: This is really a documentation issue. The doc fix for #18277 covers this. -- components: +Library (Lib) -Extension Modules resolution: -> wont fix stage: -> committed/rejected status: open -> closed type: -&

[issue18329] for line in socket.makefile() speed degradation

2013-06-29 Thread Richard Oudkerk
Richard Oudkerk added the comment: I think in Python 3 makefile() returns a TextIOWrapper object by default. To force the use of binary you need to specfiy the mode: fileobj = ss.makefile(mode='rb') -- nosy: +sbt ___ Python trac

[issue18331] runpy.run_path gives functions with corrupted .__globals__

2013-06-30 Thread Richard Oudkerk
Richard Oudkerk added the comment: When modules are garbage collected the associated globals dict is purged -- see #18214. This means that all values (except __builtins__) are replaced by None. To work around this run_path() apparently returns a *copy* of the globals dict which was created

<    1   2   3   4   5   6   7   8   9   10   >