[issue12850] [PATCH] stm.atomic
Changes by Georg Brandl ge...@python.org: -- nosy: +georg.brandl ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12850 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12906] Slight error in logging module's yaml config
Changes by Georg Brandl ge...@python.org: -- assignee: docs@python - vinay.sajip nosy: +vinay.sajip ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12906 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12905] multiple errors in test_socket on OpenBSD
Charles-François Natali neolo...@free.fr added the comment: I hope that this issue is not related to threads+signals. We got many threads+signals issues on FreeBSD 6. Yep. OpenBSD has a really specific pthread implementation (in user-space, using non-blocking I/O), so it might very well be yet another threads+signals occurrence. @Rémi What happens if you run a code equivalent to test_sendall_interrupted on its own? I mean, if you try something like this: import signal, socket c, s = socket.socketpair() signal.signal(signal.SIGALRM, lambda x,y: 0) signal.alarm(1) c.sendall(bx * (1024**2)) If it works, you could try creating a dummy thread before setting up the signal handler, something like: t = threading.Thread(target=lambda: 0) t.start() t.join() And retry. The problem with all those interruption tests (like issue #12903) is that they'll break on many *BSD if another thread is running. Although in this specific case, I suspect that there are no threads running, and we're really encountering a kernel/libc bug (Victor, remember the funny bug on FreeBSD where kill(getpid(), signal) didn't deliver the signal synchronously after the first thread had been created?). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12905 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12904] Change os.utime c functions to use nanosecond precision where possible
Martin v. Löwis mar...@v.loewis.de added the comment: The patch looks fine to me. -- nosy: +loewis ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12904 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12909] Inconsistent exception usage in PyLong_As* C functions
New submission from Nadeem Vawda nadeem.va...@gmail.com: The C functions for converting a Python 'int' object to a C integer are inconsistent about what exception gets raised when the object passed to them is not an integer. Most of these functions raise a TypeError, but PyLong_AsUnsignedLongLong() and PyLong_AsDouble() raise a SystemError instead. Raising a SystemError here is quite unhelpful. My understanding is that it is intended to indicate internal programming errors, so an extension module should not raise one when (for example) a function is passed an argument of the incorrect type. In such a case, raising a TypeError is a reasonable default. Is there any reason not to change the behaviour of these two functions to be consistent with their siblings? -- components: Interpreter Core messages: 143588 nosy: nadeem.vawda, pitrou priority: normal severity: normal stage: needs patch status: open title: Inconsistent exception usage in PyLong_As* C functions type: behavior versions: Python 3.2, Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12909 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12909] Inconsistent exception usage in PyLong_As* C functions
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +mark.dickinson, rhettinger ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12909 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12567] curses implementation of Unicode is wrong in Python 3
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 786668a4fb6b by Victor Stinner in branch 'default': Issue #12567: Fix curses.unget_wch() tests http://hg.python.org/cpython/rev/786668a4fb6b -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12567 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12105] open() does not able to set flags, such as O_CLOEXEC
Марк Коренберг socketp...@gmail.com added the comment: O_CLOEXEC is not linux-only. Windows has the same flag. In file-opening functions there is lpSecurityAttributes argument. And there is bInheritHandle member of corresponding structure. http://msdn.microsoft.com/en-us/library/aa379560(v=VS.85).aspx : bInheritHandle A Boolean value that specifies whether the returned handle is inherited when a new process is created. If this member is TRUE, the new process inherits the handle. So, why not to implement 'e' letter in open()? it is true crossplatform. On platforms where inheritance does not work, flag should be ignored. P.S. Moreover, I think that all file-descriptor-crete functions (open, socket, pipe, dup, ...) should set CLOEXEC atomically -- status: closed - open ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12105 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12105] open() does not able to set flags, such as O_CLOEXEC
Alexey Smirnov alexey.smir...@gmx.com added the comment: FreeBSD 8+ also supports O_CLOEXEC in open(). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12105 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12910] urrlib.quote quotes too many chars, e.g., '()'
New submission from Jörn Hees nrej9...@joernhees.de: urllib.quote('()') returns '%28%29' Looking into its code it tries to follow RFC 2396 (which is good even though it should follow rfc3986 nowadays), but it doesn't: http://tools.ietf.org/html/rfc2396 (see Appendix A, p.27): ( and ) are in mark and therefore unreserved, so why are they quoted? -- components: Library (Lib) messages: 143592 nosy: joern priority: normal severity: normal status: open title: urrlib.quote quotes too many chars, e.g., '()' type: behavior versions: Python 2.6, Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12910 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12909] Inconsistent exception usage in PyLong_As* C functions
Mark Dickinson dicki...@gmail.com added the comment: +1 for turning these into TypeErrors. It makes little sense that PyLong_AsLongLong and PyLong_AsUnsignedLongLong behave differently here. Do you have a patch handy? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12909 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12105] open() does not able to set flags, such as O_CLOEXEC
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: O_CLOEXEC is not linux-only. Windows has the same flag. In file-opening functions there is lpSecurityAttributes argument How do you suggest to use it? Even on Windows, python calls open(). And lpSecurityAttributes is an argument of CreateFile (which is the win32 kernel function that open() calls) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12105 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12105] open() does not able to set flags, such as O_CLOEXEC
STINNER Victor victor.stin...@haypocalc.com added the comment: Windows provides a _get_osfhandle() function. There is not the opposite function? :-) Anyway, O_CLOEXEC is not available on all platforms. Even on FreeBSD and Linux, it depends on the OS/kernel version. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12105 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12910] urrlib.quote quotes too many chars, e.g., '()'
Senthil Kumaran sent...@uthcode.com added the comment: It can aggressively put these chars !~*\'() in the safe list. I will look at the history to see if they originally present and were removed for some reason or they did not make it the list in the first place. If we do add, then it should be only 3.3 (Someone could be relying on the old behavior). -- assignee: - orsenthil nosy: +orsenthil versions: +Python 3.3 -Python 2.6, Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12910 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1616] compiler warnings
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset f24352b0df86 by Benjamin Peterson in branch 'default': merge 3.2 (#1616) http://hg.python.org/cpython/rev/f24352b0df86 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1616 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12911] Expose a private accumulator C API
New submission from Antoine Pitrou pit...@free.fr: In 47176e8d7060, I fixed json to not blow memory when serializing a large container of small objects. It turns out that the repr() of tuple objects (and, very likely, list objects and possibly other containers) has the same problem. For example, Martin's 256GB machine can't serialize a two billion-element tuple: http://www.python.org/dev/buildbot/all/builders/AMD64%20debian%20parallel%20custom/builds/6/steps/test/logs/stdio So I propose to expose a private C API for the accumulator pattern introduced in 47176e8d7060 (with, e.g., the _PyAccumulator prefix), and to use that API from relevant code. -- components: Interpreter Core messages: 143598 nosy: mark.dickinson, pitrou, rhettinger priority: normal severity: normal status: open title: Expose a private accumulator C API type: resource usage versions: Python 3.2, Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12911 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12105] open() does not able to set flags, such as O_CLOEXEC
Марк Коренберг socketp...@gmail.com added the comment: Some times ago, Python has used fopen() for open() implementation. Now, it uses OS-kernel native function to open files. AFAIK, open() in Windows is a wrapper around CreateFile, created to support some POSIX programs in Windows. Why not to use CreateFile() on Windows platform? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12105 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12105] open() does not able to set flags, such as O_CLOEXEC
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Why not to use CreateFile() on Windows platform? Good idea! Please open a separate issue for it. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12105 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6327] [mimetext] long lines get cut with exclamation mark and newline
Dmitry Simonov dsimo...@gmail.com added the comment: Quote: == Notes Note that mailservers have a 990-character limit on each line contained within an email message. If an email message is sent that contains lines longer than 990-characters, those lines will be subdivided by additional line ending characters, which can cause corruption in the email message, particularly for HTML content. To prevent this from occurring, add your own line-ending characters at appropriate locations within the email message to ensure that no lines are longer than 990 characters. == -- nosy: +Dmitry.Simonov ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6327 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11561] coverage of Python regrtest cannot see initial import of libs
Brandon Craig Rhodes bran...@rhodesmill.org added the comment: Brett, yes, you are welcome to close this issue — Ned quite handily convinced me that coverage code belongs in the coverage distribution, not languishing about in the CPython source tree. That solution also quite beautifully solves the copyright problem. So I happily withdraw my request for this feature. Nick, Brett is working on exactly the sort of devguide improvement that you suggest — not least because the devguide will now need to instruct people in how to build coverage so that its C-accelerated tracer is available, which Ned's own patch to coverage to cover stdlib tracing uses instead of the Python tracer that I cut-and-pasted into this patch. Finally, it would be wonderful to have a more formal mechanism for boot-time interventions. I have mentioned before my wish that Python's first action be to open() the executable, check its tail to see if it's a valid zipfile, and if so to try loading and running startup.py from that zipfile. Among other things, that would allow single-file distribution of pure-Python applications without the py2exe/py2app mess that prevails in the projects I work with today. But since the whole issue of grabbing control at boot time raises hackles (why would you want to do that!?), and I needed something working immediately during the PyCon sprint, I elected to simply adopt encodings.py as my way in. It works great, and coverage can evolve to an even better mechanism as soon as one becomes available, should anyone want to take the bootup option and run with it. One final thought: should PyPy etc also implement the same boot protocol, should one be invented, so that all mainline interpreters can be instrumented the same way? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11561 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12906] Slight error in logging module's yaml config
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 299ea19c3197 by Vinay Sajip in branch '2.7': Closes #12906: Fixed bug in YAML configuration. http://hg.python.org/cpython/rev/299ea19c3197 New changeset cf811943046b by Vinay Sajip in branch '3.2': Closes #12906: Fixed bug in YAML configuration. http://hg.python.org/cpython/rev/cf811943046b New changeset e9497423de7a by Vinay Sajip in branch 'default': Closes #12906: Merged fix from 3.2. http://hg.python.org/cpython/rev/e9497423de7a -- nosy: +python-dev resolution: - fixed stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12906 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12912] xmlrpclib.__version__ not bumped with updates
New submission from Rob Crittenden rcrit...@redhat.com: xmlrpclib.__version__ reports 1.0.1 from Python 2.7 in Fedora 14 and Python 2.6 in Fedora 12. I discovered this while trying to find a way to identify the version of xmlrpclib. The 2.7 xmlrpclib is not completely backward compatible with that in 2.6 Version-Release number of selected component (if applicable): python-2.7-7.fc14.x86_64 Steps to Reproduce: $ rpm -q python python-2.6.2-8.fc12.x86_64 $ python Python 2.6.2 (r262:71600, Jun 4 2010, 18:28:58) [GCC 4.4.3 20100127 (Red Hat 4.4.3-4)] on linux2 Type help, copyright, credits or license for more information. import xmlrpclib xmlrpclib.__version__ '1.0.1' $ rpm -q python python-2.7-7.fc14.x86_64 $ python Python 2.7 (r27:82500, Jul 26 2010, 18:19:48) [GCC 4.5.0 20100716 (Red Hat 4.5.0-3)] on linux2 Type help, copyright, credits or license for more information. import xmlrpclib xmlrpclib.__version__ '1.0.1' -- components: Library (Lib) messages: 143604 nosy: rcritten priority: normal severity: normal status: open title: xmlrpclib.__version__ not bumped with updates versions: Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12912 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12909] Inconsistent exception usage in PyLong_As* C functions
Nadeem Vawda nadeem.va...@gmail.com added the comment: Do you have a patch handy? See attached. -- keywords: +patch Added file: http://bugs.python.org/file23106/pylong-exceptions.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12909 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12909] Inconsistent exception usage in PyLong_As* C functions
Nadeem Vawda nadeem.va...@gmail.com added the comment: This probably shouldn't be backported to 3.2; it could break 3rd-party extension modules (though I would hope that nothing depends on this behaviour...). Also, it's worth noting that the error handling between conversion functions still isn't completely consistent - some attempt to coerce the argument to an integer using type-tp_as_number-nb_int, while others fail immediately when they see that PyLong_Check() fails. That's a less pressing issue, though. -- stage: needs patch - patch review versions: -Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12909 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12906] Slight error in logging module's yaml config
Derrick Petzold dpetz...@gmail.com added the comment: I know this is without etiquette but I must say holy shit that was quick and I can only hope that I do can do the same some day. Not with logging but maybe with something else. I think maybe I am already working on it. Hopefully maybe. Its hard to tell at times :). Ha but this (logging) helped me a lot ty again. -- resolution: fixed - status: closed - open ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12906 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5845] rlcompleter should be enabled automatically
Antoine Pitrou pit...@free.fr added the comment: It's more useful to have a hook called when entering interactive mode, rather than a flag that's set from the beginning: We already have such a hook: $PYTHONSTARTUP $PYTHONSTARTUP doesn't work with -i -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5845 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5845] rlcompleter should be enabled automatically
Éric Araujo mer...@netwok.org added the comment: Easily detecting interactive mode is of general interest for customization. Thanks for the feedback. We could open a feature request for that, and/or ask python-ideas. What if C also set sys.flags.interactive in python mode, or exposed sys.flags.implicit_interactive (but with better name)? An attribute in the sys module sounds like a good idea. It would not be an attribute of sys.flags though, as those are strictly command-line arguments. It's more useful to have a hook called when entering interactive mode, rather than a flag that's set from the beginning: We already have such a hook: $PYTHONSTARTUP calling e.g. sys.__interactivehook__ sounds even better. That’s another interesting idea. BTW, drawback of doing any such setup in site.py: python -S would be unfriendly! People using -S don’t want the customizations done in site, so I don’t think there’s a problem here. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5845 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11561] coverage of Python regrtest cannot see initial import of libs
Thomas Wouters tho...@python.org added the comment: For what it's worth, the need for a bootstrap-module has also come up within Google, where we have... somewhat different requirements than most. In order to fix import paths in a way that works even when using python -S, I had a need to patch the very first module that gets imported. Unfortunately the actual first module that gets imported depends on the arguments passed to Python. So, I wrote the attached stdlib_landmark.diff patch, which makes a 'stdlib_landmark.py' file that is both the stdlib landmark (used by Python to find the stdlib itself, currently 'os.py') *and* the very first module that is imported, always. (The 'stdlib_landmark' name may be a little clunky; a better name, mirroring sitecustomize, may be stdlibcustomize or such.) And yes, this could have been fixed in other ways. I could've patched the interpreter directly, or made Python understand symlinks to .py/.pyc files better, or tried to make a bunch of other tools work better with symlinks. This has turned out the most convenient solution for a number of reasons, though. -- nosy: +twouters Added file: http://bugs.python.org/file23107/stdlib_landmark.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11561 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9561] distutils: set encoding to utf-8 for input and output files
Éric Araujo mer...@netwok.org added the comment: I applied pkginfo_utf8.patch to Python 3.2 and 3.3. If you apply patches to distutils, please add tests for the fixed behavior. (Sorry if I wasn’t reactive on this one.) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9561 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12895] In MSI/EXE installer, allow installing Python modules in free path
Éric Araujo mer...@netwok.org added the comment: Martin, what do you think about this request? -- nosy: +loewis ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12895 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12909] Inconsistent exception usage in PyLong_As* C functions
Mark Dickinson dicki...@gmail.com added the comment: This probably shouldn't be backported to 3.2 Agreed; I don't see this as a bugfix (especially since AFAIK it's not documented that TypeError should be raised here); rather, as a design improvement. Also, it's worth noting that the error handling between conversion functions still isn't completely consistent True; there are a number of inconsistencies left. We'll get them all eventually. :-) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12909 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12909] Inconsistent exception usage in PyLong_As* C functions
Mark Dickinson dicki...@gmail.com added the comment: The patch still needs tests (e.g., in test_capi). I'm not sure whether it would be good to add information about the TypeError to the docs. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12909 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12913] Add a debugging howto
New submission from Éric Araujo mer...@netwok.org: I found a few blogs posts that explained how to use pdb. It appears from the comments that such introductory material is very useful to a lot of users. Instead of just expanding the pdb module docs, I propose to add a debugging howto covering basic troubleshooting techniques and giving a pdb tutorial. I think a howto has more visibility, as people unaware of the existence of a thing named pdb may however look for “debugging”. To educate myself on pdb, I have started writing a document. Before investing too much time, I’d like to know if people agree with the principle of adding such a howto. -- assignee: eric.araujo components: Documentation messages: 143615 nosy: eric.araujo priority: normal severity: normal status: open title: Add a debugging howto versions: Python 2.7, Python 3.2, Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12913 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12902] help(modules) executes module code
Éric Araujo mer...@netwok.org added the comment: Thanks for the report. This comes from the fact that pydoc imports the modules in order to get their documentation. Your message makes me think that the KWallet Python modules have a problem: they should not pop GUIs at import time! Please report this to them. In the Python docs, there is a note warning about this: http://docs.python.org/dev/library/pydoc . The doc for help, which is not on the same page, does not: http://docs.python.org/dev/library/functions#help It could be possible to load the code of a module without executing it. I’m not sure it would be a good idea; maybe you could ask for opinions on the python-ideas mailing list? -- components: -None nosy: +eric.araujo versions: -Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12902 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12910] urrlib.quote quotes too many chars, e.g., '()'
Changes by Éric Araujo mer...@netwok.org: -- nosy: +eric.araujo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12910 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5845] rlcompleter should be enabled automatically
Cherniavsky Beni b...@google.com added the comment: On Tue, Sep 6, 2011 at 17:54, Antoine Pitrou rep...@bugs.python.org wrote: It covers the user's desire customization very well (esp. if it worked with -i). sys.__interactivehook__ has the benefit of being cleanly settable from python code. But it might well be a YAGNI idea. $PYTHONSTARTUP doesn't work with -i Perhaps it should? I can't think of a thing that makes sense in $PYTHONSTARTUP that I wouldn't want with -i. (and if there is one, one can add a test for sys.flags.interactive, or run with env PYTHONSTARTUP='') Point to watch out for: errors in $PYTHONSTARTUP. One of the uses of python -i script.py is doing pdb.pm() on an exception thrown by the script; ideally a broken $PYTHONSTARTUP would not overr customization than editing? The fact that it'd be implemented in site.py? Yes, obviously, if it's implemented in site.py, -S should disable it. My point was that it doesn't have to be implemented there. You could drink the cool aid instead :-) -- Added file: http://bugs.python.org/file23108/unnamed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5845 ___div class=gmail_quoteOn Tue, Sep 6, 2011 at 17:54, Antoine Pitrou span dir=ltrlt;a href=mailto:rep...@bugs.python.org; target=_blankrep...@bugs.python.org/agt;/span wrote:brblockquote class=gmail_quote style=margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex divbrspan style=color:rgb(34, 34, 34);font-family:arial, sans-serif;font-size:14pxÃric Araujo lt;a href=mailto:mer...@netwok.org; style=color:rgb(17, 85, 204) target=_blankmer...@netwok.org/agt; added the comment:br /span /divdivgt; gt; It#39;s more useful to have a hook called when entering interactive mode, rather than a flagbr gt; gt; that#39;s set from the beginning:br gt; We already have such a hook: $PYTHONSTARTUPbr br/div/blockquotedivGood point!/divdivIt covers the user#39;s desire customization very well (esp. if it worked with -i)./divdivsys.__interactivehook__ has the benefit of being cleanly settable from python code./div divBut it might well be a YAGNI idea./divdivbr/divblockquote class=gmail_quote style=margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1exdiv /div$PYTHONSTARTUP doesn#39;t work with -ibr/blockquotediv /divdivPerhaps it should?/divdivI can#39;t think of a thing that makes sense in $PYTHONSTARTUP that I wouldn#39;t want with -i./divdiv(and if there is one, one can add a test for sys.flags.interactive, or run with env PYTHONSTARTUP=#39;#39;)/div div /divdivPoint to watch out for: errors in $PYTHONSTARTUP./divdivOne of the uses of quot;python -i script.pyquot; is doing a href=http://pdb.pm;pdb.pm/a() on an exception thrown by the script;/divdiv ideally a broken $PYTHONSTARTUP would not overr/divdivbr/divblockquote class=gmail_quote style=margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1exdivdivdivgt; BTW, drawback of doing any such setup in site.py: quot;python -Squot; would be unfriendly!People using -S donât want the customizations done in site, so I donât think thereâs a problem here./div divbr/div/div/div/blockquotedivpython -S doesn#39;t disable readline.  What makes completions more of a quot;customizationquot; than editing?/divdivThe fact that it#39;d be implemented in site.py?/div divYes, obviously, if it#39;s implemented in site.py, -S should disable it.  My point was that it doesn#39;t have to be implemented there.  You could drink the cool aid instead :-)/div/div ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5845] rlcompleter should be enabled automatically
Cherniavsky Beni b...@google.com added the comment: [sorry, html mail was bad idea] On Tue, Sep 6, 2011 at 17:54, Antoine Pitrou rep...@bugs.python.org wrote: Éric Araujo mer...@netwok.org added the comment: It's more useful to have a hook called when entering interactive mode, rather than a flag that's set from the beginning: We already have such a hook: $PYTHONSTARTUP Good point! It covers the user's desire customization very well (esp. if it worked with -i). sys.__interactivehook__ has the benefit of being cleanly settable from python code. But it might well be a YAGNI idea. $PYTHONSTARTUP doesn't work with -i Perhaps it should? I can't think of a thing that makes sense in $PYTHONSTARTUP that I wouldn't want with -i. (and if there is one, one can add a test for sys.flags.interactive, or run with env PYTHONSTARTUP='') Point to watch out for: errors in $PYTHONSTARTUP. One of the uses of python -i script.py is doing pdb.pm() on an exception thrown by the script; ideally a broken $PYTHONSTARTUP would not overr BTW, drawback of doing any such setup in site.py: python -S would be unfriendly! People using -S don’t want the customizations done in site, so I don’t think there’s a problem here. python -S doesn't disable readline. What makes completions more of a customization than editing? The fact that it'd be implemented in site.py? Yes, obviously, if it's implemented in site.py, -S should disable it. My point was that it doesn't have to be implemented there. You could drink the cool aid instead :-) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5845 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5845] rlcompleter should be enabled automatically
Changes by Éric Araujo mer...@netwok.org: Removed file: http://bugs.python.org/file23108/unnamed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5845 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5845] rlcompleter should be enabled automatically
Changes by Éric Araujo mer...@netwok.org: -- Removed message: http://bugs.python.org/msg143617 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5845 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2636] Adding a new regex module (compatible with re)
Steven D'Aprano steve+pyt...@pearwood.info added the comment: Matthew Barnett wrote: So, VERSION0 and VERSION1, with (?V0) and (?V1) in the pattern? Seems reasonable to me. +1 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2636 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11340] test_distutils fails because of borked compress program
Westley Martínez aniko...@gmail.com added the comment: https://bugs.archlinux.org/task/25908 Looks like Allan will be taking care of this problem (eventually). I think this bug can be closed. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11340 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5845] rlcompleter should be enabled automatically
Éric Araujo mer...@netwok.org added the comment: sys.__interactivehook__ has the benefit of being cleanly settable from python code. But it might well be a YAGNI idea. I’ll ask python-dev about that. For the moment, I prefer the idea of a new sys.interactive attribute (boolean). $PYTHONSTARTUP doesn't work with -i Perhaps it should? -i means two things: interactive and inspect. The second meaning is used when you want python to execute a script or module just as usual but without exiting afterward, to let you inspect the state of the program. Supporting PYTHONSTARTUP would change these use cases and be an unacceptable change. BTW, drawback of doing any such setup in site.py: python -S would be unfriendly! People using -S don’t want the customizations done in site, so I don’t think there’s a problem here. python -S doesn't disable readline. What makes completions more of a customization than editing? The fact that it'd be implemented in site.py? If you go back to the first messages of this report, you’ll see that I wasn’t sure what a good location would be, and decided site because it did not look out of place. There isn’t a stronger rationale than that. One could argue that even now, site mixes disparate functionality: one program could wish to use -S to disable sys.path munging but run into bugs because the builtin exit is not defined anymore for example. Yes, obviously, if it's implemented in site.py, -S should disable it. We agree. My point was that it doesn't have to be implemented there. I really want to explore all options before renouncing to implement it in site. I’d like the implementation to be maintainable and shareable with other Python VMs. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5845 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11340] test_distutils fails because of borked compress program
Éric Araujo mer...@netwok.org added the comment: Thank you for investigating. -- assignee: tarek - eric.araujo resolution: fixed - wont fix stage: - committed/rejected ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11340 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12912] xmlrpclib.__version__ not bumped with updates
Éric Araujo mer...@netwok.org added the comment: The 2.7 xmlrpclib is not completely backward compatible with that in 2.6 Can’t you check sys.version_info then? -- nosy: +eric.araujo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12912 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12906] Slight error in logging module's yaml config
Éric Araujo mer...@netwok.org added the comment: Thanks to you for the report and fix! -- nosy: +eric.araujo resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12906 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12914] Add cram function to textwrap
New submission from Éric Araujo mer...@netwok.org: The pydoc module has a cram function that could be useful to Python authors, if we made it public (textwrap sounds like a great place). -- components: Library (Lib) messages: 143625 nosy: eric.araujo priority: normal severity: normal status: open title: Add cram function to textwrap type: feature request versions: Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12914 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12915] Add inspect.locate and inspect.resolve
New submission from Éric Araujo mer...@netwok.org: The need to resolve a dotted name to a Python object is spreading in the stdlib: pydoc has locate and resolve, packaging has util.resolve_name, unittest has something else, etc. For the benefit of stdlib maintainers as well as the community, I think such functionality should be exposed publicly by the inspect module. -- components: Library (Lib) messages: 143626 nosy: eric.araujo priority: normal severity: normal status: open title: Add inspect.locate and inspect.resolve type: feature request versions: Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12915 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12916] Add inspect.splitdoc
New submission from Éric Araujo mer...@netwok.org: splitdoc is a hidden gem in pydoc: it’s a little helper to implement docstring splitting as documented in the docstrings PEPs. It is not a one-liner, so I think there is value in making it public in the inspect module. -- components: Library (Lib) messages: 143627 nosy: eric.araujo priority: normal severity: normal status: open title: Add inspect.splitdoc type: feature request versions: Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12916 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12917] Make visiblename and allmethods functions public
New submission from Éric Araujo mer...@netwok.org: pydoc contains these two functions that could be used by third-party code to implement a custom dir function, write a documentation tool or other uses: visiblename and allmethods. We could make them public, in pydoc or inspect. -- components: Library (Lib) messages: 143628 nosy: eric.araujo priority: normal severity: normal status: open title: Make visiblename and allmethods functions public type: feature request versions: Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12917 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12918] New module for terminal utilities
New submission from Éric Araujo mer...@netwok.org: It was suggested in #7798 to make the pager functions from pydoc public. I can’t find a good place to put them, so I think we could add a new module with terminal-related utilities. It could contain the pager functions, progress bars (there are many implementations to be compared), ANSI and Windows color codes (reimplemented over and over again), etc. This may require a run through python-ideas and/or -dev, but I’m opening a bug for the record. -- components: Library (Lib) messages: 143629 nosy: eric.araujo priority: normal severity: normal status: open title: New module for terminal utilities type: feature request versions: Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12918 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7798] Make generally useful pydoc functions public
Éric Araujo mer...@netwok.org added the comment: I’ve looked hard at pydoc and opened distinct bug reports so that each piece of maybe-useful functionality can be discussed independently: #12918 New module for terminal utilities #12917 Make visiblename and allmethods functions public #12916 Add inspect.splitdoc #12915 Add inspect.locate and inspect.resolve #12914 Add cram function to textwrap -- resolution: - invalid stage: needs patch - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7798 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12911] Expose a private accumulator C API
Antoine Pitrou pit...@free.fr added the comment: Here is a patch against 3.2. In the default branch it will also help factor out some code from the _json module. -- stage: - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12911 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12911] Expose a private accumulator C API
Changes by Antoine Pitrou pit...@free.fr: -- keywords: +patch Added file: http://bugs.python.org/file23109/accu.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12911 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5876] __repr__ returning unicode doesn't work when called implicitly
Armin Rigo ar...@users.sourceforge.net added the comment: A __repr__() that returns unicode can, in CPython 2.7 be used in %s % x or in u%s % x --- both expressions then return a unicode without doing any encoding --- but it cannot be used anywhere else, e.g. in %r % x or in repr(x). See also the PyPy issue https://bugs.pypy.org/issue857 . -- nosy: +arigo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5876 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7219] Unhelpful error message when a distutils package install fails due to a permissions error
Changes by Éric Araujo mer...@netwok.org: Removed file: http://bugs.python.org/file23101/unnamed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7219 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12871] Disable sched_get_priority_min/max if Python is compiled without threads
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 5c8b6e03ebfe by Charles-François Natali in branch 'default': Issue #12871: sched_get_priority_(min|max) might not be defined even though http://hg.python.org/cpython/rev/5c8b6e03ebfe -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12871 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7219] Unhelpful error message when a distutils package install fails due to a permissions error
Éric Araujo mer...@netwok.org added the comment: Thanks for testing the patch higery. I wonder if another exception was raised but ignored by unittest. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7219 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12919] Control what module is imported first
New submission from Brett Cannon br...@python.org: Issue11561 had a use case for controlling what module is imported first (along with a patch to use a module other than 'os' to control finding the stdlib). There have been others who could use this feature as well. -- components: Interpreter Core messages: 143636 nosy: brett.cannon priority: low severity: normal stage: needs patch status: open title: Control what module is imported first type: feature request versions: Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12919 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12895] In MSI/EXE installer, allow installing Python modules in free path
Martin v. Löwis mar...@v.loewis.de added the comment: I don't think it's necessary. People who want to get at the files can do an administrative installation, and put the files anywhere they like. Therefore, I won't work on this myself; somebody would have to contribute the code. It will be difficult to allow multiple simultaneous installations into different paths, which I think the OP would want - so even if the literal request from msg143503 is satisfied, the actual issue probably remains as unimplementable. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12895 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12912] xmlrpclib.__version__ not bumped with updates
Rob Crittenden rcrit...@redhat.com added the comment: Yes, this is the solution I ended up using as a workaround. I figured that since xmlrpclib has its own version it should be meaningful. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12912 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12895] In MSI/EXE installer, allow installing Python modules in free path
Ram Rachum r...@rachum.com added the comment: Martin, what do you mean administrative installation? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12895 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12905] multiple errors in test_socket on OpenBSD
Remi Pointel pyt...@xiri.fr added the comment: What happens if you run a code equivalent to test_sendall_interrupted on its own? I mean, if you try something like this: Hi, it blocks too: $ gdb -args ./python [...] (gdb) run Starting program: /usr/ports/pobj/Python-3.2.2/Python-3.2.2/python Python 3.2.2 (default, Sep 5 2011, 21:21:34) [GCC 4.2.1 20070719 ] on openbsd5 Type help, copyright, credits or license for more information. import signal, socket c, s = socket.socketpair() signal.signal(signal.SIGALRM, lambda x,y: 0) 0 signal.alarm(1) 0 [New process 28830] c.sendall(bx * (1024**2)) ^C Program received signal SIGINT, Interrupt. Cannot access memory at address 0x98 (gdb) bt #0 0x00020125678a in poll () from /usr/lib/libc.so.60.1 #1 0x00020619b4aa in _thread_kern_poll (wait_reqd=value optimized out) at /usr/src/lib/libpthread/uthread/uthread_kern.c:780 #2 0x00020619c3a8 in _thread_kern_sched (scp=0x0) at /usr/src/lib/libpthread/uthread/uthread_kern.c:382 #3 0x000206190ade in sendto (fd=9, msg=0x2032d6020, len=1044480, flags=0, to=0x0, to_len=0) at /usr/src/lib/libpthread/uthread/uthread_sendto.c:63 #4 0x0002105f670a in sock_sendall () from /usr/ports/pobj/Python-3.2.2/Python-3.2.2/build/lib.openbsd-5.0-amd64-3.2/_socket.so #5 0x00020668b172 in PyEval_EvalFrameEx () from /usr/local/lib/libpython3.2m.so.1.0 #6 0x00020668bf66 in PyEval_EvalCodeEx () from /usr/local/lib/libpython3.2m.so.1.0 #7 0x00020668c22b in PyEval_EvalCode () from /usr/local/lib/libpython3.2m.so.1.0 #8 0x0002066a93d7 in run_mod () from /usr/local/lib/libpython3.2m.so.1.0 #9 0x0002066abcae in PyRun_InteractiveOneFlags () from /usr/local/lib/libpython3.2m.so.1.0 #10 0x0002066abf3e in PyRun_InteractiveLoopFlags () from /usr/local/lib/libpython3.2m.so.1.0 #11 0x0002066ac04c in PyRun_AnyFileExFlags () from /usr/local/lib/libpython3.2m.so.1.0 #12 0x0002066bc9f4 in Py_Main () from /usr/local/lib/libpython3.2m.so.1.0 #13 0x00400e75 in main () Thanks for your help, Remi. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12905 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12912] xmlrpclib.__version__ not bumped with updates
Éric Araujo mer...@netwok.org added the comment: I figured that since xmlrpclib has its own version it should be meaningful. That was most probably the intent of the attribute, but it seems to have become unmaintained. In any case, a change could not be done in a 2.7 bugfix release. Maybe it’s worth changing it in 3.3, or it could just be removed. BTW: The 2.7 xmlrpclib is not completely backward compatible with that in 2.6 Do you mean that your code relied on bugs or undocumented behavior, or that you’ve found regressions? If it’s the later, please report bugs. -- nosy: +benjamin.peterson, georg.brandl versions: +Python 3.3 -Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12912 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12871] Disable sched_get_priority_min/max if Python is compiled without threads
Changes by Charles-François Natali neolo...@free.fr: -- resolution: - fixed stage: - committed/rejected status: open - closed type: - compile error ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12871 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12905] multiple errors in test_socket on OpenBSD
Charles-François Natali neolo...@free.fr added the comment: Hi, it blocks too: Oops, I just realized there was a typo in the sample test. The signal handler should be lambda x,y: 1/0 and not lambda x,y: 0 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12905 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12912] xmlrpclib.__version__ not bumped with updates
Rob Crittenden rcrit...@redhat.com added the comment: Python 2.7 changed the internal class used in xmlrpclib from HTTP to HTTPConnection. I have code that subclasses httplib.HTTP to use the python-nss package to create a connection over SSL (similiar to httplib.HTTPS). My code currently looks something like this as a workaround: class NSSConnection(httplib.HTTPConnection) ... class NSSHTTPS(httplib.HTTP): _connection_class = NSSConnection def __init__ ... def connect(): (major, minor, micro, releaselevel, serial) = sys.version_info if major == 2 and minor 7: conn = NSSHTTPS(host, 443, dbdir=/etc/pki/nssdb) else: conn = NSSConnection(host, 443, dbdir=/etc/pki/nssdb) Full code is at https://fedorahosted.org/freeipa/browser/ipalib/rpc.py and https://fedorahosted.org/freeipa/browser/ipapython/nsslib.py At least one other person has run into this, https://techknowhow.library.emory.edu/blogs/branker/2011/07/01/python-27-xmlrpclibtransport-backward-compatibility -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12912 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11457] Expose nanosecond precision from system calls
Larry Hastings la...@hastings.org added the comment: Here's a better idea: we add a new IEEE 754-2008 quad-precision float type. The IEEE 754-2008 quad precision float has 1 sign bit, 15 bits of exponent, and 112 bits of mantissa, so it should have enough precision to last utime until humanity transforms itself into a single angelic being of pure light and energy. GCC has had __float128 since 4.3, Clang has __float128 now too, Intel's compiler has _Quad. It looks like Visual C++ doesn't support it yet--it does support a funny 80-bit float but I don't think Python wants to go there. I realize a new float type would be a major undertaking, but it seems to me that that's really the right way to do it. Nobody would have to change their code, and it'd behave like the existing float. It'd be just like 2.x, with int and long! -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11457 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12920] Inspect.getsource fails to get source of local classes
New submission from Popa Claudiu pcmantic...@gmail.com: inspect.getsource called with a class defined in the same file fails with TypeError: module '__main__' (built-in) is a built-in class, although the documentation says that: The argument may be a module, class, method, function, traceback, frame, or code object. The source code is returned as a single string. I think that should be specified in documentation that this function works only for objects living in a module. -- assignee: docs@python components: Documentation messages: 143645 nosy: Popa.Claudiu, docs@python priority: normal severity: normal status: open title: Inspect.getsource fails to get source of local classes type: behavior versions: Python 2.7, Python 3.1, Python 3.2, Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12920 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12895] In MSI/EXE installer, allow installing Python modules in free path
Martin v. Löwis mar...@v.loewis.de added the comment: Martin, what do you mean administrative installation? That's what you get when you do msiexec /a foo.msi. http://en.wikipedia.org/wiki/Windows_Installer#Administrative_installation -- title: In MSI/EXE installer, allow installing Python modules in free path - In MSI/EXE installer, allow installing Python modules in free path ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12895 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12919] Control what module is imported first
Changes by Eric Snow ericsnowcurren...@gmail.com: -- nosy: +eric.snow ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12919 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12905] multiple errors in test_socket on OpenBSD
STINNER Victor victor.stin...@haypocalc.com added the comment: I tried the following script on OpenBSD 5 with Python 3.3: --- import signal import sys s = signal.SIGALRM signal.signal(s, lambda x,y: 1/0) signal.alarm(1) signal.siginterrupt(s, True) sys.stdin.read() --- The C signal handler is called, but the system call (read in this case) is not interrupted. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12905 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12922] StringIO and seek()
New submission from Terry J. Reedy tjre...@udel.edu: First, there is a minor documentation issue. 15.2.3.1. I/O Base Classes class io.IOBase seek(offset, whence=SEEK_SET) Change the stream position to the given byte offset Since StringIO seeks by code units that should perhaps say 'byte or code unit offset' or a separate note should be added to the doc entry for StringIO. txt = StringIO('ab\U00010030') txt.seek(3) 3 txt.write('x') 1 txt.getvalue() 'ab\ud800x' The behavior problem is that seeking for StringIO does not work relative to the current position or end. IOError: Can't do nonzero cur-relative seeks # Note: this message is wrong for end-relative seeks. I presume this is inherited from an undocumented restriction on seeking with text streams, because chars *might* be variably sized. However, I do not think it should be. StringIO does not inherit the same reason for the restriction (certainly not on wide builds, and on narrow builds, seeking from the beginning is just as problematical). For StringIO, there is no option of 'opening in binary (byte) mode instead' as there is for disk files. Since a StringIO object is a wrapped array of fixed-size units, seeking from any position is as trivial as it is from the beginning. And again, the current docs imply that it should work. Note that seeking from the beginning is not limited to the existing content. Instead, skipped areas are filled with nulls. from io import StringIO txt = StringIO('0123456789') txt.seek(15,0) # no problem with absolute seek txt.write('xxx') s = txt.getvalue() print(ord(s[12])) # 0 So that is not a reason to limit seeking from other positions either. -- components: Library (Lib) messages: 143649 nosy: terry.reedy priority: normal severity: normal stage: test needed status: open title: StringIO and seek() type: behavior versions: Python 3.2, Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12922 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12905] multiple errors in test_socket on OpenBSD
STINNER Victor victor.stin...@haypocalc.com added the comment: I tried the following script on OpenBSD 5 with Python 3.3: ... Bad news: the script doesn't hang if Python is build without threads. Short C program to test interrupted syscalls: - #include signal.h #include stdio.h #include pthread.h void handler(int signum) { printf(HANDLER!\n); } void _noop() { } int main() { int s = SIGALRM; char buffer[1024]; int n; static int dummy = 0; pthread_t thread1; pthread_create(thread1, NULL, (void *) _noop, dummy); pthread_join(thread1, NULL); signal(s, handler); siginterrupt(s, 1); alarm(1); printf(read...\n); n = read(0, buffer, 1024); printf(read-%i\n, n); return 0; } - read() is interrupted after 1 second, it works. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12905 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12905] multiple errors in test_socket on OpenBSD
STINNER Victor victor.stin...@haypocalc.com added the comment: Oh, siginterrupt(SIGALRM, 0) doesn't work in a program linked to pthread. Example: #include signal.h #include stdio.h void handler(int signum) { printf(HANDLER!\n); } int main() { int s = SIGALRM; char buffer[1024]; int n; signal(s, handler); siginterrupt(s, 0); alarm(1); printf(read...\n); n = read(0, buffer, 1024); printf(read-%i\n, n); return 0; } This program ends after 1 second with read--1 if it is linked to pthread (bug!), it hangs if it is not linked to pthread (ok). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12905 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12905] multiple errors in test_socket on OpenBSD
Charles-François Natali neolo...@free.fr added the comment: The C signal handler is called, but the system call (read in this case) is not interrupted. That's what I thought... Bad news: the script doesn't hang if Python is build without threads. Makes sense. When linked with pthread, all I/O syscalls are actually non-blocking. read() is interrupted after 1 second, it works. Hmmm... Does it still work if you don't a create thread beforehand? Also, one difference is that Python uses sigaction to setup the signal handler. There might be subtle semantics change/bugs between signal/sigaction. Oh, siginterrupt(SIGALRM, 0) doesn't work in a program linked to pthread. You could try with sigaction/SA_RESTART. But OpenBSD's pthread implementation has severe limitations/bugs. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12905 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12905] multiple errors in test_socket on OpenBSD
STINNER Victor victor.stin...@haypocalc.com added the comment: read() is interrupted after 1 second, it works. Does it still work if you don't a create thread beforehand? Yes, the read() is also interrupted as expected if no thread is created. one difference is that Python uses sigaction to setup the signal handler If the handler is installed using the following code, read() is interrupted: -- sigemptyset(sa.sa_mask); sa.sa_handler = handler; sa.sa_flags = 0; sigaction(SIGALRM, sa, NULL); -- Using sa.sa_flags=SA_RESTART, read() hangs (it is not interrupted). Python uses sigaction with flags=0. You could try with sigaction/SA_RESTART. Using SA_RESTART, read() is not interrupted. But if the program is linked to pthread, read() is always interrupted: with sa_flags=0 or sa_flags=SA_RESTART. But OpenBSD's pthread implementation has severe limitations/bugs. rthread doc contains: Future work: Quite simply, signal handling is one the most complicated aspects of threads to get right. (...) http://www.openbsd.org/papers/eurobsd2005/tedu-rthreads.pdf -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12905 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12909] Inconsistent exception usage in PyLong_As* C functions
Nadeem Vawda nadeem.va...@gmail.com added the comment: Attached is an updated patch with tests. There don't seem to be any tests for PyLong_AsS[s]ize_t() and PyLong_AsDouble(), so I added new ones for this issue. They should still be expanded on at some point in the future, but for the meanwhile this should be sufficient. I'm not sure whether it would be good to add information about the TypeError to the docs. Yeah, that doesn't seem necessary; raising TypeError in this sort of situation is sufficiently typical behavior that explicitly documenting it feels redundant. -- assignee: - nadeem.vawda Added file: http://bugs.python.org/file23110/pylong-exceptions.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12909 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12911] Expose a private accumulator C API
Antoine Pitrou pit...@free.fr added the comment: For the record, the patch fixes the test_bigmem crashes when testing repr() on tuples and lists: http://www.python.org/dev/buildbot/all/builders/AMD64%20debian%20parallel%20custom/builds/10/steps/test/logs/stdio -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12911 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12788] test_email fails with -R
Changes by Stefan Krah stefan-use...@bytereef.org: -- nosy: +skrah ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12788 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12921] http.server.BaseHTTPRequestHandler.send_error and trailing newline
Changes by Senthil Kumaran sent...@uthcode.com: -- assignee: - orsenthil nosy: +orsenthil ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12921 ___ ___ 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
New submission from Stefan Krah stefan-use...@bytereef.org: Hi, test_urllib fails in refleak mode: ./python -m test -uall -v -R : test_urllib == FAIL: test_invalid_redirect (test.test_urllib.urlopen_HttpTests) -- Traceback (most recent call last): File /home/stefan/hg/cpython/Lib/test/test_urllib.py, line 235, in test_invalid_redirect http://python.org/;) AssertionError: HTTPError not raised by urlopen -- Ran 58 tests in 0.075s FAILED (failures=1, skipped=1) test test_urllib failed 1 test failed: test_urllib [133995 refs] -- components: Tests messages: 143656 nosy: orsenthil, skrah priority: normal severity: normal status: open title: test_urllib fails in refleak mode type: behavior versions: Python 3.3 ___ 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
[issue5149] syntactic sugar: type coercion on pointer assignment
Vlad Riscutia riscutiav...@gmail.com added the comment: I believe there is a deeper issue here in ctypes design. Basically we provide both c_char_p and POINTER(c_char) which should behave exactly the same since both are the equivalent of char* in C but internally they have different implementations. c_char_p is considered a simple type and I believe supports some conversions to and from Python strings while POINTER(c_char) is considered a pointer type which supports assignment from array etc. I think a better fix would be to deprecate p_char_p or make it an equivalent of POINTER(c_char), otherwise we will have to do work on c_char_p to make it more like POINTER(c_char) when issues like this get opened and probably also make POINTER(c_char) more like c_char_p. Why not just have POINTER(c_char) which works as expected? I don't have all the historical context on why this pseudo-simple type was provided but I saw a couple of issues where people expect it to behave like a C char* but it won't because it is implemented as a convenience type with limited support. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5149 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12911] Expose a private accumulator C API
Antoine Pitrou pit...@free.fr added the comment: Updated patch (mostly cosmetic stuff) after Benjamin's comments. -- Added file: http://bugs.python.org/file23111/accu2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12911 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5149] syntactic sugar: type coercion on pointer assignment
Meador Inge mead...@gmail.com added the comment: Vlad, I agree that having both 'c_char_p' and 'POINTER(c_char)' will just be more work for two seemingly identical constructs. I don't fully understand why both would be needed either (or the implications of removing one of them or making them synonyms). I guess a little software archeology is in order. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5149 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11677] make test has horrendous performance on an ecryptfs
Jason Gerard DeRose jder...@novacut.com added the comment: Barry, I'm suspicious there might be more to the performance issue than just the ecryptfs overhead. While experimenting with a read benchmark, I just happened to notice that when reading from an ecryptfs filesystem, the CPU usage is unusually high in the *python3* process. For example: ./benchmark.py /home/.dmedia = 149 MB per second = top shows 22-24% CPU usage ./benchmark.py /home/jderose/.dmedia = 38.9 MB per second = top shows 79-85% CPU usage It's the same physical drive in both cases, but the one in /home/jderose is ecryptfs. If it was just ecryptfs overhead, wouldn't there be lower CPU utilization in the python3 process, as there would be a lower throughput coming from the kernel, more time waiting on IO? In both cases, there were 56 files, for a total of 19.5 GB. I ran this on 64-bit Ubuntu Oneiric, Python 3.2.2. Here's the benchmark: http://bazaar.launchpad.net/~jderose/filestore/multi/view/head:/benchmark.py -- nosy: +jderose ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11677 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11677] make test has horrendous performance on an ecryptfs
Jason Gerard DeRose jder...@novacut.com added the comment: Oops, I think I don't understand the meaning of top CPU usage, as time tells a different story. Direct ext4: real2m14.144s user0m0.260s sys 0m30.350s ecryptfs over ext4: real8m47.130s user0m0.080s sys 7m2.080s -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11677 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12870] Regex object should have introspection methods
Matt Chaput m...@whoosh.ca added the comment: Ezio, no offense, but I think it's safe to say you've completely misunderstood this bug. It is not about explaining what a regex matches or optimizing the regex. Read the last sentences of the two paragraphs explaining the proposed methods for the use cases. This is about allowing MY CODE to programmatically get certain information about a regex object to allow it to limit the number of times it has to call regex.match(). AFAIK there's no good way to get this information about a regex object without adding these methods or building my own pure-Python regex interpreter, which would be both Herculean and pointless. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12870 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12924] Missing call to quote_plus() in test_urllib.test_default_quoting()
New submission from Jon Parise j...@indelible.org: test_default_quoting() runs a number of identical tests on both quote() and quote_plus() (which is most cases have equivalent behavior). However, at the end of the method, there appears to be a missing complementary call to quote_plus() despite there being an assertion call for the quote_plus() case. -- components: Tests files: test_urllib.default_quoting.patch keywords: patch messages: 143663 nosy: jon priority: normal severity: normal status: open title: Missing call to quote_plus() in test_urllib.test_default_quoting() type: behavior versions: Python 2.7 Added file: http://bugs.python.org/file23112/test_urllib.default_quoting.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12924 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com