[issue13599] Compiled regexes don't show all attributes in dir()
New submission from Martin Häcker spamfaen...@gmx.de: When looking at a regex with dir() you don't get all available attributes - which is inconvenient as some very important ones (like .pattern) are not visible. To demonstrate: import re re.compile('foo').pattern 'foo' dir(re.compile('foo')) ['__copy__', '__deepcopy__', 'findall', 'finditer', 'match', 'scanner', 'search', 'split', 'sub', 'subn'] -- components: Regular Expressions messages: 149428 nosy: dwt, ezio.melotti priority: normal severity: normal status: open title: Compiled regexes don't show all attributes in dir() versions: Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13599 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4625] IDLE won't open anymore, .idlerc unaccessible
Ned Deily n...@acm.org added the comment: A couple of comments on the patch: 1. Displaying a popup is fine but it gets annoying when it does it repeatedly. Since this is really a non-fatal error as the user can continue, it would be better to only display the popup once. 2. Another file in .idlerc, breakpoints.lst, has the same problem. Here are updated patches that address these issues. -- nosy: +ned.deily stage: test needed - patch review Added file: http://bugs.python.org/file23953/issue4625_rev1.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4625 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4625] IDLE won't open anymore, .idlerc unaccessible
Changes by Ned Deily n...@acm.org: Added file: http://bugs.python.org/file23954/issue4625_rev1_27.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4625 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9404] IDLE won't launch on XP
Ned Deily n...@acm.org added the comment: As there are proposed patches in Issue4625 that address the original problem reported here, let's move the discussion there. -- nosy: +ned.deily resolution: - duplicate stage: - committed/rejected status: open - closed superseder: - IDLE won't open anymore, .idlerc unaccessible versions: +Python 2.7, Python 3.2, Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9404 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13600] rot_13 codec not working
New submission from Ram Rachum r...@rachum.com: The `rot_13` codec is supposed to work like this, no? 'qwerty'.encode('utf-8') b'qwerty' 'qwerty'.encode('rot_13') Traceback (most recent call last): File pyshell#1, line 1, in module 'qwerty'.encode('rot_13') TypeError: encoder did not return a bytes object (type=str) b'qwerty'.decode('utf-8') 'qwerty' b'qwerty'.decode('rot_13') Traceback (most recent call last): File pyshell#2, line 1, in module b'qwerty'.decode('rot_13') File C:\Python32\lib\encodings\rot_13.py, line 19, in decode return (input.translate(rot13_map), len(input)) AttributeError: 'memoryview' object has no attribute 'translate' -- components: Library (Lib) messages: 149431 nosy: cool-RR priority: normal severity: normal status: open title: rot_13 codec not working versions: Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13600 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13598] string.Formatter doesn't support empty curly braces {}
maniram maniram maniandra...@gmail.com added the comment: Attached is a patch for test.test_string to test for this bug. Can somebody please comment on my paches or commit my patches. -- Added file: http://bugs.python.org/file23955/test_string.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13598 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13599] Compiled regexes don't show all attributes in dir()
Ezio Melotti ezio.melo...@gmail.com added the comment: This seems already fixed in 2.7.2+/3.2/3.3, what version have you tried? -- resolution: - out of date status: open - pending type: - enhancement ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13599 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13600] rot_13 codec not working
Ezio Melotti ezio.melo...@gmail.com added the comment: See #7475. -- nosy: +ezio.melotti ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13600 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13571] Backup files support in IDLE
maniram maniram maniandra...@gmail.com added the comment: In response to Roger Serwy: I rarely have IDLE crash on Linux. If you're experiencing these issues on Windows, see #13582. I'm on Ubuntu Linux and IDLE does'nt crash. Many editors have backup files in the case of a crash and after a crash have an option to copy the backup file to the original. Also if IDLE has a bug it can crash. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13571 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13498] os.makedirs exist_ok documentation is incorrect, as is some of the behavior
Changes by Laurent Mazuel laurent.maz...@gmail.com: -- nosy: +Laurent.Mazuel ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13498 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13600] rot_13 codec not working
Petri Lehtinen pe...@digip.org added the comment: Ram Rachum wrote: The `rot_13` codec is supposed to work like this, no? No it isn't. In Python 3, str.encode() always encodes to bytes and bytes.decode() always decodes to str. IOW, str.encode() encodes text (Unicode) to data (bytes), and bytes.decode() decodes data to text. ROT-13 is not a character encoding, so it cannot be used in this manner. It's still available in the codecs module, though: import codecs codecs.lookup('rot-13').encode('qwerty') ('djregl', 6) Other text-text and bytes-bytes codecs are also available there. -- nosy: +petri.lehtinen resolution: - invalid stage: - committed/rejected status: open - closed type: - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13600 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13600] rot_13 codec not working
Ram Rachum r...@rachum.com added the comment: Then I suggest replacing this error message: encoder did not return a bytes object (type=str) and this one: 'memoryview' object has no attribute 'translate' With something like: Please use `codecs.lookup('rot-13').encode` -- assignee: - docs@python components: +Documentation -Library (Lib) nosy: +docs@python resolution: invalid - status: closed - open ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13600 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13600] rot_13 codec not working
Petri Lehtinen pe...@digip.org added the comment: Issue #7475 discusses fixing the error messages, too. -- components: +Library (Lib) resolution: - duplicate stage: committed/rejected - status: open - closed superseder: - codecs missing: base64 bz2 hex zlib hex_codec ... ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13600 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7475] codecs missing: base64 bz2 hex zlib hex_codec ...
Petri Lehtinen pe...@digip.org added the comment: Issue 13600 has been marked as a duplicate of this issue. FRT, +1 to the idea of adding encoded_format and decoded_format attributes to CodecInfo, and also to adding {str,bytes}.{transform,untransform} back. -- nosy: +petri.lehtinen ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7475 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13359] urllib2 doesn't escape spaces in http requests
Changes by Sandro Tosi sandro.t...@gmail.com: -- nosy: +sandro.tosi ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13359 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13599] Compiled regexes don't show all attributes in dir()
Martin Häcker spamfaen...@gmx.de added the comment: Indeed, I'm on version % python --version Python 2.7.1 Sorry. -- status: pending - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13599 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13359] urllib2 doesn't escape spaces in http requests
maniram maniram maniandra...@gmail.com added the comment: Seems good. -- nosy: +maniram.maniram ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13359 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8684] improvements to sched.py
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset f5aed0dba844 by Giampaolo Rodola' in branch 'default': Fix #8684: make sched.scheduler class thread-safe http://hg.python.org/cpython/rev/f5aed0dba844 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8684 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8684] improvements to sched.py
Changes by Giampaolo Rodola' g.rod...@gmail.com: -- resolution: - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8684 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13449] sched - provide an async argument for run() method
Giampaolo Rodola' g.rod...@gmail.com added the comment: What about run(nowait=...) or run(only_ready=...)? Doing this as a separate method seems unnecessarily complicated to me in terms of implementation (move run logic into _run, add run and run_nowait, etc...). Most importantly, the user will have to remember two methods which are basically equivalent in terms of what they actually do. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13449 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13449] sched - provide an async argument for run() method
Antoine Pitrou pit...@free.fr added the comment: That's a good point. Then perhaps call the flag wait or blocking, since it avoids false positives and is more explicit than async? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13449 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13449] sched - provide an async argument for run() method
Giampaolo Rodola' g.rod...@gmail.com added the comment: blocking seems the most explicit to me. With this, we can also fix issue1641 by providing a specific section into asyncore doc which explains how to use asyncore in conjunction with sched. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13449 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13597] Improve documentation of stdout/stderr buffering in Python 3.x
Antoine Pitrou pit...@free.fr added the comment: I'm surprised to hear that stderr is line buffered by default. Historically stderr is never buffered (at least on POSIX) and for good reason: errors should be seen immediately Was this an oversight in migrating stdin/out/err to the new io module? Until recently it wasn't possible to have an unbuffered text stream with the new io stack. Now it's possible in write-only mode, although the open() builtin hasn't been updated for it. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13597 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13601] sys.stderr should be unbuffered (or always line-buffered)
New submission from Antoine Pitrou pit...@free.fr: In issue13597, Philip Jenvey points out: “I'm surprised to hear that stderr is line buffered by default. Historically stderr is never buffered (at least on POSIX) and for good reason: errors should be seen immediately” Recent changes to the IO stack should allow stderr to be opened in fully unbuffered mode (and open(..., 'w', buffering=0) can be allowed too). Or at least it could be always line-buffered, even when redirected to a file. -- components: IO, Interpreter Core, Library (Lib) messages: 149447 nosy: benjamin.peterson, gvanrossum, pitrou, pjenvey, stutzbach priority: normal severity: normal stage: needs patch status: open title: sys.stderr should be unbuffered (or always line-buffered) type: behavior versions: Python 3.2, Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13601 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13599] Compiled regexes don't show all attributes in dir()
Changes by Ezio Melotti ezio.melo...@gmail.com: -- stage: - committed/rejected ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13599 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13449] sched - provide an async argument for run() method
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 2975618965c0 by Giampaolo Rodola' in branch 'default': Fix #13449: add 'blocking' parameter to sched.scheduler.run() so that the scheduler can be used in non-blocking applications http://hg.python.org/cpython/rev/2975618965c0 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13449 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1641] asyncore delayed calls feature
Giampaolo Rodola' g.rod...@gmail.com added the comment: With issue13449 fixed I think we can now provide this functionnality by adding a specific section into asyncore doc which explains how to use asyncore in conjunction with sched module. As such, asyncore.py itself won't need any change. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1641 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13449] sched - provide an async argument for run() method
Changes by Giampaolo Rodola' g.rod...@gmail.com: -- assignee: - giampaolo.rodola resolution: - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13449 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13449] sched - provide an async argument for run() method
Changes by Giampaolo Rodola' g.rod...@gmail.com: -- nosy: +josiah.carlson, josiahcarlson ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13449 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13540] Document the Action API in argparse
Jason R. Coombs jar...@jaraco.com added the comment: Most of the Action subclasses in argparse override __init__ and they raise ValueErrors when the parameters aren't as expected for that argument. This was my reason for adding that comment. If the basic Actions require this level of validation, wouldn't a custom action also want to supply this type of behavior? I'm sure I've overridden Action.__init__ in some of the subclasses I've created, but I don't remember specifically why. I agree freezing the __init__ signature is undesirable. It would be preferable if the API called a hook for validating the argument parameters against the action. My intention, however, was to document the existing behavior, not influence changes in the behavior. Perhaps the recommended API really isn't to subclass Action, but to supply a callable that takes the __init__ args which validates the parameters and returns a callable which takes the __call__ args which should set attributes on the namespace. Perhaps the Action class is only one such implementation of the API. Indeed, that was my understanding of the API as it is currently documented before Terry suggested otherwise. What do you think about instead of documenting the Action class, we formalize the API, similar to how I described it in the previous paragraph, and then suggest that an Action subclass with an overridden __call__ is the most direct way to implement the Action API? In reviewing the code again, I note that not just most, but all of the Action subclasses override __init__. I also note that not all of them accept the same parameters. For example, the _StoreConstAction does not accept an nargs parameter. p = argparse.ArgumentParser() p.add_argument('--awesome-sauce', action=store_const, const=True, nargs=None) Traceback (most recent call last): File stdin, line 1, in module File c:\python\lib\argparse.py, line 1281, in add_argument action = action_class(**kwargs) TypeError: __init__() got an unexpected keyword argument 'nargs' So it seems that the Action API is slightly different than I described. The first callable should accept all of the parameters passed to add_argument _except_ for the action parameter itself. I think by indicating this in the API description, we avoid the problem of freezing any additional signature. I'll take another stab at updating the documentation with these findings. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13540 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1641] asyncore delayed calls feature
Antoine Pitrou pit...@free.fr added the comment: With issue13449 fixed I think we can now provide this functionnality by adding a specific section into asyncore doc which explains how to use asyncore in conjunction with sched module. How would it work? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1641 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1641] asyncore delayed calls feature
Giampaolo Rodola' g.rod...@gmail.com added the comment: Now that I think of it maybe some kind of wrapper would still be necessary. As of right now, we'd do something like this. At the core we would have: import asyncore, asynchat, sched # global scheduler = sched.scheduler() while 1: asyncore.loop(timeout=1.0, count=1) # count=1 makes loop() return after 1 loop scheduler.run(blocking=False) Then, every dispatcher can define a scheduled function of its own: class Client(asynchat.async_chat): # an already connected client # (the connector code is not included in this example) def __init__(self, *args, **kwargs): asynchat.async_chat.__init__(self, *args, **kwargs) self.set_terminator(\r\n) self.set_timeout() def set_timeout(self): self.timeout = scheduler.enter(30, 0, self.handle_timeout) def reset_timeout(self): scheduler.cancel(self.timeout) self.set_timeout() def found_terminator(self): scheduler.cancel(self.timeout) self.timeout = scheduler.enter(30, 0, self.handle_timeout) # do something with the received data... def handle_timeout(self): self.push(400 connection timed out\r\n) self.close() def close(self): scheduler.cancel(self.timeout) asynchat.async_chat.close(self) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1641 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1641] asyncore delayed calls feature
Antoine Pitrou pit...@free.fr added the comment: while 1: asyncore.loop(timeout=1.0, count=1) # count=1 makes loop() return after 1 loop scheduler.run(blocking=False) Isn't that both ugly and imprecise? The right way to do it is to set the timeout of the select() call according to the deadline of the next scheduled call in the scheduler. But you probably need to modify asyncore for that. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1641 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13601] sys.stderr should be unbuffered (or always line-buffered)
Guido van Rossum gu...@python.org added the comment: I *thought* I mimicked what C stdio did ~20 years ago... I'd be happy to follow what it does today if it changed or if I made a mistake. That said, IMO: Line-buffering should be good enough since in practice errors messages are always terminated by a newline. I'm hesitant to make it line-buffered by default when directed to a file, since this could significantly slow down a program that for some reason produces super-voluminous output (e.g. when running a program with heavy debug logging turned on). Maybe we need better command-line control to override the defaults? Are there precedents e.g. in Bash flags? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13601 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4625] IDLE won't open anymore, .idlerc unaccessible
Roger Serwy roger.se...@gmail.com added the comment: I just tested Ned's updated patches against 3.3a0 and 2.7 and they work as advertised. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4625 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1757072] Zipfile robustness
James C. Ahlstrom jahl...@gmail.com added the comment: For completeness, I checked other versions of Python. The example zip file fails in Python 3.1, but succeeds in Python 3.2.2. The patch for 3.2.2 removed the check for correct comment length, but substituted no further check for validity. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1757072 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13598] string.Formatter doesn't support empty curly braces {}
Changes by Benjamin Peterson benja...@python.org: -- assignee: - eric.smith nosy: +eric.smith ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13598 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13571] Backup files support in IDLE
Roger Serwy roger.se...@gmail.com added the comment: Would you want to collaborate on writing an extension to do this? Check out IdleX. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13571 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4625] IDLE won't open anymore, .idlerc unaccessible
Sophia K. Cheng sophia.ch...@gmail.com added the comment: Hi Ned, Thanks for the patch, I appreciate it. Sadly, I've since upgraded my laptop to Win 7, and don't seem to be having the problem anymore :-/ , so I can't verify. But thank you for writing a patch. Sincerely, Sophia On Wed, Dec 14, 2011 at 10:50 AM, Roger Serwy rep...@bugs.python.orgwrote: Roger Serwy roger.se...@gmail.com added the comment: I just tested Ned's updated patches against 3.3a0 and 2.7 and they work as advertised. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4625 ___ -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4625 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13532] In IDLE, sys.stdout.write and sys.stderr can write any pickleable object
Martin v. Löwis mar...@v.loewis.de added the comment: We should like the IDLE shell to give the same results as the standard shell. I disagree that this should be an absolute principle. Two standard shells may not give the same result due to running in different environments, so forcing IDLE to give the same result as a specific standard shell is not reasonable when taken absolutely. -- title: In IDLE, sys.stdout and sys.stderr can write any pickleable object - In IDLE, sys.stdout.write and sys.stderr can write any pickleable object ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13532 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4028] Problem compiling the multiprocessing module on sunos5
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 8c658b625475 by Charles-François Natali in branch '2.7': Issue #4028: Make multiprocessing build on SunOS. http://hg.python.org/cpython/rev/8c658b625475 New changeset 49e82c885d6b by Charles-François Natali in branch '3.2': Issue #4028: Make multiprocessing build on SunOS. http://hg.python.org/cpython/rev/49e82c885d6b New changeset 4a27b5ab2710 by Charles-François Natali in branch 'default': Null merge - Issue #4028: Make multiprocessing build on SunOS. http://hg.python.org/cpython/rev/4a27b5ab2710 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4028 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4028] Problem compiling the multiprocessing module on sunos5
Charles-François Natali neolo...@free.fr added the comment: Thanks Craig. -- resolution: - fixed stage: - committed/rejected status: open - closed versions: -Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4028 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13453] Tests and network timeouts
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset fbcaeb4a8654 by Charles-François Natali in branch '2.7': Issue #13453: Fix a race condition in test_poplib. http://hg.python.org/cpython/rev/fbcaeb4a8654 New changeset e497a3ed9beb by Charles-François Natali in branch '3.2': Issue #13453: Fix a race condition in test_poplib. http://hg.python.org/cpython/rev/e497a3ed9beb New changeset 1eae8154c109 by Charles-François Natali in branch 'default': Issue #13453: Fix a race condition in test_poplib. http://hg.python.org/cpython/rev/1eae8154c109 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13453 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11886] test_time.test_tzset() fails on x86 FreeBSD 7.2 3.x: AEST timezone called EST
Charles-François Natali neolo...@free.fr added the comment: Another failure on a 2.7 FreeBSD buildbot: test test_time failed -- Traceback (most recent call last): File /usr/home/db3l/buildarea/2.7.bolen-freebsd7/build/Lib/test/test_time.py, line 193, in test_tzset self.assertTrue(time.tzname[1] == 'AEDT', str(time.tzname[1])) AssertionError: EDT http://www.python.org/dev/buildbot/all/builders/x86 FreeBSD 7.2 2.7/builds/859/steps/test/logs/stdio -- nosy: +neologix ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11886 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13597] Improve documentation of stdout/stderr buffering in Python 3.x
Geoffrey Bache gjb1...@users.sourceforge.net added the comment: I would certainly be in favour of restoring the python 2.x behaviour, at least where standard error is concerned. When writing Python programs, it's important to see exceptions immediately, and not lose them entirely in some circumstances. I reported this as a documentation bug because I got the impression it was deliberate, mostly from reading http://bugs.python.org/issue4705 and the comp.lang.python thread in the description, but I personally think the Python 2.x behaviour was preferable. -- components: -IO nosy: -benjamin.peterson, pitrou, pjenvey, stutzbach versions: +Python 3.1, Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13597 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13597] Improve documentation of stdout/stderr buffering in Python 3.x
Geoffrey Bache gjb1...@users.sourceforge.net added the comment: Ooops, seems like I just ran into a bug in the bug tracker too, it seems to have backed out other people's changes. Restoring them... -- components: +IO nosy: +benjamin.peterson, pitrou, pjenvey, stutzbach versions: -Python 3.1, Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13597 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4832] idle filename extension
Roger Serwy roger.se...@gmail.com added the comment: I was unable to produce the crash that Pavel described in msg87703. Just adding defaultextension='' solves this issue for Windows and still preserves the correct behavior on Linux. Amaury's quote of tcl/tk documentation in msg87695 mentions this as well. I tested this on Linux with 2.7.1 and 3.2 and on Windows Vista using 2.7.1 and 3.2.2. Attached is a diff against 3.3a0. -- nosy: +serwy Added file: http://bugs.python.org/file23956/issue4832.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4832 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10365] IDLE Crashes on File Open Dialog when code window closed before other file opened
Roger Serwy roger.se...@gmail.com added the comment: William's explanation in msg123203 for the cause of the error and the solution for keeping a reference to flist is good. IDLE has only one instance of FileList while running anyways. Attached is a patch that behaves like William's description. The modification to PyShell.py is necessary for a corner-case. If the last IDLE window is closed with the Open File dialog still open, then FileList.py and WindowList.py both call .quit(). Without the modification, IDLE closes after selecting a file since root.mainloop() returns and root.destroy() gets executed. The alternative (and simpler) method is to have the Open File dialog be modal, but AFAIK it can't be set to modal. -- nosy: +serwy Added file: http://bugs.python.org/file23957/issue10365_rev2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10365 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13402] Document absoluteness of sys.executable
Petri Lehtinen pe...@digip.org added the comment: Attaching an updated patch. The documentation now says that sys.executable may be an empty string. The patch also adds a test to make sure that sys.executable is absolute. -- Added file: http://bugs.python.org/file23958/issue13402_v2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13402 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12082] Python/import.c still references fstat even with DONT_HAVE_FSTAT/!HAVE_FSTAT
Changes by Giampaolo Rodola' g.rod...@gmail.com: -- nosy: +giampaolo.rodola ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12082 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13516] Gzip old log files in rotating handlers
Raul Morales raul...@gmail.com added the comment: I have just posted a comment, too. http://plumberjack.blogspot.com/2011/12/improved-flexibility-for-log-file.html?showComment=1323891345946#c2875224484376643310 With this approach, anyone can implement support for any format easily. It is powerful. But IMHO, built-in support for Gzip and Zip formats would cover the basic needs of almost all platforms where python run. Mix-in classes can be implemented in just a few lines of code, and it matches with your idea. Of course, IMHO. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13516 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13532] In IDLE, sys.stdout.write and sys.stderr can write any pickleable object
Terry J. Reedy tjre...@udel.edu added the comment: In English, We should like is far from an absolute statement. IDLE must would be such. In any case, I hope you agree that crashing is bad. It is also not good if IDLE, as a development environment, enables code that violates the doc specifications and that will not run in the standard interpreter in standard batch mode with no shell. I also so not understand you reverting the title to the arguably incorrect non-parallel construction. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13532 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13602] format string '%b' doesn't work as expected
New submission from James Classen jclas...@gmail.com: I notice that, in versions 2.7 and 3.2 on Windows XP (haven't tested any other versions or platforms), the following statements in the interpreter work as documented: '%x' % 17 '%o' % 17 and output '11' and '21' respectively, as I expect. However, '%b' % 17 throws ValueError: unsupported format character 'b' (0x62) at index 1 instead of returning '10001'. -- components: None messages: 149471 nosy: James.Classen priority: normal severity: normal status: open title: format string '%b' doesn't work as expected type: behavior versions: Python 2.7, Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13602 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13602] format string '%b' doesn't work as expected
James Classen jclas...@gmail.com added the comment: I didn't see section 4.6.2 of the library for 3.2 documentation, only section 5.6.2 of the 2.7 docs. So this is an invalid issue. -- resolution: - invalid status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13602 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11574] TextIOWrapper: Unicode Fallback Encoding on Python 3.3
Carl Meyer c...@dirtcircle.com added the comment: Here's an example real-world case where the only solution I could find was to simply avoid non-ASCII characters entirely (which is obviously not a real solution): https://github.com/pypa/virtualenv/issues/201#issuecomment-3145690 distutils/distribute require long_description to be a string, not bytes (so it can rfc822-escape it, and use string methods to do so), but does not explicitly set an output encoding when it writes egg-info. This means that a developer either has the choice to a) break installation of their package on any system with an ASCII default locale, or b) not use any non-ASCII characters in long_description. One might say, ok, this is a bug in distutils/distribute, it should explicitly specify UTF-8 encoding when writing egg-info. But if this is a sensible thing for distutils/distribute to do, regardless of user locale, why would it not be equally sensible for Python itself to have the default output encoding always be UTF-8 (with the ability for a developer who wants to support arbitrary user locale to explicitly do so)? -- nosy: +carljm ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11574 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13516] Gzip old log files in rotating handlers
Vinay Sajip vinay_sa...@yahoo.co.uk added the comment: It seems that you agree that the basic mechanism is good enough to build on, so I'd rather leave the proposed stdlib change as is, but provide examples of how to achieve gzip/zip compression for rotated logs in the Logging Cookbook. The reason I don't want to add these in the stdlib is that I have to support anything I add indefinitely, so I don't want to add anything which will not be often used. This is the first time the issue has come up in all the years since the rotating file handlers have been around, so while I want to support your use case, I want to minimise stdlib changes and additions as much as I can. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13516 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13532] In IDLE, sys.stdout.write and sys.stderr can write any pickleable object
Martin v. Löwis mar...@v.loewis.de added the comment: I also so not understand you reverting the title to the arguably incorrect non-parallel construction. That is an (unfortunate) side effect of replying by email. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13532 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11574] TextIOWrapper: Unicode Fallback Encoding on Python 3.3
Martin v. Löwis mar...@v.loewis.de added the comment: One might say, ok, this is a bug in distutils/distribute, it should explicitly specify UTF-8 encoding when writing egg-info. But if this is a sensible thing for distutils/distribute to do, regardless of user locale, why would it not be equally sensible for Python itself to have the default output encoding always be UTF-8 (with the ability for a developer who wants to support arbitrary user locale to explicitly do so)? The file encoding is part of the file format. Just as Python can't know what the file format is (else it could allow writing, say, dictionaries to a file), it can't know what the file encoding is, either - there is a need to guess. distutils *does* know the format, so it's clearly a bug in distutils and not in Python. The Zen says In the face of ambiguity, refuse the temptation to guess. From that point of view, Python should just refuse to open files in text mode with no encoding specified. However, it also says Although practicality beats purity., which brings us back to guessing. Guessing the best file encoding is really tricky, and Python has chosen to use the locale's encoding. That can't be changed anymore (except perhaps by PEP) since it would be an incompatible change. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11574 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7652] Merge C version of decimal into py3k.
Changes by Stefan Krah stefan-use...@bytereef.org: Added file: http://bugs.python.org/file23959/be8a59fcba49.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7652 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13597] Improve documentation of stdout/stderr buffering in Python 3.x
Antoine Pitrou pit...@free.fr added the comment: (I've opened issue13601 for the possible behaviour change) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13597 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13593] importlib needs to be updated for __qualname__
Brett Cannon br...@python.org added the comment: Seems fine to me, and if Antoine says it's doing the right thing then I'm cool with the patch. -- assignee: - meador.inge ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13593 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13588] Change name of internal closure functions in importlib
Brett Cannon br...@python.org added the comment: Thanks for the patch! I will try to find some time to do a proper review if someone else doesn't beat me to it (although first glance seems to suggest it all looks fine). -- stage: needs patch - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13588 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13591] import_module potentially imports a module twice
Brett Cannon br...@python.org added the comment: Patch looks good to me. -- assignee: - meador.inge stage: patch review - commit review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13591 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13582] IDLE and pythonw.exe stderr problem
Roger Serwy roger.se...@gmail.com added the comment: I don't have a Mac to test against. Is there anything I need to do to improve the patch? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13582 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13516] Gzip old log files in rotating handlers
Raul Morales raul...@gmail.com added the comment: Ok, it is reasonable. It has no sense add support for compression since I am the only user who want it. Maybe in the future ;) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13516 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13402] Document absoluteness of sys.executable
Philip Jenvey pjen...@underboss.org added the comment: sys.executable can be None on Jython (and I believe IronPython) when ran in an 'embedded' mode -- nosy: +dino.viehland, pjenvey ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13402 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4625] IDLE won't open anymore, .idlerc unaccessible
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 7857d1f4ce79 by Ned Deily in branch '2.7': Issue #4625: If IDLE cannot write to its recent file or breakpoint http://hg.python.org/cpython/rev/7857d1f4ce79 New changeset 26e3e542d20d by Ned Deily in branch '3.2': Issue #4625: If IDLE cannot write to its recent file or breakpoint http://hg.python.org/cpython/rev/26e3e542d20d New changeset ba832d42cd9e by Ned Deily in branch 'default': Issue #4625: If IDLE cannot write to its recent file or breakpoint http://hg.python.org/cpython/rev/ba832d42cd9e New changeset f6ca22bbf138 by Ned Deily in branch '2.7': Issue #4625: add NEWS entry. http://hg.python.org/cpython/rev/f6ca22bbf138 New changeset f1fe411bfd6b by Ned Deily in branch '3.2': Issue #4625: add NEWS entry. http://hg.python.org/cpython/rev/f1fe411bfd6b New changeset f6510cdf4ada by Ned Deily in branch 'default': Issue #4625: Add NEWS entry. http://hg.python.org/cpython/rev/f6510cdf4ada -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4625 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4625] IDLE won't open anymore, .idlerc unaccessible
Ned Deily n...@acm.org added the comment: Applied to 2.7 (for release in 2.7.3), 3.2 (3.2.3), and default (3.3). -- assignee: - ned.deily resolution: - fixed stage: patch review - committed/rejected status: open - closed versions: +Python 2.7, Python 3.2, Python 3.3 -Python 2.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4625 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12149] Segfault in _PyObject_GenericGetAttrWithDict
Mark Shannon ma...@dcs.gla.ac.uk added the comment: Please reopen this bug as the fix is wrong. This fix merely hides the symptoms of _PyType_Lookup returning a dead object, by calling PyType_Modified() frequently, thus ensuring the type method cache is almost always invalidated. This results in a significant slow down in pystones (~4%) due to a large slowdown (~60%) in _PyType_Lookup. I don't know what the root cause is, but it could be: A failure to call PyType_Modified() at the correct point (probably somewhere in iobase.c) or it could be: Deallocation not conforming to topographical ordering (ie. instance first then class), due to a cycle involving a borrowed reference. (Or it could be something else) -- nosy: +Mark.Shannon ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12149 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2134] Add new attribute to TokenInfo to report specific token IDs
Nick Coghlan ncogh...@gmail.com added the comment: There are a *lot* of characters with semantic significance that are reported by the tokenize module as generic OP tokens: token.LPAR token.RPAR token.LSQB token.RSQB token.COLON token.COMMA token.SEMI token.PLUS token.MINUS token.STAR token.SLASH token.VBAR token.AMPER token.LESS token.GREATER token.EQUAL token.DOT token.PERCENT token.BACKQUOTE token.LBRACE token.RBRACE token.EQEQUAL token.NOTEQUAL token.LESSEQUAL token.GREATEREQUAL token.TILDE token.CIRCUMFLEX token.LEFTSHIFT token.RIGHTSHIFT token.DOUBLESTAR token.PLUSEQUAL token.MINEQUAL token.STAREQUAL token.SLASHEQUAL token.PERCENTEQUAL token.AMPEREQUAL token.VBAREQUAL token.CIRCUMFLEXEQUAL token.LEFTSHIFTEQUAL token.RIGHTSHIFTEQUAL token.DOUBLESTAREQUAL¶ token.DOUBLESLASH token.DOUBLESLASHEQUAL token.AT However, I can't fault tokenize for deciding to treat all of those tokens the same way - for many source code manipulation purposes, these just need to be transcribed literally, and the OP token serves that purpose just fine. As the extensive test updates in the current patch suggest, AMK is also correct that changing this away from always returning OP tokens (even for characters with more specialised tokens available) would be a backwards incompatible change. I think there are two parts to this problem, one documentation related (affecting 2.7, 3.2, 3.3) and another that would be an actual change in 3.3: 1. First, I think 3.3 should add an exact_type attribute to TokenInfo instances (without making it part of the tuple-based API). For most tokens, this would be the same as type, but for OP tokens, it would provide the appropriate more specific token ID. 2. Second, the tokenize module documentation should state *explicitly* which tokens it collapses down into the generic OP token, and explain how to use the string attribute to recover the more detailed information. -- assignee: - docs@python components: +Documentation nosy: +docs@python, ncoghlan stage: - needs patch title: function generate_tokens at tokenize.py yields wrong token for colon - Add new attribute to TokenInfo to report specific token IDs versions: +Python 2.7, Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2134 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13551] pulldom doesn't populate DOM tree
Achim Gaedke achim.gae...@physik.tu-darmstadt.de added the comment: Potentially both: The xml.dom.pulldom documentation is not really there. Maybe the PullDOM builds a partial tree, not caring about nested nodes. In contrast to SAX2DOM, which seems to fill the DOM tree completely. I tried to figure out, what the programmer intended to do: Obviously SAX2DOM extends the behaviour of PullDOM. The documentation (online V3.2, retrieved today) does state: PullDOM allows building only selected portions of a Document Object Model representation Does that mean, one would derive a customized class from PullDOM, implement methods like SAX2DOM, but control the construction with conditions? For example: class MyDOM(PullDOM): def startElement(self, name, attrs): PullDOM.startElement(self, name, attrs) if name[:3]==my_: curNode = self.elementStack[-1] parentNode = self.elementStack[-2] parentNode.appendChild(curNode) When someone says YEAH, MATE, ABSOLUTELY, YOU GOT IT!, I might be able fill some of the documentation gaps. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13551 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2134] Add new attribute to TokenInfo to report specific token IDs
Terry J. Reedy tjre...@udel.edu added the comment: I believe that that list includes all symbols and symbol combinations that are syntactically significant in expressions. This is the generalized meaning of 'operator' that is being used. What do not appear are '#' which marks comments, '_' which is a name char, and '\' which escapes chars within strings. Other symbols within strings will also not be marked as OP tokens. The non-syntactic symbols '$' and '?' are also omitted. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2134 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13532] In IDLE, sys.stdout.write and sys.stderr can write any pickleable object
maniram maniram maniandra...@gmail.com added the comment: One reason to fix this bug: People may develop code that calls sys.std{out,err}.write with the number 200. like sys.stdout.write(200) In IDLE the code works well but in Python from the command-line it fails to run. Creating a bug in the code. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13532 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2134] Add new attribute to TokenInfo to report specific token IDs
Nick Coghlan ncogh...@gmail.com added the comment: Sure, but what does that have to do with anything? tokenize isn't a general purpose tokenizer, it's specifically for tokenizing Python source code. The *problem* is that it doesn't currently fully tokenize everything, but doesn't explicitly say that in the module documentation. Hence my proposed two-fold fix: document the current behaviour explicitly and also add a separate exact_type attribute for easy access to the detailed tokenization without doing your own string comparisons. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2134 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13603] Add prime-related functions to Python
New submission from maniram maniram maniandra...@gmail.com: It would be nice to have prime-related and number theory functions in a new module or some existing module (like math). like this: import prime prime.isprime(7) True prime.isprime(35) False prime.primerange(10,18) (11,13,17) prime.isperfect(6) #Is 6 a perfect number (http://en.wikipedia.org/wiki/Perfect_number) True prime.factorize(60) {2:2,3:1,5:1} #2**2 * 3**1 * 5**1 -- components: Library (Lib) messages: 149492 nosy: maniram.maniram priority: normal severity: normal status: open title: Add prime-related functions to Python type: enhancement versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13603 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13603] Add prime-related and number theory functions to Python
Changes by maniram maniram maniandra...@gmail.com: -- title: Add prime-related functions to Python - Add prime-related and number theory functions to Python ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13603 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12923] test_urllib fails in refleak mode
Meador Inge mead...@gmail.com added the comment: I just noticed this problem as well. I don't know the code well enough to determine if Brian's patch is the right thing to do. The documentation claims that maxtries is used to put a limit on recursion: http://docs.python.org/dev/library/urllib.request.html#urllib.request.FancyURLopener. The way the code is written it is limiting recursion, but the recursion count is *not* being reset when an exception is thrown from 'redirect_internal'. I see why this is a problem with our test code. 'Lib/test/test_urllib.py' has the following helper function: _urlopener = None def urlopen(url, data=None, proxies=None): urlopen(url [, data]) - open file-like object global _urlopener if proxies is not None: opener = urllib.request.FancyURLopener(proxies=proxies) elif not _urlopener: opener = urllib.request.FancyURLopener() _urlopener = opener else: opener = _urlopener if data is None: return opener.open(url) else: return opener.open(url, data) Notice that the 'FancyURLopener' instance is cached in a global variable. The fact that the same instance is used from run to run causes max tries to be overrun. If resetting maxtries on the exception path isn't safe, then we can just remove the caching from the tests. The more I think about it, the more Brian's patch seem correct, though. Senthil, can you chime in? -- nosy: +meador.inge stage: - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12923 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13571] Backup files support in IDLE
maniram maniram maniandra...@gmail.com added the comment: I would be happy to help :) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13571 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13603] Add prime-related and number theory functions to Python
Benjamin Peterson benja...@python.org added the comment: -1 in general. I think that's too domain specific to belong in stdlib. -- nosy: +benjamin.peterson ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13603 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13603] Add prime-related and number theory functions to Python
Meador Inge mead...@gmail.com added the comment: I agree with Benjamin about this being too domain specific for stdlib. Also, I don't really see a good argument as to why this functionality is useful. -1 from me too. -- nosy: +meador.inge ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13603 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13604] update PEP 393 (match implementation)
New submission from Jim Jewett jimjjew...@gmail.com: The implementation has a larger state.kind Clarified wording on wstr_length and surrogate pairs. Clarified that the canonical data format doesn't always have a data pointer. Mentioned that calling PyUnicode_READY would finalize a string, so that it couldn't be resized. Changed section head Other macros to Finalization macro and removed the non-existent PyUnicode_CONVERT_BYTES (there is a similarly named private macro). -- files: pep-0393.txt.patch keywords: patch messages: 149497 nosy: Jim.Jewett priority: normal severity: normal status: open title: update PEP 393 (match implementation) Added file: http://bugs.python.org/file23960/pep-0393.txt.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13604 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13604] update PEP 393 (match implementation)
Changes by Jim Jewett jimjjew...@gmail.com: -- assignee: - docs@python components: +Documentation nosy: +docs@python versions: +Python 3.3 Added file: http://bugs.python.org/file23961/pep-0393.txt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13604 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13591] import_module potentially imports a module twice
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset d2504d30f259 by Meador Inge in branch '3.2': Issue #13591: import_module potentially imports a module twice. http://hg.python.org/cpython/rev/d2504d30f259 New changeset e8fb61a0a2d7 by Meador Inge in branch 'default': Issue #13591: import_module potentially imports a module twice. http://hg.python.org/cpython/rev/e8fb61a0a2d7 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13591 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13591] import_module potentially imports a module twice
Meador Inge mead...@gmail.com added the comment: Thanks for the review Brett. Fix committed. -- resolution: - fixed stage: commit review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13591 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13591] import_module potentially imports a module twice
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 541f215a31f7 by Meador Inge in branch '3.2': Issue #13591: Moving the NEWS line to the right release. http://hg.python.org/cpython/rev/541f215a31f7 New changeset 92e94fd303d4 by Meador Inge in branch 'default': Issue #13591: Moving the NEWS line to the right release. http://hg.python.org/cpython/rev/92e94fd303d4 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13591 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13593] importlib needs to be updated for __qualname__
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 54a77c556d9a by Meador Inge in branch 'default': Issue #13593: updating the importlib utility decorators for __qualname__. http://hg.python.org/cpython/rev/54a77c556d9a -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13593 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13593] importlib needs to be updated for __qualname__
Meador Inge mead...@gmail.com added the comment: Fix committed. Thanks for the review Antoine and Brett. -- resolution: - fixed stage: commit review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13593 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13603] Add prime-related and number theory functions to Python
maniram maniram maniandra...@gmail.com added the comment: I think math.sin is also domain-specific. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13603 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13603] Add prime-related and number theory functions to Python
Benjamin Peterson benja...@python.org added the comment: Hardly, being a widely applicable mathematical function. Also, it's in a C math library which is what Python's is originally based on. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13603 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13603] Add prime-related and number theory functions to Python
Meador Inge mead...@gmail.com added the comment: On Wed, Dec 14, 2011 at 10:58 PM, Benjamin Peterson rep...@bugs.python.org wrote: Hardly, being a widely applicable mathematical function. I was just typing a similar response. Also, it's in a C math library which is what Python's is originally based on. Not just *a* C math library. *The* Standard C library! :-) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13603 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13603] Add prime-related and number theory functions to Python
Benjamin Peterson benja...@python.org added the comment: 2011/12/15 Meador Inge rep...@bugs.python.org: Not just *a* C math library. *The* Standard C library! :-) Quite! -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13603 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2134] Add new attribute to TokenInfo to report specific token IDs
Terry J. Reedy tjre...@udel.edu added the comment: If you are responding to me, I am baffled. I gave a concise way to document the current behavior with respect to .OP, which you said you wanted. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2134 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13097] ctypes: segfault with large number of callback arguments
Meador Inge mead...@gmail.com added the comment: On Thu, Dec 1, 2011 at 2:11 AM, STINNER Victor rep...@bugs.python.org wrote: Is there really an use case where you need 2 ** 20 (1,048,576) arguments? If yes, I'm not against the torture in this case :-) Not very likely :-) However, the segfault can occur with less arguments in low stack space situations (e.g. deep callstack). If no, why not raising an error if there are too many arguments? E.g. limit to 1,024 arguments or maybe just 10? That is certainly an option. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13097 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13603] Add prime-related and number theory functions to Python
maniram maniram maniandra...@gmail.com added the comment: Anybody else than Benjamin and Meador please comment on this. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13603 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2134] Add new attribute to TokenInfo to report specific token IDs
Nick Coghlan ncogh...@gmail.com added the comment: Ah, I didn't read it as suggested documentation at all - you moved seamlessly from personal commentary to a docs suggestion without separating the two, so it appeared to be a complete non sequitur to me. As for the docs suggestion, I think it works as the explanation of which tokens are affected once the concept of the token stream simplification is introduced: = To simplify token stream handling, all literal tokens (':', '{', etc) are returned using the generic 'OP' token type. This allows them to be simply handled using common code paths (e.g. for literal transcription directly from input to output). Specific tokens can be distinguished by checking the string attribute of OP tokens for a match with the expected character sequence. The affected tokens are all symbols and symbol combinations that are syntactically significant in expressions (as listed in the token module). Anything which is not an independent token (i.e. '#' which marks comments, '_' which is just part of a name, '\' which is used for line continuations, the contents of string literals and any symbols which are not a defined part of Python's syntax) is completely unaffected by this difference in behaviour. === If exact_type is introduced in 3.3, then the first paragraph can be adjusted accordingly. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2134 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13402] Document absoluteness of sys.executable
Petri Lehtinen pe...@digip.org added the comment: sys.executable can be None on Jython (and I believe IronPython) when ran in an 'embedded' mode In CPython, embedding doesn't change the behavior. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13402 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13603] Add prime-related and number theory functions to Python
Antoine Pitrou pit...@free.fr added the comment: Anybody else than Benjamin and Meador please comment on this. I don't know why we would want to maintain this in the stdlib. We would also need a dedicated maintainer so that efficient algorithms are chosen and implemented. Such functions are available in PyCrypto by the way: https://www.dlitz.net/software/pycrypto/doc/#crypto-util-number -- nosy: +mark.dickinson, pitrou versions: -Python 2.6, Python 2.7, Python 3.1, Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13603 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13603] Add prime-related and number theory functions to Python
Alex Gaynor alex.gay...@gmail.com added the comment: I'll chip in my 2 cents as well and say this also seems too domain specific and not useful enough for the stdlib. -- nosy: +alex ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13603 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13603] Add prime-related and number theory functions to Python
maniram maniram maniandra...@gmail.com added the comment: On further thought, I have changed my mind. I think this is domain-specific. Shall we close this bug? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13603 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13598] string.Formatter doesn't support empty curly braces {}
maniram maniram maniandra...@gmail.com added the comment: Why isn't anybody commiting or commenting on my patches? -- status: open - languishing ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13598 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com