[issue14903] dictobject infinite loop while importing socket
Daniel Farina added the comment: Attached. The program's function is to take a base64 encoded string and arguments as input and then to materialize this program on disk and run it with its arguments. Notably, this one contains no socket interaction at all, unlike the other examples, which narrows the cause quite a bit. It is run via 'ssh'. Like the other case, it's during module dictionary set-up. -- Added file: http://bugs.python.org/file31578/offender.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14903 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14903] dictobject infinite loop in module set-up
Daniel Farina added the comment: altered title now that it's been seen in init_posix. -- title: dictobject infinite loop while importing socket - dictobject infinite loop in module set-up ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14903 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18882] Add threading.main_thread() function
Antoine Pitrou added the comment: I don't think you saw my review, but could you add a docstring to the main_thread() function? Thanks! -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18882 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18909] Segfaults on win-amd64 due to corrupt pointer to Tkapp_Interp
Changes by Antoine Pitrou pit...@free.fr: -- priority: normal - high stage: - patch review versions: +Python 3.4 -Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18909 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12704] Language Reference: Clarify behaviour of yield when generator is not resumed
Changes by Berker Peksag berker.pek...@gmail.com: -- nosy: +pje versions: -Python 2.6, Python 3.1, Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12704 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18882] Add threading.main_thread() function
Andrew Svetlov added the comment: I did not received review email, sorry. Docstring is added. BTW 'threading' module has almost no docstrings, that's why I've added only docs at first. Do you think docstrings should be added to all public functions? Thanks. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18882 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18882] Add threading.main_thread() function
Antoine Pitrou added the comment: BTW 'threading' module has almost no docstrings, that's why I've added only docs at first. Do you think docstrings should be added to all public functions? Well, probably, although that's another issue :) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18882 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16201] socket.gethostbyname incorrectly parses ip
Antoine Pitrou added the comment: Perhaps you could add tests for the broadcast special cases? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16201 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16201] socket.gethostbyname incorrectly parses ip
Changes by Antoine Pitrou pit...@free.fr: -- versions: -Python 3.1, Python 3.2, Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16201 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18849] Failure to try another name for tempfile when directory with chosen name exists on windows
Changes by Vlad Shcherbina vlad.shcherb...@gmail.com: Added file: http://bugs.python.org/file31579/temp_dir_exists_retry_test_33_34.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18849 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18849] Failure to try another name for tempfile when directory with chosen name exists on windows
Changes by Vlad Shcherbina vlad.shcherb...@gmail.com: Added file: http://bugs.python.org/file31580/temp_dir_exists_retry_test_27.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18849 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16037] httplib: header parsing is not delimited
Jyrki Pulliainen added the comment: Reworded TooMuch to TooMany and made a patch for 2.6 too (2.7 didn't apply cleanly there) -- Added file: http://bugs.python.org/file31581/issue16037_py26.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16037 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16037] httplib: header parsing is not delimited
Changes by Jyrki Pulliainen jy...@dywypi.org: Added file: http://bugs.python.org/file31582/issue16037_py27_v2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16037 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16037] httplib: header parsing is not delimited
Changes by Jyrki Pulliainen jy...@dywypi.org: Added file: http://bugs.python.org/file31583/issue16037_py32_v2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16037 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18849] Failure to try another name for tempfile when directory with chosen name exists on windows
Vlad Shcherbina added the comment: 1. I agree that consistency between 2.7 and 3.* have some value, but maybe it's better to take less permissive approach in 3.* instead and only retry when exception is PermissionError _and_ errno is EACCES? 2. Currently it's being reraised unless platform.name == 'nt'. Also, I added a test, so if there are problems on other platforms, they will surface (I myself only tried it on linux and windows 7 though). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18849 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18919] Unify audio modules tests
New submission from Serhiy Storchaka: Three audio modules, aifc, sunau and wave, have similar interfaces and poor tests. The proposed patch introduces new file Lib/test/audiotests.py with common audio tests. New testing exposes some bugs and discrepancy between different audio modules. For example aifc uses bytes for compression type and name, while sunau and wave use strings (issue8934). aifc closes underlied file object on close(), while sunau and wave don't. wave rounds a framerate, while aifc and sunau truncate it. Different modules have different behaviors when process framedata with length which is not divisible by frame size. -- assignee: serhiy.storchaka components: Tests files: audiotests.patch keywords: patch messages: 196900 nosy: Claudiu.Popa, r.david.murray, serhiy.storchaka priority: normal severity: normal stage: patch review status: open title: Unify audio modules tests type: enhancement versions: Python 2.7, Python 3.3, Python 3.4 Added file: http://bugs.python.org/file31584/audiotests.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18919 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18919] Unify audio modules tests
Claudiu.Popa added the comment: I love this idea! I was thinking while working on sunau/aifc/wave patches that we can do more than this, unify the entire audio modules, getting rid of Aifc_write/read and Wave_write/read was in fact my first desire. One way that I thought about was to provide an abc and each module would implement that interface. That way we could create new modules for audio operations for other formats as well. If this sounds like a good idea, I could try to provide a patch for this. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18919 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18901] sunau.getparams should return a namedtuple
Roundup Robot added the comment: New changeset 61ca4732399b by Serhiy Storchaka in branch 'default': Issues #18901, #18919: Fix a typo in the _sunau_params name. http://hg.python.org/cpython/rev/61ca4732399b -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18901 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18919] Unify audio modules tests
Roundup Robot added the comment: New changeset 61ca4732399b by Serhiy Storchaka in branch 'default': Issues #18901, #18919: Fix a typo in the _sunau_params name. http://hg.python.org/cpython/rev/61ca4732399b -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18919 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18919] Unify audio modules tests
Changes by Serhiy Storchaka storch...@gmail.com: -- dependencies: +Add support of the 'with' statement to sunau.open. ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18919 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18917] python won't display greek characters in apache under windows
Nick added the comment: Turns out adding SetEnv PYTHONIOENCODING utf-8 to the end of apache's httpd.conf file fixed the problem for me. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18917 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18615] sndhdr.whathdr could return a namedtuple
Changes by Claudiu.Popa pcmantic...@gmail.com: -- nosy: +serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18615 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18920] argparse module version action
New submission from Wolfgang Maier: Hi, I just noticed that version output generated via the **'version' action** of the **argparse** module is routed to stderr. I'd expect regular output to go to stdout instead. The current behavior also seems inconsistent to me because --help prints to stdout. Best, Wolfgang -- messages: 196905 nosy: wolma priority: normal severity: normal status: open title: argparse module version action type: behavior versions: Python 3.2, Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18920 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18849] Failure to try another name for tempfile when directory with chosen name exists on windows
Eli Bendersky added the comment: Re (1) let's leave it as it is, now. I don't think it really matters. I left some comments in Rietveld. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18849 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12704] Language Reference: Clarify behaviour of yield when generator is not resumed
Eli Bendersky added the comment: Why guess... did you try it in the code? Trying has another goal - it would be nice to have a short code sample here demonstrating what's happening. The paragraph you're quoting seems obscure to me, with or without the fix. -- nosy: +eli.bendersky ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12704 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18615] sndhdr.whathdr could return a namedtuple
Changes by Serhiy Storchaka storch...@gmail.com: -- nosy: +r.david.murray stage: - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18615 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18920] argparse module version action
Eli Bendersky added the comment: Yes, it seems like an oversight to me. Printing --version to stdout is more customary (Python itself does it, and most other tools do too). A question comes up about backwards compatibility. I would definitely not change it in 2.x - it's just not worth it. As for 3.x, should this go into 3.3 too or just 3.4? -- nosy: +bethard, eli.bendersky, serhiy.storchaka versions: +Python 3.4 -Python 3.2, Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18920 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18898] Apply the setobject optimizations to dictionaries
Eli Bendersky added the comment: I'm still interested in seeing benchmarks that show where this actually improves things and by how much. Also, whether any regressions occur and how serious they are. -- nosy: +eli.bendersky ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18898 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18920] argparse module version action
Ezio Melotti added the comment: Only on 3.4. Python prints the version on stdout since 3.4 -- before it used stderr: 3.3$ ./python -V 2 /dev/null 3.3$ ./python -V /dev/null Python 3.3.2+ 3.4$ ./python -V 2 /dev/null Python 3.4.0a1+ 3.4$ ./python -V /dev/null This might also explain why argparse uses stderr (other modules/scripts in the stdlib might do the same too). -- keywords: +easy nosy: +ezio.melotti stage: - needs patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18920 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18920] argparse module version action
Eli Bendersky added the comment: On Wed, Sep 4, 2013 at 6:26 AM, Ezio Melotti rep...@bugs.python.org wrote: Ezio Melotti added the comment: Only on 3.4. Python prints the version on stdout since 3.4 -- before it used stderr: 3.3$ ./python -V 2 /dev/null 3.3$ ./python -V /dev/null Python 3.3.2+ 3.4$ ./python -V 2 /dev/null Python 3.4.0a1+ 3.4$ ./python -V /dev/null This might also explain why argparse uses stderr (other modules/scripts in the stdlib might do the same too). Ah, right. On 3.4 Python's main.c uses printf for --version; on earlier versions it's fprintf(stderr...) I guess it's a no-brainer then; 3.4 has to be changed, but not earlier versions. I'll whip up a quick patch. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18920 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18920] argparse module version action
Eli Bendersky added the comment: The Python executable change is from #18338 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18920 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18898] Apply the setobject optimizations to dictionaries
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18898 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18693] help() not helpful with enum
Ethan Furman added the comment: Found it! It was a combination of __objclass__ not being defined on the enum mmebers, and the metatype not being searched in the __mro__ by inspect. Thanks, Ronald, for the necessary clues. Patch attached. I'm not sure if I have the method wowser showing up in the correct dir(). Thoughts? -- keywords: +patch stage: committed/rejected - patch review Added file: http://bugs.python.org/file31585/issue18693.stoneleaf.01.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18693 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16938] pydoc confused by __dir__
Ethan Furman added the comment: Issue18693 has a patch to `inspect` so that classify_class_attrs will also look in the metaclass. If that is accepted I think PyDoc is okay as is. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16938 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8311] wave module sets data subchunk size incorrectly when writing wav file
Serhiy Storchaka added the comment: It's because you write an array of integers while writeframes() expects a bytes object. Here is a test. -- keywords: +patch stage: test needed - needs patch versions: +Python 2.7, Python 3.3, Python 3.4 -Python 2.6 Added file: http://bugs.python.org/file31586/wave_test_write_array.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8311 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18920] argparse module version action
Eli Bendersky added the comment: Patch attached -- keywords: +patch stage: needs patch - patch review Added file: http://bugs.python.org/file31587/issue18920.1.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18920 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18693] help() not helpful with enum
Eli Bendersky added the comment: Great, Ethan. I'd say the inspect fix has to be reviewed and committed separately. Maybe #16938 is the right place to post the patch for it. Once that's in, we can review/commit the enum parts. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18693 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18920] argparse module version action
Serhiy Storchaka added the comment: You misplace Misc/NEWS entry in wrong section -- What's New in Python 3.4.0 Alpha 1. I think this change (as change of issue18338) worths the mentioning in Doc/whatsnew/3.4.rst. Did you run all test suite? This change can affect other tests. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18920 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18920] argparse module version action
Serhiy Storchaka added the comment: This might also explain why argparse uses stderr (other modules/scripts in the stdlib might do the same too). Lib/trace.py, Tools/pynche/Main.py, and Tools/i18n/pygettext.py write to the stdout. Lib/smtpd.py and Tools/i18n/msgfmt.py write to the stderr. The optparse module also writes to the stdout. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18920 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18921] In imaplib, cached capabilities may be out of date after login
New submission from Steven Murdoch: When an IMAP server is behind a proxy, the proxy's capabilities may differ from that of the actual IMAP server. However, in Python imaplib, the client will ignore any updates to available capabilities in the response to the LOGIN command (see rfc3501, section 6.2.3). As a result, imaplib will incorrectly assume that certain features are not available (including the IDLE patch in issue 11245, and as implemented in getmail 4.43.0). imaplib should refresh its capability list either based on the result of the login command or by explicitly sending a CAPABILITY command following login. -- components: Library (Lib) messages: 196920 nosy: sjmurdoch priority: normal severity: normal status: open title: In imaplib, cached capabilities may be out of date after login type: behavior versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4, Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18921 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18909] Segfaults on win-amd64 due to corrupt pointer to Tkapp_Interp
Serhiy Storchaka added the comment: Indeed, for less surprise we should use PyInt_FromSsize_t() on Python 2.7. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18909 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18693] help() not helpful with enum
Ethan Furman added the comment: help() won't really be fixed with the inspect patch. If no objections within a few hours I'll open a new issue for it. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18693 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18808] Thread.join returns before PyThreadState is destroyed
Antoine Pitrou added the comment: What I still don't understand: the new lock is an internal implementation detail. How would it gain a weakref with a callback? Users aren't going to mess with this lock, and if you want to stop Python maintainers from giving it a weakref with a callback, simply say they shouldn't do that (in the code comments) - you could even add code verifying it doesn't have any weakrefs outstanding (although that would likely be a waste of time and code: no maintainer is going to _want_ to make a weakref to it, let alone a weakref with a callback). Well... perhaps I'm being too perfectionist, but I don't want Python to be crashable merely by manipulating a Thread object's private attributes. If I add some check code, it will quickly become more complicated than the current weakref version, which works by design :-) My concern is the bulk and obscurity of this code, all to plug such a minor hole. I call it minor because it's been reported once in the history of the project, and Tamas wormed around it with a 1-liner (added a sleep). Yeah, the overall concern is a bit obscure, but still: right now, if you use threads inside a subinterpreter, your code can work or crash depending on subtle timing conditions (where crash doesn't even mean raise an exception but abort the whole process). So I think it's worth trying to fix, even though the complication can look a bit disproportionate. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18808 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11245] Implementation of IMAP IDLE in imaplib?
Changes by R. David Murray rdmur...@bitdance.com: -- dependencies: +In imaplib, cached capabilities may be out of date after login ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11245 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18921] In imaplib, cached capabilities may be out of date after login
R. David Murray added the comment: I agree that this would be a good idea, but it is not a bug in the current implementation. The only place imaplib itself uses the cached capabilities is *before* login, in the starttls method, and there it refreshes it after starttls succeeds. Although it isn't documented any more than the 'capabilities' attribute is (and therefor neither are part of the public API currently), you can call the capability command yourself if you need the refreshed capabilities in your own code. Good catch on the bug in the IDLE patch, though. -- nosy: +r.david.murray stage: - needs patch type: behavior - enhancement versions: -Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18921 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18922] Output versions of scripts to stdout
New submission from Serhiy Storchaka: The Lib/smtpd.py and Tools/i18n/msgfmt.py scripts write their version strings to stderr. It should be changed to stdout for consistency with most common practice. See also issue18338 and issue18920. -- components: Demos and Tools, Library (Lib) keywords: easy messages: 196922 nosy: serhiy.storchaka priority: normal severity: normal stage: needs patch status: open title: Output versions of scripts to stdout type: behavior versions: Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18922 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18876] Problems with files opened in append mode with io module
Changes by Erik Bray erik.m.b...@gmail.com: Added file: http://bugs.python.org/file31588/issue_18876_patch_2.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18876 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16853] add a Selector to the select module
Roundup Robot added the comment: New changeset e4d45315c38c by Charles-François Natali in branch 'default': Issue #16853: Add new selectors module. http://hg.python.org/cpython/rev/e4d45315c38c -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16853 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16038] ftplib: unlimited readline() from connection
Giampaolo Rodola' added the comment: I'm attaching a slightly different patch including new tests and which uses a 'maxline' class attribute (as opposed to a global var). Christian if that's OK with you I will wait a while and then make a commit for all Python versions. -- Added file: http://bugs.python.org/file31589/ftplib_maxline.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16038 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16826] Don't check for PYTHONCASEOK if interpreter started with -E
Meador Inge added the comment: Reopening to rework test cases. -- resolution: fixed - stage: committed/rejected - needs patch status: closed - open ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16826 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18922] Output versions of scripts to stdout
Changes by Berker Peksag berker.pek...@gmail.com: -- nosy: +berker.peksag ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18922 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7511] msvc9compiler.py: ValueError when trying to compile with VC Express
Li Wah Teng added the comment: About the 'KEY_BASE' is not defined error in Steve Dower's diff, I was able to fix it by adding the following line before the KEY_BASE variable is referenced: KEY_BASE = rSoftware\Microsoft\\ With this, I was finally able to use the patched msvccompiler9.py to build PyCrypto using VS Express 2010 with Windows SDK 7.1 and Python 3.3.2 (64-bit) installed. If someone can confirm that this is the only thing missing in the 2 versions of the msvccompiler9.diff files, it would be great. Hope it helps! -- nosy: +lwteng ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7511 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16853] add a Selector to the select module
STINNER Victor added the comment: New changeset e4d45315c38c by Charles-François Natali in branch 'default': Issue #16853: Add new selectors module. http://hg.python.org/cpython/rev/e4d45315c38c Great! Congrats Charles-François for the new module! I tried to implement such module once but I gave up because it was more complex than what I expected. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16853 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16853] add a Selector to the select module
Guido van Rossum added the comment: Agreed, this was a great feat of implementation and API design. Is there anything left to do or can we close this issue? (I looked at the Proactor code in Tulip again and I think it is not quite as easy to isolate it, so I'm not requesting that Proactors be added to the stdlib at this time.) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16853 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16853] add a Selector to the select module
Roundup Robot added the comment: New changeset 6b14ebe0f7ac by Victor Stinner in branch 'default': Issue #16853: Mention the new selectors module in What's New in Python 3.4 http://hg.python.org/cpython/rev/6b14ebe0f7ac -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16853 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16853] add a Selector to the select module
STINNER Victor added the comment: Is there anything left to do or can we close this issue? It would be nice to mention the new selectors module in the documentation of the select module. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16853 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16853] add a Selector to the select module
Antoine Pitrou added the comment: Is there anything left to do or can we close this issue? It would be nice to mention the new selectors module in the documentation of the select module. Feel free to make documentation commits :) They don't necessarily have to pass a review stage. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16853 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16853] add a Selector to the select module
Roundup Robot added the comment: New changeset 142ff216e4b4 by Victor Stinner in branch 'default': Issue #16853: Mention the new selectors module in the select module http://hg.python.org/cpython/rev/142ff216e4b4 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16853 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18923] Use the new selectors module in the subprocess module
New submission from STINNER Victor: Python 3.4 has a new selectors module (issue #16853). It would be nice to use it instead of select.poll or select.select in the subprocess module. -- messages: 196936 nosy: haypo priority: normal severity: normal status: open title: Use the new selectors module in the subprocess module type: enhancement versions: Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18923 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18923] Use the new selectors module in the subprocess module
STINNER Victor added the comment: Other modules using select.select() or select.poll() for more than 1 file descriptor: - asyncore - multiprocessing.connection - multiprocessing.forkserver -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18923 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16853] add a Selector to the select module
STINNER Victor added the comment: Feel free to make documentation commits :) Ok, done. I also created the issue #18923: Use the new selectors module in the subprocess module. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16853 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18823] Idle: use pipes instead of sockets to talk with user subprocess
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18823 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16853] add a Selector to the select module
Antoine Pitrou added the comment: I feel this can be closed then :) Thanks, Charles-François! -- resolution: - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16853 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16853] add a Selector to the select module
Charles-François Natali added the comment: Is there anything left to do or can we close this issue? I usually wait until the test is run on the buildbots to check I didn't break anything: apparently that's OK, so we can close. It would be nice to mention the new selectors module in the documentation of the select module. Indeed (I mentioned the select module in selectors' doc, but the contrary is certainly useful to point users to this new module), thanks for your commit. Where were you when I asked for documentation review ;-) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16853 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18856] Added test coverage for calendar print functions
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti stage: - patch review versions: +Python 2.7, Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18856 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18857] urlencode of a None value uses the string 'None'
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18857 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18859] README.valgrind should mention --with-valgrind
Changes by Ezio Melotti ezio.melo...@gmail.com: -- type: - enhancement ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18859 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18853] Got ResourceWarning unclosed file when running Lib/shlex.py demo
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18853 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18829] csv produces confusing error message when passed a non-string delimiter
Ezio Melotti added the comment: IMHO the error should say TypeError: delimiter must be an 1-character string, not bytes. We could also have two separate errors for wrong type and right type, wrong length (this would be a ValueError though). -- nosy: +ezio.melotti ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18829 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18922] Output versions of scripts to stdout
Nicola Palumbo added the comment: Now The Lib/smtpd.py and Tools/i18n/msgfmt.py scripts write their version strings to stdout, and not to sderr. Applying the patch the stdout can be redirect /python.exe Lib/smtpd.py --version /dev/null Without the patch: /python.exe Lib/smtpd.py --version /dev/null Python SMTP proxy version 0.3 -- keywords: +patch nosy: +npalumbo Added file: http://bugs.python.org/file31590/issue18922.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18922 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16853] add a Selector to the select module
Giampaolo Rodola' added the comment: Is there anything left to do or can we close this issue? Add support for select.devpoll on Solaris. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16853 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18876] Problems with files opened in append mode with io module
Roundup Robot added the comment: New changeset 33bd39b67cc1 by Antoine Pitrou in branch '3.3': Issue #18876: The FileIO.mode attribute now better reflects the actual mode under which the file was opened. http://hg.python.org/cpython/rev/33bd39b67cc1 New changeset b5530669ef70 by Antoine Pitrou in branch 'default': Issue #18876: The FileIO.mode attribute now better reflects the actual mode under which the file was opened. http://hg.python.org/cpython/rev/b5530669ef70 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18876 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18045] get_python_version is not import in bdist_rpm.py
Lukas Wunner added the comment: The attached patch adds just the missing import statement (which already exists in all 3.x versions) and changes nothing else. -- nosy: +l Added file: http://bugs.python.org/file31591/issue18045-py27.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18045 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18924] Enum members are easily replaced
Barry A. Warsaw added the comment: On Sep 04, 2013, at 07:47 PM, Ethan Furman wrote: I'm pretty sure we don't want that. Agreed, although a we're all consenting adults argument could be made. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18924 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18924] Enum members are easily replaced
Ethan Furman added the comment: I'm not suggesting we try to make it impossible, just tougher (akin to what we did with the name and value attributes on an Enum member -- at Guido's behest, no less ;). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18924 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18924] Enum members are easily replaced
Eli Bendersky added the comment: Time for your friendly devil's advocate... We're using and loving this language: class Foo: ... bar = 2 ... f = Foo() f.bar 2 f.bar = 42 f.bar 42 So let's stop trying to make enums even more alien. This is a non-issue in Python. [Barry, how come your name in the tracker is linked to your website? me wants...] -- keywords: +buildbot ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18924 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18924] Enum members are easily replaced
New submission from Ethan Furman: Python 3.4.0a1+ (default:33727fbb4668+, Aug 31 2013, 12:34:55) [GCC 4.7.3] on linux Type help, copyright, credits or license for more information. -- import enum -- class Test(enum.Enum): ... this = 'that' ... -- Test.this Test.this: 'that' -- Test.this = 9 -- Test.this 9 I'm pretty sure we don't want that. -- assignee: ethan.furman messages: 196945 nosy: barry, eli.bendersky, ethan.furman priority: normal severity: normal status: open title: Enum members are easily replaced type: behavior versions: Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18924 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18924] Enum members are easily replaced
Barry A. Warsaw added the comment: On Sep 04, 2013, at 08:18 PM, Eli Bendersky wrote: [Barry, how come your name in the tracker is linked to your website? me wants...] Go to Your Details in the left sidebar and enter a Homepage. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18924 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18924] Enum members are easily replaced
Eli Bendersky added the comment: You do not have permission to edit user - in a red banner, no less. Blasphemy. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18924 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18808] Thread.join returns before PyThreadState is destroyed
Tim Peters added the comment: Oh, I'm not opposed, I'm just complaining ;-) It would be much nicer to have an approach that worked for all thread users, not just threading.Thread users. For example, a user can easily (well, plausibly) get into the same kinds of troubles here by calling _thread.start_new_thread() directly, then waiting for their threads to end before letting the program finish - they have no idea either when their tstates are actually destroyed. A high-probability way to appear to fix this for everyone could change Py_EndInterpreter's if (tstate != interp-tstate_head || tstate-next != NULL) Py_FatalError(Py_EndInterpreter: not the last thread); to something like int count = 0; while (tstate != interp-tstate_head || tstate-next != NULL) { ++count; if (count SOME_MAGIC_VALUE) Py_FatalError(Py_EndInterpreter: not the last thread); sleep(SOME_SHORT_TIME); } In the meantime ;-), you should change this part of the new .join() code: if endtime is not None: waittime = endtime - _time() if not lock.acquire(timeout=waittime): return The problem here is that we have no idea how much time may have elapsed before computing the new `waittime`. So the new `waittime` _may_ be negative, in which case we've already timed out (but passing a negative `waittime` to acquire() means wait as long as it takes to acquire the lock). So this block should return if waittime 0. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18808 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16853] add a Selector to the select module
Giampaolo Rodola' added the comment: I have realized just now that at least epoll() and kqueue() selectors could take advantage and define their own modify() method (there was even a TODO I totally missed). Anyway, from now on I'm gonna file separate issues. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16853 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18925] select.poll.modify is not documented
New submission from Giampaolo Rodola': It was introduced in Python 2.6: http://bugs.python.org/issue1657 Will commit a patch soon. -- assignee: docs@python components: Documentation messages: 196953 nosy: docs@python, giampaolo.rodola priority: normal severity: normal status: open title: select.poll.modify is not documented versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18925 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13153] IDLE crashes when pasting non-BMP unicode char on Py3
Serhiy Storchaka added the comment: This bug can be reproduced on Linux too. Just copy and paste illegal UTF-8 sequence. I.e. b'\xed\xb2\x80' or b'\xc0\x80'. My patch works with first example but failed with second. When change the error handler in fromTclStringAndSize() to replace it works with all illegal sequences. -- assignee: - serhiy.storchaka stage: - patch review Added file: http://bugs.python.org/file31592/tkinter_string_conv_2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13153 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18924] Enum members are easily replaced
Ethan Furman added the comment: Eli Bendersky added the comment: So let's stop trying to make enums even more alien. This is a non-issue in Python. Enumerations are supposed to be constant. Since this is Python there is actually very little that cannot be changed, but we can make objects better reflect our intent. For Enum members Guido had me change the `value` and `name` attributes to properties because the value and name should also be constant. Can they still be changed? Yes, but you have to know what you're doing. (Enum.member._name_ = ... ) I'm proposing we do the same thing for the Enum class that we did for the Enum member. To me, an Enumeration that lets you change its constants higgledy-piggledy is way more alien than one that tries to stay, um, /constant/. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18924 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18924] Enum members are easily replaced
Eli Bendersky added the comment: On Wed, Sep 4, 2013 at 1:57 PM, Ethan Furman rep...@bugs.python.org wrote: Ethan Furman added the comment: Eli Bendersky added the comment: So let's stop trying to make enums even more alien. This is a non-issue in Python. Enumerations are supposed to be constant. Since this is Python there is actually very little that cannot be changed, but we can make objects better reflect our intent. For Enum members Guido had me change the `value` and `name` attributes to properties because the value and name should also be constant. Can they still be changed? Yes, but you have to know what you're doing. (Enum.member._name_ = ... ) I'm proposing we do the same thing for the Enum class that we did for the Enum member. To me, an Enumeration that lets you change its constants higgledy-piggledy is way more alien than one that tries to stay, um, /constant/. I can empathize with your reasoning, but I'm still -1. There's an infinite amount of tweaks you can think of to make Enum safer, in a language that by design is unsafe for such operations. You will keep finding new holes, because the language will keep fighting you. And the end result? A bit more theoretical purity, hardly any tangible gain. But more complex code, which makes it more prone to bugs and more difficult to understand. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18924 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18879] tempfile.NamedTemporaryFile can close the file too early, if not assigning to a variable
jort bloem added the comment: I am only new to Python, but... Having looked at the code, I am surprised that the _TemporaryFileWrapper is not a subclass of file. Surely that would be the python way, and would solve this problem, too? __getattr__ would no longer be needed. The opening of the file is within the library, so _os.open() could be replaced with file()... It would require rewriting/reorganising chunks of this code... -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18879 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18922] Output versions of scripts to stdout
Changes by Serhiy Storchaka storch...@gmail.com: -- stage: needs patch - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18922 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18876] Problems with files opened in append mode with io module
Antoine Pitrou added the comment: I have committed your patch. Thank you! -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18876 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18876] Problems with files opened in append mode with io module
Roundup Robot added the comment: New changeset fc2b88a27fa1 by Antoine Pitrou in branch '2.7': Issue #18876: The FileIO.mode attribute now better reflects the actual mode under which the file was opened. http://hg.python.org/cpython/rev/fc2b88a27fa1 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18876 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18924] Enum members are easily replaced
Ethan Furman added the comment: Yes, as a matter of fact: -- Test.this Test.this: 'that' -- Test.this = 'other' -- Test.this 'other' -- Test('that') Test.this: 'that' -- list(Test) [Test.this: 'that'] As you can see, the Test Enum becomes inconsistent if this is allowed. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18924 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18927] Lock.acquire() docs incorrect about negative timeout
New submission from Tim Peters: Here from the 3.3.2 docs for threading.Lock: acquire(blocking=True, timeout=-1) Acquire a lock, blocking or non-blocking. ... When invoked with the floating-point timeout argument set to a positive value, block for at most the number of seconds specified by timeout and as long as the lock cannot be acquired. A negative timeout argument specifies an unbounded wait. ... However, that's not what the code does for a negative timeout: from threading import Lock x = Lock() x.acquire(1, -0.2) Traceback (most recent call last): File stdin, line 1, in module ValueError: timeout value must be strictly positive The only negative value the code allows is -1, in lock_PyThread_acquire_lock(): if (timeout 0 timeout != -1) { PyErr_SetString(PyExc_ValueError, timeout value must be strictly positive); return NULL; } The docs should change to say that -1 is special ;-) -- assignee: docs@python components: Documentation keywords: easy messages: 196960 nosy: docs@python, tim.peters priority: normal severity: normal status: open title: Lock.acquire() docs incorrect about negative timeout type: behavior versions: Python 3.3, Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18927 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18924] Enum members are easily replaced
Eric Snow added the comment: I'm also -1, though I do appreciate the indicating intent argument. What's the risk that someone will accidentally overwrite an enum item? Also, is there other enum functionality that relies on the continued existence of the initial enum items? If not then I'm in the consenting adults camp. Eli makes a good point about the potential for (ultimately) unnecessary complexity and what that costs us. However, now's the time to come to a conclusion--before the 3.4 release (and likely beta 1) lock in the API. -- nosy: +eric.snow ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18924 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18925] select.poll.modify is not documented
STINNER Victor added the comment: For your information, epoll.closed and kqueue.closed were not documented. I documented them recently in Python 3.4 doc. -- nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18925 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18926] plistlib - str converted to bool
Ray added the comment: Disregard, I think. I'm not sure why, but my current app seems to be doing the converting. import plistlib pl = {'My key': 'False'} plist = plistlib.writePlistToString(pl) plist '?xml version=1.0 encoding=UTF-8?\n!DOCTYPE plist PUBLIC -//Apple//DTD PLIST 1.0//EN http://www.apple.com/DTDs/PropertyList-1.0.dtd;\nplist version=1.0\ndict\n\tkeyMy key/key\n\tstringFalse/string\n/dict\n/plist\n' plistlib.readPlistFromString(plist) {'My key': 'False'} pl = {'My key': False} plist = plistlib.writePlistToString(pl) plist '?xml version=1.0 encoding=UTF-8?\n!DOCTYPE plist PUBLIC -//Apple//DTD PLIST 1.0//EN http://www.apple.com/DTDs/PropertyList-1.0.dtd;\nplist version=1.0\ndict\n\tkeyMy key/key\n\tfalse/\n/dict\n/plist\n' plistlib.readPlistFromString(plist) {'My key': False} -- resolution: - invalid status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18926 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18808] Thread.join returns before PyThreadState is destroyed
Tim Peters added the comment: Oops! The docs are wrong - a negative timeout actually raises: ValueError: timeout value must be strictly positive unless the timeout is exactly -1. All the more reason to ensure that a negative waittime isn't passed. I opened a different issue about the doc glitch. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18808 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18926] plistlib - str converted to bool
New submission from Raymond Piller: A plist with: keyMy key/key stringFalse/string will parse to a dict as: {'My key': False} Expected: {'My key': 'False'} If bool(False) is needed, the plist should say: keyMy key/key false/ -- messages: 196959 nosy: VertigoRay priority: normal severity: normal status: open title: plistlib - str converted to bool versions: Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18926 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18909] Segfaults on win-amd64 due to corrupt pointer to Tkapp_Interp
Roundup Robot added the comment: New changeset f01e06d26b41 by Victor Stinner in branch '3.3': Issue #18909: Fix _tkinter.tkapp.interpaddr() on Windows 64-bit, don't cast http://hg.python.org/cpython/rev/f01e06d26b41 New changeset ac27d979078a by Victor Stinner in branch 'default': (Merge 3.3) Issue #18909: Fix _tkinter.tkapp.interpaddr() on Windows 64-bit, http://hg.python.org/cpython/rev/ac27d979078a New changeset 1a65bb15dedf by Victor Stinner in branch '2.7': Issue #18909: Fix _tkinter.tkapp.interpaddr() on Windows 64-bit, don't cast http://hg.python.org/cpython/rev/1a65bb15dedf -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18909 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18909] Segfaults on win-amd64 due to corrupt pointer to Tkapp_Interp
STINNER Victor added the comment: New changeset 1a65bb15dedf by Victor Stinner in branch '2.7': Issue #18909: Fix _tkinter.tkapp.interpaddr() on Windows 64-bit, don't cast http://hg.python.org/cpython/rev/1a65bb15dedf I prefer to use a function taking a void* instead of hoping that Py_ssize_t has exactly the same size than void*. Ok, the type may change, but who cares? Do you really rely on the exact type of a private function (_tkinter.tkapp.interpaddr())? :-) @Christoph: Thanks for the report! Can you please your usecase on Python 2.7, 3.3 and/or 3.4 on Windows 64 bit? -- nosy: +haypo resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18909 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18909] Segfaults on win-amd64 due to corrupt pointer to Tkapp_Interp
Christoph Gohlke added the comment: @haypo: Thanks for fixing this so fast! Your changes work for me on win-amd64-py2.7 and py3.3. I am aware of two 3rd party C extensions that use the value of interpaddr(): https://github.com/python-imaging/Pillow/blob/master/_imagingtk.c#L40 https://github.com/matplotlib/matplotlib/blob/master/src/_tkagg.cpp#L233 Both parse the PyObject returned by interpaddr() into a Py_ssize_t variable using `PyArg_ParseTuple(PyObject*, n, Py_ssize_t)` and then cast the Py_ssize_t variable to a (TkappObject*). Can a PyLong with a value 3**31 be parsed into a Py_ssize_t on 32 bit platforms? Could this become a problem on systems where 32 bit processes can address more than 2 GB? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18909 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18928] Remove misleading documentation for random.shuffle
New submission from David Benbennick: Since Python 2.1 [1], when random.shuffle was added, the documentation has said: Note that for even rather small len(x), the total number of permutations of x is larger than the period of most random number generators; this implies that most permutations of a long sequence can never be generated. This comment is incorrect and misleading. In fact, I claim that shuffle can produce all permutations for any representable sequence. To shuffle a sequence of length N requires log(N!) ~ N * log(N/e) bits of randomness [2]. The random module provides a generator with a period of 2**19937-1, meaning you can get 2**19937 bits of randomness out of it before it starts repeating. All of which is to say that any representable sequence, say N 2**50, will need no more than 2**60 bits of randomness to shuffle. That is well within the period of the random number generator. Attached is a patch that deletes the comment. An illustration of this misconception is at [3]. 1: http://docs.python.org/release/2.1/lib/module-random.html 2: https://en.wikipedia.org/wiki/Factorial#Rate_of_growth_and_approximations_for_large_n 3: http://stackoverflow.com/questions/3062741/maximal-length-of-list-to-shuffle-with-python-random-shuffle -- assignee: docs@python components: Documentation files: mywork.patch keywords: patch messages: 196971 nosy: dbenbenn, docs@python priority: normal severity: normal status: open title: Remove misleading documentation for random.shuffle Added file: http://bugs.python.org/file31593/mywork.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18928 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com