[issue21423] concurrent.futures.ThreadPoolExecutor should accept an initializer argument
Mark Dickinson added the comment: BTW, I think there's a design mistake in the EnhancedThreadPoolExecutor that's worth avoiding in any std. lib. implementation: the initialiser and uninitialiser for the EnhancedThreadPoolExecutor accept no arguments. In retrospect, it would have been better to have them take the thread itself as a single argument. We often found ourselves needing this - it's not hard to work around with a threading.current_thread() call, but it's mildly annoying to have to do so. -- nosy: +mark.dickinson ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21423 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21435] Segfault with cyclic reference and asyncio.Future
Antoine Pitrou added the comment: Tim's analysis is spot on, and finalize3.patch looks good to me (there's some strange commenting style there - do the carets ^ mean something special?). Still, I hope we can find a way to write a test case. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21435 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21435] Segfault with cyclic reference and asyncio.Future
Antoine Pitrou added the comment: The new info: its (the list object's) gc_refs also changed from GC_TENTATIVELY_UNREACHABLE to GC_UNTRACKED, That the object became untracked is wholly consistent with that its gc_next became NULL but not its gc_prev. Could that be the trashcan mecanism? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21435 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21435] Segfault with cyclic reference and asyncio.Future
Antoine Pitrou added the comment: Larry, once this patch is finalized, I think it is a good candidate for 3.4.1. -- nosy: +larry ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21435 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19643] shutil rmtree fails on readonly files in Windows
Tim Golden added the comment: The attached patch adds an example to the shutil documentation showing how to use an onerror handler to reattempt the removal of a read-only file. It's deliberately low-tech and simply removes the attribute and retries. If there's some other obstacle, it will continue to fail as it would have done in any case. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19643 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19643] shutil rmtree fails on readonly files in Windows
Changes by Tim Golden m...@timgolden.me.uk: -- keywords: +patch Added file: http://bugs.python.org/file35168/issue19643-doc.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19643 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20737] 3.3 _thread lock.acquire() timeout and threading.Event().wait() do not wake for certain values on Windows
Tim Golden added the comment: The attached patch uses DWORD (essentially: unsigned long) in condvar.h:PyCOND_TIMEDWAIT. Adding Kristjan as it was his code. -- keywords: +patch nosy: +kristjan.jonsson Added file: http://bugs.python.org/file35169/issue20737.condvar.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20737 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20737] 3.3 _thread lock.acquire() timeout and threading.Event().wait() do not wake for certain values on Windows
Changes by Tim Golden m...@timgolden.me.uk: -- stage: - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20737 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21411] Enable Treat Warning as Error on 32-bit Windows
Tim Golden added the comment: I'm at least +0.5 on this: I rather like the idea of forcing these things out into the open. The reason I'm not +1 is the danger of relatively benign or trivial warnings-turned-errors getting in the way of real, possibly critical, development. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21411 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20737] 3.3 _thread lock.acquire() timeout and threading.Event().wait() do not wake for certain values on Windows
Kristján Valur Jónsson added the comment: changing long to DWORD doesn't really fix the overflow issue. The fundamental problem is that some of the apis, e.g. WaitForSingleObject have a DWORD maximum. so, we cannot support sleep times longer than some particular time. Microseconds was chosen in the api because that is the resolution of the api in pthreads. IMHO, I think it is okay to have an implicit ceiling on the timeout, e.g. some 4000 seconds. We can add a caveat somewhere that anyone intending to sleep for extended periods of time should be prepared for a timeout occurring early, and should have his own timing logic to deal with that. My suggestion then is to a) change the apis to DWORD b) add a macro something like PyCOND_MAX_WAIT set to 2^32-1 c) properly clip the argument where we call this cunfion, e.g. in lock.acquire. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20737 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17752] many distutils tests fail when run from the installed location
Roundup Robot added the comment: New changeset 7d1929cc08dd by doko in branch '3.3': - Issue #17752: Fix distutils tests when run from the installed location. http://hg.python.org/cpython/rev/7d1929cc08dd New changeset 01e933cb1de9 by doko in branch '3.4': - Issue #17752: Fix distutils tests when run from the installed location. http://hg.python.org/cpython/rev/01e933cb1de9 New changeset c0bcf1383d77 by doko in branch 'default': - Issue #17752: Fix distutils tests when run from the installed location. http://hg.python.org/cpython/rev/c0bcf1383d77 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17752 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13702] relative symlinks in tarfile.extract broken (windows)
Tim Golden added the comment: eryksun: could you essay a patch? I'd be happy to review apply it. -- nosy: +tim.golden ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13702 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21447] Intermittent asyncio.open_connection / futures.InvalidStateError
Changes by Andrew Svetlov andrew.svet...@gmail.com: -- nosy: +asvetlov ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21447 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21428] Python suddenly cares about EOLs formats on windows
Eric V. Smith added the comment: Can you describe what command you ran and what you saw at the executing with python-3.4.0 make the execution stop step? -- nosy: +eric.smith ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21428 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19643] shutil rmtree fails on readonly files in Windows
Zachary Ware added the comment: Fair point, Paul. Patch looks good to me, Tim, barring a couple of nits pointed out on Rietveld. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19643 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19643] shutil rmtree fails on readonly files in Windows
Tim Golden added the comment: Thanks, Zach. Updated patch. -- assignee: - tim.golden Added file: http://bugs.python.org/file35170/issue19643-doc.2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19643 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19643] shutil rmtree fails on readonly files in Windows
Zachary Ware added the comment: LGTM! -- stage: - commit review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19643 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19643] shutil rmtree fails on readonly files in Windows
Tim Golden added the comment: Thanks. I'll hold off pushing until I've had a chance to run it on a Unix system. I'm not 100% whether it will operate in the same way there. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19643 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20737] 3.3 _thread lock.acquire() timeout and threading.Event().wait() do not wake for certain values on Windows
Tim Golden added the comment: Thanks for the feedback, Kristjan. You're obviously correct in that we can't account for timeouts greater than DWORD-size milliseconds and your proposed solution looks reasonable. However, I'd like to close off *this* particular issue which turns on the implicit and, presumably unintended, conversion between unsigned and signed long in the condition variable code. Can you see any adverse effect from moving to DWORD parameters per my patch? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20737 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20737] 3.3 _thread lock.acquire() timeout and threading.Event().wait() do not wake for certain values on Windows
R. David Murray added the comment: An implicit ceiling of 4000 seconds on the timeout? I routinely use timeouts of approximately 24 hours in calls to Event().wait(). What am I misunderstanding? If I'm not misunderstanding, then no, I don't think that change would be acceptable. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20737 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21450] [Issue 13630] IDLE: Find(ed) text is not highlighted while dialog box is open
New submission from Francisco Gracia: I was delighted with the behaviour of IDLE in version 3.4 until I noticed the problem of the matches with the non highlighted background in the modified (and in this sense improved) iterative text search operations. I was wondering how could this be possible at all in the present luxuriant stage of Python's evolution when now I see that this is a very old and probably cronic problem! What a pity! I have tried to test your *SearchBar* extension, Tal, but, after following the installation instructions of the *README* file, no bar appears at all in the editor window as well in version 3.3 as in 3.4 (WIndows7). As the process is not that difficult, I think that I am performing it correctly. Any idea of what can be wrong in spite of it? Thanks. -- messages: 218057 nosy: fgracia priority: normal severity: normal status: open title: [Issue 13630] IDLE: Find(ed) text is not highlighted while dialog box is open ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21450 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13630] IDLE: Find(ed) text is not highlighted while dialog box is open
Changes by Berker Peksag berker.pek...@gmail.com: -- nosy: +fgracia ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13630 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21450] [Issue 13630] IDLE: Find(ed) text is not highlighted while dialog box is open
Changes by Berker Peksag berker.pek...@gmail.com: -- resolution: - duplicate stage: - resolved status: open - closed superseder: - IDLE: Find(ed) text is not highlighted while dialog box is open ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21450 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20737] 3.3 _thread lock.acquire() timeout and threading.Event().wait() do not wake for certain values on Windows
Kristján Valur Jónsson added the comment: Tim, how about changing the variable to unsigned long? I'd like the signature of the function to be the same for all platforms. This will change the code and allow waits for up to 4000 seconds. There is still an overflow problem present, though.+ David, in general the maximum wait times of these primitives are platform specific. If you don't want any ceiling, then we would have to add code all over the place (in C) to do looping timeouts. Not sure which is better, to do it in c, or to accept in python that waits may timeout earlier than specified. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20737 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20737] 3.3 _thread lock.acquire() timeout and threading.Event().wait() do not wake for certain values on Windows
R. David Murray added the comment: I have production code on Windows using python2.7 that calls Event().wait() with a timeout of approximately 24 hours, and it works just fine. Having that no longer work is, IMO, an unacceptable regression. (I'm ready to move this code to python3 as soon as cx_Freeze supports Windows services under python3). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20737 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20737] 3.3 _thread lock.acquire() timeout and threading.Event().wait() do not wake for certain values on Windows
Tim Golden added the comment: Just to be clear: the change *I'm* proposing for this issue has nothing to do with limiting the wait, artificially or otherwise. It's simply undoing an unintended conversion from unsigned to signed and back again, whicih currently causes any wait of more than 2147 seconds to hang pretty much indefinitely. It looks to me as though Kristjan's 4000 is off by an order of magnitude: the parameter to WaitFor... is a DWORD number of milliseconds. That allows for 2**31 -1 milliseconds which is something short of 50 days, I believe. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20737 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21350] bug in file.writelines accepting buffers
Brian Kearns added the comment: So, for example: f = open('blah', 'wb') f.write(array.array('c', 'test')) f.writelines([array.array('c', 'test')]) Traceback (most recent call last): File stdin, line 1, in module TypeError: writelines() argument must be a sequence of strings While the comment in writelines says: Check that all entries are indeed strings. If not, apply the same rules as for file.write() and convert the results to strings. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21350 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21451] Improve error messages for malformed JSON
New submission from Raymond Hettinger: The error message for malformed JSON just tells you that the JSON is invalid, it doesn't say why (showing you which character bombed, what text is being read, what the pending openers are, or what allowable characters would have been expected). In the absence of this information, it is very difficult to debug hand-rolled JSON. json.loads('sample_file.json') # students find this hard to debug json.loads('''[ boys: 10, girls: 20, ]''')# hard to see trailing comma json.loads(['python', 'perl', 'ruby']) # needs double quotes json.loads([[10, 20], [30, 40]]]) # unbalanced delimiters -- messages: 218062 nosy: rhettinger priority: normal severity: normal status: open title: Improve error messages for malformed JSON type: enhancement versions: Python 2.7, Python 3.4, Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21451 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19643] shutil rmtree fails on readonly files in Windows
Roundup Robot added the comment: New changeset 31d63ea5dffa by Tim Golden in branch 'default': Issue19643 Add an example of shutil.rmtree which shows how to cope with readonly files on Windows http://hg.python.org/cpython/rev/31d63ea5dffa New changeset a7560c8f38ee by Tim Golden in branch 'default': Issue19643 Fix whitespace http://hg.python.org/cpython/rev/a7560c8f38ee -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19643 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19643] shutil rmtree fails on readonly files in Windows
Changes by Tim Golden m...@timgolden.me.uk: -- resolution: - fixed stage: commit review - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19643 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18492] Allow all resources if not running under regrtest.py
Zachary Ware added the comment: Here's a new and better patch. This patch keeps the regrtest_run global in support and moves the regrtest-or-not check into is_resource_enabled to make is_resource_enabled, requires, and requires_resource consistent with each other and in a way that still allows explicitly setting support.use_resources. The real change is confined to Lib/test/regrtest.py and Lib/test/support/__init__.py, the rest of the patch is cleanup allowed by the change (except for test_decimal, which has a minor change required to allow one of the command line options to that script to work). -- title: Add test.support.regrtest_run flag, simplify support.requires - Allow all resources if not running under regrtest.py versions: +Python 2.7, Python 3.5 -Python 3.3 Added file: http://bugs.python.org/file35171/issue18492.v2.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18492 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21451] Improve error messages for malformed JSON
R. David Murray added the comment: Python 3.4.0+ (3.4:d994d75cce95, May 6 2014, 21:37:02) [GCC 4.8.2] on linux Type help, copyright, credits or license for more information. import json json.loads('''[ ... boys: 10, ... girls: 20, ... ]''') Traceback (most recent call last): ... ValueError: Expecting ',' delimiter: line 2 column 17 (char 18) json.loads(['python', 'perl', 'ruby']) Traceback (most recent call last): ... ValueError: Expecting value: line 1 column 2 (char 1) json.loads([[10, 20], [30, 40]]]) Traceback (most recent call last): ... ValueError: Extra data: line 1 column 21 - line 1 column 22 (char 20 - 21) See issue 16009 for when this was added. Can you improve these? (The first one looks odd...) If so, you could reopen this. -- nosy: +r.david.murray resolution: - duplicate stage: - resolved status: open - closed superseder: - Json error messages could provide more information about the error versions: -Python 2.7, Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21451 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21451] Improve error messages for malformed JSON
Raymond Hettinger added the comment: What do you think about backporting the improved error messages? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21451 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17752] many distutils tests fail when run from the installed location
Éric Araujo added the comment: For future fixes, please note that 3.3 is in security mode. Can this issue be closed? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17752 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18854] is_multipart and walk should document their treatment of 'message' parts.
Abhilash Raj added the comment: I have tried to document the issue in the patch as discussed. David: Do you think I should also add an example in walk() method to demonstrate that it does not iterate over a 'message/rfc822' part even though it is multipart? -- keywords: +patch nosy: +abhilash.raj Added file: http://bugs.python.org/file35172/email.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18854 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21451] Improve error messages for malformed JSON
R. David Murray added the comment: Hmm. I guess I don't have any objection in principle. It is hard to imagine why someone would depend on the exact format of the old low-information messages, though anything is possible. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21451 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18854] is_multipart and walk should document their treatment of 'message' parts.
R. David Murray added the comment: Take a look at the source for msg_16.txt. The last part is a message/rfc822, which encapsulates a text/plain message. So it *does* iterate over it, even though it isn't a 'multipart' type (the opposite of what you say in the doc patch). Explicitly pointing out this aspect of the existing example would be a good idea. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18854 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20737] 3.3 _thread lock.acquire() timeout and threading.Event().wait() do not wake for certain values on Windows
Tim Golden added the comment: Updated patch with unsigned long applied throughout -- Added file: http://bugs.python.org/file35173/issue20737.condvar.2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20737 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21435] Segfault with cyclic reference and asyncio.Future
Tim Peters added the comment: Antoine, the carets are a symptom of my flu. My fingers jump on the keyboard from sneezing and coughing, and my eyes are watery so I don't see the typos. But I believe that can be fixed ;-) I doubt the trashcan cruft is responsible, for several reasons: I doubt the stack gets deep enough to trigger the trashcan in this little test; the trashcan xxx_deposit_object() functions assert-fail unless the object's state is _already_ untracked (trashcan does not itself untrack anything); and the trashcan list is linked via the gc_prev member, not the gc_next member (trashcan doesn't touch gc_next, so could not have set gc_next to NULL). Because of the second reason, even if the trashcan is involved the object must have gotten untracked earlier. I'll do another debugger session after a nap ;-) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21435 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18854] is_multipart and walk should document their treatment of 'message' parts.
Abhilash Raj added the comment: Sorry, my bad. I was a little confused. I have updated the patch and also added the example explicitly. -- Added file: http://bugs.python.org/file35174/email-1.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18854 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21083] Add get_content_disposition() to email.message.Message
Abhilash Raj added the comment: I read the discussion on issue #21079. Does this issue still needs a patch? If yes I am willing to write one. -- nosy: +abhilash.raj ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21083 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18854] is_multipart and walk should document their treatment of 'message' parts.
R. David Murray added the comment: Using _structure is a great idea. I'm not so fond of the full example, but I'll have to contemplate the text to decide what I'd rather do. Probably I'll take this patch of yours and tweak it, rather than try to tell you what I want :) Thanks for the patch! -- assignee: - r.david.murray stage: needs patch - commit review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18854 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21083] Add get_content_disposition() to email.message.Message
R. David Murray added the comment: Yes, that would be great. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21083 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20737] 3.3 _thread lock.acquire() timeout and threading.Event().wait() do not wake for certain values on Windows
Kristján Valur Jónsson added the comment: Hi there. When I said 4000, that was because of the conversion to microseconds which happens early on. I'm not trying to be difficult here Tim, it's just that you've pointed out a problem and I'd like us to have a comprehensive fix. unsigned long, I realized, is also not super, because on unix that can be either 32 or 64 bits :) The reason 24 hour waits work on 2.7 is that the conversion to microseconds is never done, rather it uses a DWORD of milliseconds. I agree that this is a regression that needs fixing. Even if there is a theroetical maximum, it should be higher than that :) My latest suggestion? Let's just go ahead and use a double for the argument in PyCOND_TIMEDWAIT(). We then have two conversion cases: 1) to a DWORD of milliseconds for both windows apis. Here we should truncate to the max size of a DWORD 2) to the timeval used on pthreads. for 1, that can be done like: if (ds*1e3 (double)DWORD_MAX) ms = DWORD_MAX; else ms = (DWORD)(ds*1e3) for 2, modifying the PyCOND_ADD_MICROSECONDS macro into something like: #define PyCOND_ADD_MICROSECONDS(tv, ds) do { long oldsec, sec, usec; assert(ds = 0.0); // truncate ds into theoretical maximum if (ds (double)long_max) ds = (double)long_max; // whatever that may be sec = (long)ds; usec = (long)((ds - (double)sec) * 1e6)) oldsec = tv.tv_sec; tv.tv_usec += usec; tv.tv_sec += sec; if (usec = 100) { tv.tv_usec -= 100; tv.tv_sec += 1; } if (tv.tv_sec oldsec) /* detect overflow */ tv.sec = max_long; I'm not super experienced with integer arithmetic like this or the pitfalls of overflow, so this might need some pondering. Perhaps it is better to do the tv_sec and tv_usec arithmetic in doubles before converting them back. Does this sound ok? Let me see if I can cook up an alternative patch. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20737 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20737] 3.3 _thread lock.acquire() timeout and threading.Event().wait() do not wake for certain values on Windows
R. David Murray added the comment: I'm adding Mark Dickinson to nosy to see if our math expert has a comment on the arithmetic :) -- nosy: +mark.dickinson ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20737 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20737] 3.3 _thread lock.acquire() timeout and threading.Event().wait() do not wake for certain values on Windows
Kristján Valur Jónsson added the comment: (cont.) so, I suggest that we modify the API to use Py_LONG_LONG usec Does that sound reasonable? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20737 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20737] 3.3 _thread lock.acquire() timeout and threading.Event().wait() do not wake for certain values on Windows
Kristján Valur Jónsson added the comment: Ah, I saw this code here in thread_nt.h: if ((DWORD) milliseconds != milliseconds) Py_FatalError(Timeout too large for a DWORD, please check PY_TIMEOUT_MAX); the PyCOND_TIMEDWAIT is currently only used by the GIL code and by the locks on NT. The GIL code assumes microsecond resolution. So we need to stick to that, at least. But the locking code assumes at least DWORD worth of milliseconds. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20737 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20737] 3.3 _thread lock.acquire() timeout and threading.Event().wait() do not wake for certain values on Windows
Kristján Valur Jónsson added the comment: Here is a proposed alternative patch. No additional checks, just a wider Py_LONG_LONG us wide enough to accommodate 32 bits of milliseconds as before. -- Added file: http://bugs.python.org/file35175/condwait.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20737 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20737] 3.3 _thread lock.acquire() timeout and threading.Event().wait() do not wake for certain values on Windows
Kristján Valur Jónsson added the comment: fix patch, was using git format -- Added file: http://bugs.python.org/file35176/condwait.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20737 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17752] many distutils tests fail when run from the installed location
Matthias Klose added the comment: yes, noted myself (too late), and informed Georg about it. Closing for now. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17752 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21083] Add get_content_disposition() to email.message.Message
Abhilash Raj added the comment: I have attached my patch. Reviews? -- keywords: +patch Added file: http://bugs.python.org/file35177/c_d.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21083 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21264] test_compileall fails to build in the installed location
Matthias Klose added the comment: adding unittest developers -- nosy: +ezio.melotti, michael.foord ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21264 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17756] test_syntax_error fails when run in the installed location
Matthias Klose added the comment: adding unittest developers -- nosy: +ezio.melotti, michael.foord ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17756 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21083] Add get_content_disposition() to email.message.Message
R. David Murray added the comment: Looks pretty good. The docs should say that the value of header is returned, and should also mentioned that the value is lower cased. You should also add a 'versionadded' directive, and for bonus points an entry in the whatsnew document for 3.5. Also, all three possible values should be tested, and a mixed case version of at last one of them, as well as a header that mime parameters in addition to the header value. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21083 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21083] Add get_content_disposition() to email.message.Message
Abhilash Raj added the comment: I have updated the patch. The header with mime parameter 'filename' in addition to header value is already added, will that not be enough? -- Added file: http://bugs.python.org/file35178/c_d-revised.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21083 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21435] Segfault with cyclic reference and asyncio.Future
Tim Peters added the comment: OK! This has nothing to do with the trashcan mechanism. The list object whose gc_next gets stomped on is not itself in a cycle. It's an empty list, and just happens to be a value in a dict, which in turn is a value in another dict. Its refcount falls to 0 as an ordinary part of its containing dict getting deallocated, and that's why the list becomes untracked. This was confusing me because the memory for the list object was apparently not deallocated: if it had been, pymalloc would have sprayed 0xdb into most of it, and gc_next would have appeared to me as 0xdbdbdbdb, not as 0. But after calling PyObject_GC_UnTrack on it (which sets gc_next to NULL), list_dealloc() just pushed the list object onto a free list, so no other kind of list destruction got done. That pretty much explains everything. Cute: it so happens that the _entire_ `collectable` list gets cleared out as a side effect of a single finalize(op); call. The iteration approach in the patch is robust against that, but it's hard to imagine that anything simpler could be. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21435 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21423] concurrent.futures.ThreadPoolExecutor should accept an initializer argument
Andreas van Cranenburgh added the comment: Here's a patch. I have added initializer and initargs keywords to both ThreadPoolExecutor and ProcessPoolExecutor, with the same semantics as multiprocessing.Pool. I couldn't figure out what to do if the initializer fails with a ProcessPoolExecutor: how to properly send the traceback back? I also haven't gotten around to figure out how to write tests. I haven't added unitializers, don't know if they would be useful. -- keywords: +patch Added file: http://bugs.python.org/file35179/pool_initializer.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21423 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21435] Segfault with cyclic reference and asyncio.Future
Tim Peters added the comment: finalize4.patch repairs the comment typos, adds a new comment, and removes the unused `old` argument. I think the code is ready to ship with this. I still don't have a reasonably simple fails-before-works-after test case. But that doesn't bother me much, since the problem is obvious once it's been seen, and the patch obviously fixes it, and any way of trying to provoke this from pure Python will rely on implementation accidents to get exactly the right pieces of cyclic trash in exactly the right order in gc's internal lists. Still, hope springs eternal ;-) -- Added file: http://bugs.python.org/file35180/finalize4.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21435 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21083] Add get_content_disposition() to email.message.Message
R. David Murray added the comment: Looks good, thanks. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21083 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21422] int 0: return the number unmodified
Changes by Jesús Cea Avión j...@jcea.es: -- nosy: +jcea ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21422 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21423] concurrent.futures.ThreadPoolExecutor should accept an initializer argument
Andreas van Cranenburgh added the comment: Here's a version with tests. Detecting an execption in the initializer works with ProcessPoolExecutor, but not with ThreadPoolExecutor. -- Added file: http://bugs.python.org/file35181/pool_initializer_tests.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21423 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21435] Segfault with cyclic reference and asyncio.Future
Tim Peters added the comment: xxx.py provokes a closely related death on my box, in a debug build (where 0xdbdbdbdb happened to be an invalid memory address). There are no imports so asyncio is definitely off the hook ;-) The code is senseless, and changing just about anything makes the problem go away. As mentioned before, provoking this class of error relies on all sorts of implementation accidents to get the internal gc lists into just the right state to fail. -- Added file: http://bugs.python.org/file35182/xxx.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21435 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19414] iter(ordered_dict) yields keys not in dict in some circumstances
Nikolaus Rath added the comment: Raymond, I think your patch does not really address the issue reported here. The dict documentation still guarantees that mutating a dict during iteration will raise a RuntimeError or may skip elements. The OrderedDict documentation still does not point out that OrderedDicts behave differently, yet they still raise a different exception than a regular dict in the same situation. I believe it should be possible to pass an OrderedDict to any function expecting a regular dict. This is still not possible. But even if you think this is not desirable (or not worth the cost), could we at least *document* that OrderedDicts behave differently? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19414 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com