[issue14576] IDLE: closes when writing warnings on Windows
Terry J. Reedy added the comment: I think the next interesting question is to find out why an invalid home directory causes idle to not start up. There's no obvious reason why that should be the case in principle, As Roger showed, IDLE will start up with an invalid home directory. so I suspect there's some error handling missing somewhere Yes, the uncaught exception raised when attempting to display a non-essential but user-useful messages (this is the third issue I know of about this). There are 5 places in configHandler.py where a warning is directly printed to sys.stderr. There are two similar writes in PyShell.py. The first warning is the problem here, but any of them could be a problem and all should be handled better. Lib/idlelib\PyShell.py: 1357: sys.stderr.write(Error: %s\n % str(msg)) Lib/idlelib\PyShell.py: 1358: sys.stderr.write(usage_msg) Lib/idlelib\configHandler.py: 209:sys.stderr.write(warn) Lib/idlelib\configHandler.py: 223:sys.stderr.write(warn) Lib/idlelib\configHandler.py: 255:sys.stderr.write(warning) Lib/idlelib\configHandler.py: 367:sys.stderr.write(warning) Lib/idlelib\configHandler.py: 624:sys.stderr.write(warning) Why are warning used instead of message boxes? Perhaps easier, perhaps the latter are not available because the tk loop is not running. Possible solutions: * Discard the message by just catching AttributeError (clikkeb) -- at each place indicated above. This would be better than nothing, but only as a temporary measure, and there is a better temporary measure below. * Rearrange the start up process to make message boxes available, with default configuraton, before the configuration process. * Make a list of messages and display them when it must (on exit, if that is possible with atexit) or in message boxes when it can. * Solve the more general problem of writing to None by making sys.stdout and sys.stderr not be None, #13582. At minimum, even as a temporary measure, use something that just swallows output. Something like import io class DummyOut(io.IOBase): def write(self, s): return len(s) dum = DummyOut() print(dum.write('sixsix')) # 6 -- title: IDLE cannot connect to subprocess - New solution - IDLE: closes when writing warnings on Windows ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14576 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16633] os.environ updates only one copy of env vars under Windows (GetEnvironmentVariable vs. getenv)
Jerome Dubois added the comment: We encountered the same issue when upgrading our application's JRE from 1.5 to 1.6. We use a kind of grid, which has engines written in C, which uses an embedded JAVA JVM, which loads C dll. One of these uses python. Here is what happens: 1. C executable launches an embedded JVM, which loads its required dlls. 2. JVM sets PYTHONHOME environment variable through windows kernel API: SetEnvironmentVariable 3. JVM loads our C dlls to start computations 3. One of the dlls invokes Py_InitializeEx, which must read PYTHONHOME in some way (C runtime getenv?). Python 2.5 here, with MSVCR71.dll loaded. 4. Computations are done with invoked python With JRE 1.5, Python is able to get correct PYTHONHOME, and can do import os in our script. With JRE 1.6, this is not the case, as JRE 1.6 loads MSVCR71.dll @ step 1. JRE 1.5 did not. As stated in the previous comments, and from my understanding, in Windows there is the Process Environment Variables Space and possibly several C Runtime Environment Variables Space. The first time a C runtime dll is loaded, it copies the Process Env Var into its own buffer. Our JRE 1.6 loads msvcr71.dll (C runtime), and so copies env var @ step 1. It happens before we set PYTHONHOME with JAVA @ step 2. To correct this, we had to use the Py_SetPythonHome function before calling Py_PyInit to set PYTHONHOME ourselves This way, Python executes our code fine when we use JRE 1.6. But this is because we do not call any getenv functionality within python at the moment, but it could happen in the future... As stated by eudoxos, the safest solution for windows is to use GetEnvironmentVariable (win32 kernel API). Is there any schedule for a fix for this problem? Thanks for you time and answer. Regards. -- nosy: +goungy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16633 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15448] utimes() functions fail with ENOSYS even when detected by configure
Bohuslav Slavek Kabrda added the comment: I have a similar problem with python 3.3.0. During installation, I get snip running install_lib creating /builddir/build/BUILDROOT/python33-python-3.3.0-3.el6.i386/opt/rh/python33/root/usr/lib/python3.3/lib-dynload copying build/lib.linux-i686-3.3-pydebug/_codecs_cn.cpython-33dm.so - /builddir/build/BUILDROOT/python33-python-3.3.0-3.el6.i386/opt/rh/python33/root/usr/lib/python3.3/lib-dynload [?1034herror: Function not implemented /snip I tracked it down to distutils calling os.utime. When I comment the two lines [1] that use utime, everything works fine (well, except all the tests using utime fail, too). I'm running RHEL 6.4. Any chance to fix this? Richard's patch doesn't work for me. Thanks. [1] http://hg.python.org/cpython/file/f3e348ab08c6/Lib/distutils/file_util.py#l149 -- nosy: +bkabrda ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15448 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8714] Delayed signals in the REPL on OpenBSD (possibly libpthread related)
Stefan Krah added the comment: Fixed in OpenBSD 5.2. -- resolution: - out of date status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8714 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15443] datetime module has no support for nanoseconds
Andrew Clegg added the comment: I would like to add a real-world use case I have for nanosecond-precision support. I deal with data loggers that are controlled by GPS clocks, and I am writing some processing software in Python that requires the input of high-precision timestamps for calculating clock drifts and offsets. The addition of nanosecond-precision support in datetime would allow me to use this rather than a homebrew solution. -- nosy: +andrewclegg ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15443 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8712] Skip libpthread related test failures on OpenBSD
Stefan Krah added the comment: All threading issues are fixed in OpenBSD 5.2. -- resolution: - out of date stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8712 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3876] multiprocessing does not compile on systems which do not define sem_timedwait
Stefan Krah added the comment: On OpenBSD 5.2 this is fixed. The AIX buildbot looks okay and I doubt that anyone will commit something for Solaris 9. -- nosy: +skrah resolution: - out of date stage: test needed - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3876 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16952] test_kqueue failure on NetBSD/OpenBSD
Stefan Krah added the comment: Could we merge this with #6419? -- nosy: +skrah ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16952 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12812] libffi does not build with clang on amd64
Stefan Krah added the comment: This is a duplicate of #11729, which is fixed. -- nosy: +skrah resolution: - duplicate stage: - committed/rejected status: open - closed superseder: - libffi assembler relocation check is not robust, fails with clang type: - compile error ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12812 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15757] ./configure --with-pydebug on FreeBSD results in -O2 -pipe eventually ending up in CFLAGS.
Stefan Krah added the comment: Trent, do you want to keep this open? I think sys.mk is behaving exactly as intended. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15757 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15362] pyport.h includes antiquated UTF handling for FreeBSD
Stefan Krah added the comment: Does this apply to Python 3.3 as well? I don't think we're going to fix this in 2.7. -- nosy: +skrah status: open - pending ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15362 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16525] wave file module does not support 32bit float format
Sebastian Kraft added the comment: Any news or feedback regarding my patch? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16525 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16914] timestamping in smtplib.py to help troubleshoot server timeouts/delays
gac added the comment: Thanks, I'll look into your suggestions and try to submit a further improved patch :) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16914 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16969] test_urlwithfrag fail
Ry Erickson added the comment: ./python -m test -v -uall test_urllib2net == CPython 3.3.0 (default, Jan 14 2013, 20:45:36) [GCC 4.6.1] == Linux-3.0.0-29-generic-i686-with-debian-wheezy-sid little-endian == /home/ry/Desktop/Python-3.3.0/build/test_python_2264 Testing with flags: sys.flags(debug=0, inspect=0, interactive=0, optimize=0, dont_write_bytecode=0, no_user_site=0, no_site=0, ignore_environment=0, verbose=0, bytes_warning=0, quiet=0, hash_randomization=1) [1/1] test_urllib2net test_sni (test.test_urllib2net.HTTPSTests) ... skipped 'requires SSL support' test_custom_headers (test.test_urllib2net.OtherNetworkTests) ... ok test_file (test.test_urllib2net.OtherNetworkTests) ... ok test_ftp (test.test_urllib2net.OtherNetworkTests) ... ok test_sites_no_connection_close (test.test_urllib2net.OtherNetworkTests) ... ok test_urlwithfrag (test.test_urllib2net.OtherNetworkTests) ... FAIL test_close (test.test_urllib2net.CloseSocketTest) ... ok test_ftp_basic (test.test_urllib2net.TimeoutTest) ... ok test_ftp_default_timeout (test.test_urllib2net.TimeoutTest) ... ok test_ftp_no_timeout (test.test_urllib2net.TimeoutTest) ... ok test_ftp_timeout (test.test_urllib2net.TimeoutTest) ... ok test_http_basic (test.test_urllib2net.TimeoutTest) ... ok test_http_default_timeout (test.test_urllib2net.TimeoutTest) ... ok test_http_no_timeout (test.test_urllib2net.TimeoutTest) ... ok test_http_timeout (test.test_urllib2net.TimeoutTest) ... ok == FAIL: test_urlwithfrag (test.test_urllib2net.OtherNetworkTests) -- Traceback (most recent call last): File /home/ry/Desktop/Python-3.3.0/Lib/test/test_urllib2net.py, line 165, in test_urlwithfrag http://docs.python.org/glossary.html#glossary;) AssertionError: 'http://docs.python.org/2/glossary.html' != 'http://docs.python.org/glossary.html#glossary' - http://docs.python.org/2/glossary.html ?-- + http://docs.python.org/glossary.html#glossary ? + -- Ran 15 tests in 26.079s FAILED (failures=1, skipped=1) test test_urllib2net failed 1 test failed: test_urllib2net -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16969 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14110] FreeBSD: test_os fails if user is in the wheel group
Roundup Robot added the comment: New changeset a94752d75c74 by Stefan Krah in branch '3.3': Issue #14110: Fix test failures on FreeBSD if the user is in the wheel group. http://hg.python.org/cpython/rev/a94752d75c74 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14110 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14110] FreeBSD: test_os fails if user is in the wheel group
Changes by Stefan Krah stefan-use...@bytereef.org: -- assignee: - skrah resolution: - fixed stage: - committed/rejected status: open - closed versions: +Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14110 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16977] argparse: mismatch between choices parsing and usage/error message
Eric V. Smith added the comment: Isn't this really just an inappropriate use of a string instead of a list? If indeed this is in the documentation, it should be changed. I still don't like: p.add_argument('a', choices=list('abc')) but at least it would work. This call to list() could be done internally, but I think passing in a string is a bad practice and argparse should not contain internal workarounds to cater to this usage. If you're proposing that argparse should use sequence iteration instead of the in operator, I disagree with that solution. -- nosy: +eric.smith ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16977 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12210] test_smtplib: intermittent failures on FreeBSD
Stefan Krah added the comment: Since this occurs only on 2.7 and *very* rarely, let's close it. -- resolution: out of date - wont fix status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12210 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16985] Docs reference a concrete UTC tzinfo, but none exists
New submission from Jason R. Coombs: The Python 2.7 docs for datetime state, The standard library has no tzinfo instances except for UTC, but if I read issue5094 correctly, Python 2.7 does not even have a UTC tzinfo instance, and never will. Is there any reason I shouldn't correct the docs to remove 'except for UTC'? -- assignee: docs@python components: Documentation messages: 180138 nosy: docs@python, jason.coombs priority: normal severity: normal status: open title: Docs reference a concrete UTC tzinfo, but none exists versions: Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16985 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16982] _ssl not built --without-threads
Roundup Robot added the comment: New changeset 8630fa732cf6 by Stefan Krah in branch 'default': Issue #16982: Fix --without-threads build failure. http://hg.python.org/cpython/rev/8630fa732cf6 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16982 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16982] _ssl not built --without-threads
Changes by Stefan Krah stefan-use...@bytereef.org: -- assignee: - skrah resolution: - fixed stage: needs patch - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16982 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15443] datetime module has no support for nanoseconds
Changes by Ramchandra Apte maniandra...@gmail.com: -- nosy: +ramchandra.apte ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15443 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7353] cporting docs recommend using Include/intobject.h, which was removed in 3.1?
Ramchandra Apte added the comment: Bump... is this still valid? -- nosy: +ramchandra.apte ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7353 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10590] Parameter type error for xml.sax.parseString(string, ...)
Serhiy Storchaka added the comment: Here is a patch which fixes this issue and a couple of related issues: issue1483, issue2174, issue2175, issue10590. -- keywords: +patch nosy: +BreamoreBoy, akuchling, eli.bendersky, georg.brandl, loewis, terry.reedy, tshepang, ygale stage: needs patch - patch review Added file: http://bugs.python.org/file28757/sax_parse.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10590 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16969] test_urlwithfrag fail
Ramchandra Apte added the comment: Hmmm. Because of the recent doc changes, that link is redirecting to http://docs.python.org/2...;. Even if we change that, for some reason, the fragment is disappearing when redirecting. -- nosy: +ramchandra.apte ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16969 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16969] test_urlwithfrag fail
Changes by Ramchandra Apte maniandra...@gmail.com: -- type: compile error - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16969 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16986] ElementTree incorrectly parses strings with declared encoding not UTF-8
New submission from Serhiy Storchaka: import xml.etree.ElementTree data = '?xml version=1.0 encoding=iso-8859-1?\nmoney value=$\xa3\u20ac\U0001017b$\xa3\u20ac\U0001017b/money' xml.etree.ElementTree.tostring(xml.etree.ElementTree.fromstring(data), 'unicode') 'money value=$£â\x82¬ð\x90\x85»$£â\x82¬ð\x90\x85»/money' -- components: XML messages: 180143 nosy: eli.bendersky, serhiy.storchaka priority: normal severity: normal stage: needs patch status: open title: ElementTree incorrectly parses strings with declared encoding not UTF-8 type: behavior versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16986 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16986] ElementTree incorrectly parses strings with declared encoding not UTF-8
Serhiy Storchaka added the comment: Patch for issue10590 fixes this for Python implementation of ElementTree, but not for C implementation. -- dependencies: +Parameter type error for xml.sax.parseString(string, ...) ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16986 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16952] test_kqueue failure on NetBSD/OpenBSD
Changes by Charles-François Natali cf.nat...@gmail.com: -- resolution: - duplicate stage: patch review - committed/rejected status: open - closed superseder: - Broken test_kqueue.py on OpenBSD ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16952 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16273] f.tell() returning negative number on Windows build
Armin Rigo added the comment: FWIW, on Windows only, open('foo', 'a').tell() always returns 0, which I think is broken too. It usually works anyway, because it updates the position before the first .write(). But it does not work in case the writing occurs in another process, like described here: http://stackoverflow.com/questions/13821708/ (Tested only on Python 2.6.2, but according to the link above, Python 2.7.3 has the same problem.) -- nosy: +arigo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16273 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16273] f.tell() returning negative number on Windows build
Stefan Krah added the comment: What is in sample.txt? I cannot reproduce this with a source build (Windows 7, 64-bit pgo build): Python 2.7.3+ (default, Jan 17 2013, 20:26:24) [MSC v.1500 64 bit (AMD64)] on win32 Type help, copyright, credits or license for more information. f = open('sample.txt') f.read(3) 'abc' f.read(3) 'def' f.tell() 6L -- nosy: +skrah ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16273 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16273] f.tell() returning negative number on Windows build
Antoine Pitrou added the comment: I am afraid I cannot reproduce with the 2.7.3 64-bit installer either: C:\python27\python.exe Python 2.7.3 (default, Apr 10 2012, 23:24:47) [MSC v.1500 64 bit (AMD64)] on win32 Type help, copyright, credits or license for more information. f = open(sample.txt) f.read(3) 'xxx' f.read(3) 'xxx' f.tell() 6L -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16273 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16987] HP-UX: SHLIB_EXT is not set
New submission from Stefan Krah: Since 5e33b27c71a8 SHLIB_EXT is not set in configure.ac, since the block in which $SO is defined has been moved below this line: AC_DEFINE_UNQUOTED(SHLIB_EXT, $SO, [Define this to be extension of shared libraries (including the dot!).]) This prevents extension module loading on HP-UX. -- components: Extension Modules messages: 180148 nosy: skrah priority: normal severity: normal status: open title: HP-UX: SHLIB_EXT is not set type: behavior versions: Python 3.3, Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16987 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16987] HP-UX: SHLIB_EXT is not set
Roundup Robot added the comment: New changeset 937e9df47ccd by Stefan Krah in branch '3.3': Issue #16987: Fix definition of SHLIB_EXT. http://hg.python.org/cpython/rev/937e9df47ccd -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16987 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15448] utimes() functions fail with ENOSYS even when detected by configure
Charles-François Natali added the comment: There are actually two distinct issues. For the first one, the problem is really a distribution issue: the libc is more recent than the kernel, and exports *utimes() whereas the kernel doesn't implement those syscalls, which results in ENOSYS. I don't like the idea of adding explicit check for this, because any syscall can fail with ENOSYS (we've had recently pipe2(), accept4(), etc). It's really a distribution issue. For the second one, it seems that RHEL6.4 doesn't have utime() anymore, which I find really strange (although POSIX.1-2008 marks utime() as obsolete). Could you provide the output of: $ strace ./python -c import os; os.utime('.') -- nosy: +neologix ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15448 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7353] cporting docs recommend using Include/intobject.h, which was removed in 3.1?
Stefan Krah added the comment: I tend to agree with the argument that the removal of intobject.h was a good thing, since it avoids subtle errors. Probably no one wants to reinstate intobject.h at this point, so unless there are objections, I'll update the docs in a couple of days. -- keywords: +patch nosy: +skrah Added file: http://bugs.python.org/file28758/issue7353.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7353 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16970] argparse: bad nargs value raises misleading message
Robert Leenders added the comment: Attached is a patch which solves these problems and adds test cases of Chris Jerdonek. When nargs is negative the same ValueError is raised as when nargs is zero. Also when nargs is any other invalid value a ValueError(invalid value for nargs) is raised. I have one question and that is about the value PARSER=A... for nargs, it's a valid option and there are test cases with nargs=A..., however it is not listed in the documentation: http://docs.python.org/dev/library/argparse.html#nargs -- keywords: +patch nosy: +ReDAeR Added file: http://bugs.python.org/file28759/argparse.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16970 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16977] argparse: mismatch between choices parsing and usage/error message
Chris Jerdonek added the comment: This wasn't just in the documentation. It was the *first* example of how to use the choices argument out of the two examples in that section (from the time Python first adopted argparse and before): 16.4.3.7. choices Some command-line arguments should be selected from a restricted set of values. These can be handled by passing a container object as the choices keyword argument to add_argument(). When the command line is parsed, argument values will be checked, and an error message will be displayed if the argument was not one of the acceptable values: parser = argparse.ArgumentParser(prog='PROG') parser.add_argument('foo', choices='abc') parser.parse_args('c'.split()) Namespace(foo='c') parser.parse_args('X'.split()) usage: PROG [-h] {a,b,c} PROG: error: argument foo: invalid choice: 'X' (choose from 'a', 'b', 'c') (from http://hg.python.org/cpython/file/c0ddae67f4df/Doc/library/argparse.rst#l1021 ) So I think it's a bit late to say it's an inappropriate usage or bad practice. To preserve backwards compatibility, I think we should use sequence iteration for strings, or equivalently apply in to iter(choices), set(choices), etc. when choices is a string. I don't think, however, that we should alter the choices attribute because that could break things for people: p = argparse.ArgumentParser() a = p.add_argument(letter, choices='abcd') a.choices 'abcd' -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16977 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16970] argparse: bad nargs value raises misleading message
Chris Jerdonek added the comment: Thanks for the patch. I will take a look. And good observation re: PARSER. Can you open a separate documentation issue for that where it can be discussed? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16970 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16988] argparse: PARSER option for nargs not documented
New submission from Robert Leenders: There is a value for nargs: PARSER=A... which is not documented at http://docs.python.org/3.4/library/argparse.html#nargs. The docstring for the action class in argparse.py also does not list PARSER as a valid value for nargs. In argparse.py on line 2199-2201 it says: # Allow one argument followed by any number of options or arguments elif nargs == PARSER: nargs_pattern = '(-*A[-AO]*)' This is the only hint that I could find on what it is about. -- assignee: docs@python components: Documentation messages: 180155 nosy: ReDAeR, bethard, docs@python priority: normal severity: normal status: open title: argparse: PARSER option for nargs not documented type: enhancement versions: Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16988 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16970] argparse: bad nargs value raises misleading message
Robert Leenders added the comment: The new issue about PARSER can be found here: http://bugs.python.org/issue16988 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16970 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16988] argparse: PARSER option for nargs not documented
Changes by Chris Jerdonek chris.jerdo...@gmail.com: -- nosy: +chris.jerdonek ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16988 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6135] subprocess seems to use local encoding and give no choice
Joseph Perry added the comment: I've found a workaround by specifying the enviroment variable: my_env = os.environ my_env['PYTHONIOENCODING'] = 'utf-8' p = subprocess.Popen(shlex.split(command), stdout=subprocess.PIPE, stderr=subprocess.PIPE, stdin=subprocess.PIPE, env=my_env) I've attached an example script for testing. It calls itself recursively 10 times. Pleased note the 'fix' variable. -- nosy: +berwin22 Added file: http://bugs.python.org/file28760/subProcessTest.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6135 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11870] test_3_join_in_forked_from_thread() of test_threading hangs 1 hour on x86 Ubuntu Shared 3.x
Roundup Robot added the comment: New changeset cd54b48946ca by Stefan Krah in branch '3.3': Issue #11870: Skip test_3_join_in_forked_from_thread() on HP-UX. http://hg.python.org/cpython/rev/cd54b48946ca -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11870 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11983] Inconsistent hash and comparison for code objects
Brett Cannon added the comment: I have no issue with the current behaviour, so it sounds like the source comment just needs updating. Care to suggest some wording, Eugene? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11983 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16987] HP-UX: SHLIB_EXT is not set
Changes by Stefan Krah stefan-use...@bytereef.org: -- assignee: - skrah keywords: +3.3regression resolution: - fixed stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16987 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16957] shutil.which() shouldn't look in working directory on unix-y systems
Thomas Kluyver added the comment: I've added a patch with my suggested fix, as well as a test for this. test_shutil all passes on Linux - I haven't run the tests on Windows. -- keywords: +patch Added file: http://bugs.python.org/file28761/shutil_which_cwd.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16957 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16989] allow distutils debug mode to be enabled more easily
New submission from Chris Jerdonek: This issue is to allow distutils's debug mode [1] to be enabled more easily (e.g. programmatically). Currently, for example, distutils.core does the following: from distutils.debug import DEBUG (from http://hg.python.org/cpython/file/cb297930d2cf/Lib/distutils/core.py#l12) which means that it's not sufficient to set the DEBUG attribute on the distutils.debug module. Instead, to enable debug mode programmatically you have to do something like the following prior to importing from distutils: import os os.environ['DISTUTILS_DEBUG'] = 1 # for False or 1 for True. This issue can be fixed simply by changing the affected import statements from importing the value to importing just the module (and subsequently accessing the value via the module). [1] http://docs.python.org/dev/distutils/setupscript.html#debugging-the-setup-script -- assignee: eric.araujo components: Distutils keywords: easy messages: 180161 nosy: chris.jerdonek, eric.araujo, tarek priority: normal severity: normal status: open title: allow distutils debug mode to be enabled more easily type: enhancement versions: Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16989 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16990] re: match of nongreedy regex not grouping right
New submission from Jared Grubb: re.match matches, but the capture groups are empty. That's not possible. Python 2.7.2 (default, Oct 11 2012, 20:14:37) [GCC 4.2.1 Compatible Apple Clang 4.0 (tags/Apple/clang-418.0.60)] on darwin Type help, copyright, credits or license for more information. import re re.match('.*', 'stuff').group() # greedy matches and captures; cool. 'stuff' re.match('.*?', 'stuff').group() # nongreedy matches (cool) but doesnt capture (huh?) '' -- components: Library (Lib) messages: 180162 nosy: jaredgrubb priority: normal severity: normal status: open title: re: match of nongreedy regex not grouping right versions: Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16990 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16795] Patch: some changes to AST to make it more useful for static language analysis
Benjamin Peterson added the comment: I think None should be treated as meaning not present for an optional argument. By the way, it would be good if we could get you to sign a contributor agreement. http://www.python.org/psf/contrib/ -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16795 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16990] re: match of nongreedy regex not grouping right
R. David Murray added the comment: Wouldn't a non-greedy .* match the null string? -- nosy: +r.david.murray ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16990 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16990] re: match of nongreedy regex not grouping right
Jared Grubb added the comment: Yes: re.match('.*', '') _sre.SRE_Match object at 0x107c6d308 re.match('.*?', '') _sre.SRE_Match object at 0x107c6d370 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16990 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16990] re: match of nongreedy regex not grouping right
R. David Murray added the comment: So, group() is returning the correct value, then. -- resolution: - invalid stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16990 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16990] re: match of nongreedy regex not grouping right
Jared Grubb added the comment: You're right. My mistake. I thought match meant the full string must match, but in Python it means the beginning must match. Sorry for the noise. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16990 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16468] argparse only supports iterable choices
Chris Jerdonek added the comment: I have a new suggestion that I hope will satisfy Terry. After looking at the code more, I noticed that add_argument() does currently work for non-iterable choices provided that metavar is passed. This was also noted in the report for the duplicate issue 16697. On reflection, this makes sense because that's what metavar is for -- providing a replacement string for the usual formatting in the help text. The only thing that doesn't work in this case is error message formatting. With that, I'd like to propose the following: (1) Change the add_argument() error raised for non-iterable choices from: ValueError(length of metavar tuple does not match nargs) to something like: ValueError(metavar must be provided for non-iterable choices) This provides the help string representation for non-iterable choices (in the spirit of Explicit is better than implicit). (2) Make the error text the following for non-iterable choices (the error message currently breaks for non-iterable choices): PROG: error: argument FOO: invalid choice: 'xxx' compared with (for iterable choices)-- PROG: error: argument FOO: invalid choice: 'xxx' (choose from ...) I think this is preferable to inserting the str() or repr() (especially for maintenance releases) because str() and repr() may not be meant for displaying to the end-users of a script. The instructions/description of such choices is already in the add_argument() help string. We could consider appending that to provide substantive guidance. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16468 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16468] argparse only supports iterable choices
Chris Jerdonek added the comment: Actually, let me relax (1). We can just use what the argparse code calls the default_metavar in that case (which it constructs from the argument name). The important thing for me is not displaying the str/repr when it might not be intended. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16468 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16991] Add OrderedDict written in C
New submission from Eric Snow: Here's an initial stab at writing OrderedDict in C. Though, the implementation is not heavily optimized and isn't super subclass-friendly, my hope is that it's relatively close to the final version. I'm getting this up now to get some eyes on it. The spot in the builtins is mostly for convenience, but I expect it will need to be exposed somewhere (perhaps _collections?). My experience with the C-API is relatively limited and my C-fu is not at a professional level. However, I'm pretty sure that I have most everything correct. The ultimate goal for this type is to use it for **kwargs. Note: this first patch has some reference leaks that I'm tracking down. -- assignee: eric.snow components: Interpreter Core files: odict.diff keywords: patch messages: 180170 nosy: eric.snow, rhettinger priority: normal severity: normal stage: patch review status: open title: Add OrderedDict written in C type: enhancement versions: Python 3.4 Added file: http://bugs.python.org/file28762/odict.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16991 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16992] signal.set_wakeup_fd(400) crashes on Windows
New submission from Guido van Rossum: On Windows I get an immediate crash with the following code: import signal signal.set_wakeup_fd(400) I think there's a range check missing somewhere. (I found this because I was passing a socket's fileno() -- my bug, but shouldn't crash.) -- messages: 180171 nosy: gvanrossum priority: normal severity: normal status: open title: signal.set_wakeup_fd(400) crashes on Windows versions: Python 3.3, Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16992 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16969] test_urlwithfrag fail
Ry Erickson added the comment: I don't think compile is a valid command in mint. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16969 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16992] signal.set_wakeup_fd(400) crashes on Windows
Roundup Robot added the comment: New changeset 2adc83b4738f by Benjamin Peterson in branch '3.3': check windows fd validity (closes #16992) http://hg.python.org/cpython/rev/2adc83b4738f New changeset 1a1989021451 by Benjamin Peterson in branch '2.7': check windows fd validity (closes #16992) http://hg.python.org/cpython/rev/1a1989021451 -- nosy: +python-dev resolution: - fixed stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16992 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13057] Thread not working for python 2.7.1 built with HP Compiler on HP-UX 11.31 ia64
py.user added the comment: found a redundant code (stdlib.h already defines the NULL macro) commit e33747a4b1a45acdd696a4e07bbd40ea7fb37366 Author: Stefan Krah sk...@bytereef.org Date: Thu Nov 22 22:49:11 2012 +0100 Issue #13057: Include stdio.h when NULL is used in configure.ac. --HG-- branch : 3.3 diff --git a/configure b/configure index 4a861ed..534c8df 100755 --- a/configure +++ b/configure ... @@ -14833,6 +14834,7 @@ else cat confdefs.h - _ACEOF conftest.$ac_ext /* end confdefs.h. */ +#include stdio.h #includestdlib.h int main() { size_t len = -1; -- nosy: +py.user ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13057 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13057] Thread not working for python 2.7.1 built with HP Compiler on HP-UX 11.31 ia64
Changes by Trent Nelson tr...@snakebite.org: -- nosy: +trent ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13057 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13057] Thread not working for python 2.7.1 built with HP Compiler on HP-UX 11.31 ia64
py.user added the comment: the hunk is from commit commit b2edc2629f5e0f11280ba9846d1a86346f4a7287 Author: Stefan Krah sk...@bytereef.org Date: Thu Nov 22 23:47:32 2012 +0100 Fix more usages of NULL without including stdio.h. --HG-- branch : 3.3 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13057 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16991] Add OrderedDict written in C
Benjamin Peterson added the comment: Nit: This really not be exposed through _collections rather than hacked into builtins. -- nosy: +benjamin.peterson ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16991 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16957] shutil.which() shouldn't look in working directory on unix-y systems
Serhiy Storchaka added the comment: I think it should be if os.path.dirname(cmd) and _access_check(cmd, mode): -- nosy: +hynek, serhiy.storchaka, tarek ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16957 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16957] shutil.which() shouldn't look in working directory on unix-y systems
Serhiy Storchaka added the comment: No, it should be if os.path.dirname(cmd): if _access_check(cmd, mode): return cmd return None -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16957 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15448] utimes() functions fail with ENOSYS even when detected by configure
Bohuslav Slavek Kabrda added the comment: Ouch, the problem was in fact on my side. I was building python inside a mock [1] chroot that had different version of headers than the actual kernel. When I figured this out and made the versions the same, everything passed perfectly. Sorry for the confusion. [1] http://fedoraproject.org/wiki/Projects/Mock -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15448 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com