[issue10943] abitype: Need better support to port C extension modules to the stable C API
New submission from Leo fhaxbo...@googlemail.com: I tried to port the extension module at http://code.google.com/p/pyhyphen/source/browse/3.x/hnjmodule.c to the stable C API using abitype.py. I gave up after the following exceptions: - execption raised for missing PyVarObject_HEAD: this could be rixed by deleting a /* */ comment before. I think abitype.py should properly skip comments rather than forcing the user to delete them. - the xxxmodule.c on which hnjmodule.c is based, defines a PyObject Str_type wherr tp_basicsize is 0 rather than sizeof(XXX). This causes abitype.py to raise a key error as '0' seems to be ignored by abitype.py. Finally, I suggest to add to the source tree a boiler plate C module conforming to the stable API such as xxxmodule-stable-api.c. This would help creating extensions from scratch. -- components: Extension Modules messages: 126519 nosy: fhaxbo...@googlemail.com priority: normal severity: normal status: open title: abitype: Need better support to port C extension modules to the stable C API type: feature request versions: Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10943 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10944] ctypes documentation does not mention c_bool in table of standard types
New submission from Марк Коренберг socketp...@gmail.com: http://docs.python.org/library/ctypes.html: --- 15.16.1.4. Fundamental data types [table without c_bool] 15.16.2.7. Fundamental data types class ctypes.c_bool New in version 2.6. -- assignee: docs@python components: Documentation messages: 126520 nosy: docs@python, mmarkk priority: normal severity: normal status: open title: ctypes documentation does not mention c_bool in table of standard types type: feature request ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10944 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10834] Python 2.7 x86 IDLE fails to run in Windows 7
Peter Heiberg pe...@sveumsondre.no added the comment: Run - C:\Python27\python.exe -m test.regrtest ... stops at test_asynchat, been there for about 20mins. Can't seem to break the operation tho (Ctrl+C), it still hangs at test_asynchat with the blinking underscore one line down. -- Added file: http://bugs.python.org/file20450/python test halt.jpg ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10834 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10935] wsgiref.handlers.BaseHandler and subclasses of str
Denis S. Otkidach denis.otkid...@gmail.com added the comment: Current behavior is unpythonic: documentation explicitly mentions isinstance as preferred way to check type (see http://docs.python.org/library/types.html ). Also 2.7 is the last minor version with str as main string type. So I believe it should use isinstance(val, basestring) to help transition to Python 3. -- nosy: +ods ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10935 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8954] wininst regression: errors when building on linux
anatoly techtonik techto...@gmail.com added the comment: Is this issue really critical? Bump. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8954 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8954] wininst regression: errors when building on linux
Changes by anatoly techtonik techto...@gmail.com: Added file: http://bugs.python.org/file20451/issue1774043_7001.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8954 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10828] Python 3 doesn't support non-ASCII module names with a locale encoding different than UTF-8
Changes by STINNER Victor victor.stin...@haypocalc.com: -- title: Cannot use nonascii utf8 in names of files imported from - Python 3 doesn't support non-ASCII module names with a locale encoding different than UTF-8 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10828 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10896] trace module compares directories as strings (--ignore-dir)
Vladimir Rutsky rutsky.vladi...@gmail.com added the comment: SilentGhost, thanks for the patch! I can confirm, that adding os.path.normcase fixes issues with different cases of files. I believe there also may be issue with FAT's long file name mangling, like C:\PROGRA~1\python26\ instead of C:\Program Files\python26\. But never experienced such issue with Python. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10896 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4106] multiprocessing occasionally spits out exception during shutdown
Jesse Noller jnol...@gmail.com added the comment: On Tue, Jan 18, 2011 at 6:23 PM, Brian Thorne rep...@bugs.python.org wrote: Brian Thorne hardb...@gmail.com added the comment: With the example script attached I see the exception every time. On Ubuntu 10.10 with Python 2.6 Since the offending line in multiprocesing/queues.py (233) is a debug statement, just commenting it out seems to stop this exception. Looking at the util file shows the logging functions to be all of the form: if _logger: _logger.log(... Could it be possible that after the check the _logger global (or the debug function) is destroyed by the exit handler? Can we convince them to stick around until such a time that they cannot be called? Adding a small delay before joining also seems to work, but is ugly. Why should another Process *have* to have a minimum amount of work to not throw an exception? See http://bugs.python.org/issue9207 - but yes, the problem is that the VM is nuking our imported modules before all the processes are shutdown. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4106 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10896] trace module compares directories as strings (--ignore-dir)
Vladimir Rutsky rutsky.vladi...@gmail.com added the comment: Sorry I was wrong - patch don't fix original issue. Case should be normalized not only for directories provided through --ignore-dir, but also for directories obtained from __file__. In my tests on Windows Ignore.names(self, filename, modulename) receives `filename''s argument like: C:\Python26\Lib\site-packages\shapely\__init__.pyc Attaching patch fixes this issue for me (for Python 2.7 from http://svn.python.org/projects/python/branches/release27-maint, patch attached by SilentGhost is for 3.X I think). -- nosy: +SilentGhost Added file: http://bugs.python.org/file20452/trace_ignore_case_fix.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10896 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10898] posixmodule.c redefines FSTAT
Antoine Pitrou pit...@free.fr added the comment: Ok, fixed in r88111 (3.2), r88112 (3.1) and r88113 (2.7). -- resolution: - fixed stage: needs patch - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10898 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10945] bdist_wininst depends on MBCS codec, unavailable on non-Windows
New submission from Éric Araujo mer...@netwok.org: If distutils.commands.bdist_wininst.bdist_wininst.get_inidata returns a unicode string (which is always the case in 3.x and can happen in 2.x if if you pass a unicode object as one setup argument), bdist_wininst will try to use the MBCS codec, which is not available on non-Windows OSes (see http://docs.python.org/dev/library/codecs#module-encodings.mbcs). If someone wants to make a patch, here are some guidelines: http://wiki.python.org/moin/Distutils/FixingBugs -- assignee: eric.araujo components: Distutils, Distutils2 messages: 126528 nosy: eric.araujo, tarek priority: normal severity: normal stage: needs patch status: open title: bdist_wininst depends on MBCS codec, unavailable on non-Windows type: behavior versions: 3rd party, Python 2.7, Python 3.1, Python 3.2, Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10945 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8954] wininst regression: errors when building on linux
Éric Araujo mer...@netwok.org added the comment: I opened another bug for the MBCS problem which prevents me from testing Anatoly’s patch. -- dependencies: +bdist_wininst depends on MBCS codec, unavailable on non-Windows ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8954 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10946] bdist doesn’t pass --skip-build on to subcommands
New submission from Éric Araujo mer...@netwok.org: Yannick has found that bdist_* commands don’t get the --skip-build option from bdist. This should be solved easily thanks to set_undefined_options. Adding people from #414775 (r25075) to nosy. -- assignee: eric.araujo components: Distutils, Distutils2 keywords: easy messages: 126530 nosy: eric.araujo, kern, loewis, ygingras priority: normal severity: normal stage: needs patch status: open title: bdist doesn’t pass --skip-build on to subcommands type: behavior versions: 3rd party, Python 2.7, Python 3.1, Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10946 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10946] bdist doesn’t pass --skip-build on to subcommands
Changes by Éric Araujo mer...@netwok.org: -- nosy: +tarek ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10946 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10945] bdist_wininst depends on MBCS codec, unavailable on non-Windows
anatoly techtonik techto...@gmail.com added the comment: I believe it is better to start and commit a testcase . -- nosy: +techtonik ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10945 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10947] imaplib: Internaldate2tuple and ParseFlags require (and latter returns) bytes arrays; should allow/return str
New submission from Joe Peterson j...@skyrush.com: In imaplib, there is currently a mix of bytes array and str use. Time2Internaldate(), e.g., returns (and accepts) str. Internaldate2tuple() and ParseFlags() only accept a bytes object, and the latter returns a tuple of bytes objects. Of course, these were all strings in Python 2. To regain compatibility with Python 2 behavior and make things more consistent, this patch changes the return type of ParseFlags() to a str tuple, and allow it and Internaldate2tuple() to accept either a bytes object or a str. The unit test has been expanded to test these. Note that applying this patch assumes that the the patches from issue 10939 and issue 10941 have been applied. Also, I am not sure it is proper to accept *both* bytes array and str. Perhaps only str should be allowed. Comments? -- components: Library (Lib) files: imaplib_string_compat.patch keywords: patch messages: 126532 nosy: lavajoe priority: normal severity: normal status: open title: imaplib: Internaldate2tuple and ParseFlags require (and latter returns) bytes arrays; should allow/return str type: behavior versions: Python 3.2 Added file: http://bugs.python.org/file20453/imaplib_string_compat.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10947 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10945] bdist_wininst depends on MBCS codec, unavailable on non-Windows
Éric Araujo mer...@netwok.org added the comment: We don’t commit failing tests :) If you mean you want to write a test case, please go ahead and attach a patch or changeset URI. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10945 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10921] imaplib: Internaldate2tuple() string/bytes issues, does not handle negative TZ offsets, does not handle DST correctly
Joe Peterson j...@skyrush.com added the comment: This issue has been split, as suggested by Alexander Belopolsky, into separate issues: issue 10934 - doc change to correctly reflect return of local time vs. UTC issue 10939 - bytes/str issues issue 10941 - DST handled incorrectly issue 10947 - compatibility using str/bytes Closing this issue (see separate ones above). -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10921 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10896] trace module compares directories as strings (--ignore-dir)
SilentGhost ghost@gmail.com added the comment: Vladimir, superseder's patch fixes that too. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10896 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9509] argparse FileType raises ugly exception for missing file
Changes by SilentGhost ghost@gmail.com: -- status: open - languishing ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9509 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10945] bdist_wininst depends on MBCS codec, unavailable on non-Windows
anatoly techtonik techto...@gmail.com added the comment: Please don't ask me about patches. Core devs won't accept them. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10945 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10935] wsgiref.handlers.BaseHandler and subclasses of str
Phillip J. Eby p...@telecommunity.com added the comment: Doesn't matter how unpythonic it is: the spec calls for exact types and has done so for six years already, so it's a bit late to do anything about it. (And any version of Python that allowed string subclasses was in violation of the spec and therefore buggy.) In principle, this class could allow non-str objects if and ONLY if they were converted to actual str objects upon receipt -- but they would have to be the *exact* type after this conversion. If somebody wants to implement that, I have no objection. But it MUST reject non-basestring input values and values that don't convert to an exact type str. (IOW, type(str(x)) is str must hold.) To put it another way, the WSGI protocol requires output headers to be of type 'list' where all elements are type 'tuple' and containing two 'str' entries. The Headers class cannot fulfill this contract if it allows non-conforming input. So non-conforming input must either be rejected or made to conform. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10935 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10935] wsgiref.handlers.BaseHandler and subclasses of str
Antoine Pitrou pit...@free.fr added the comment: OK. So he is saying that when the spec says an object of type str he means 'type(x) is str' as opposed to 'isinstance(x, str)'. I would naively have expected the latter, as other people clearly do as well. +1 with RDM here. Doesn't matter how unpythonic it is: the spec calls for exact types Can you clarify why it does? -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10935 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10945] bdist_wininst depends on MBCS codec, unavailable on non-Windows
Éric Araujo mer...@netwok.org added the comment: Please don't ask me about patches. Core devs won't accept them. One of your patches for diff has been accepted; some distutils bugs have patches from you (for which we are grateful) that are in various review stages. The only thing preventing acceptance where I’m concerned is time, nothing else. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10945 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10948] Trouble with dir_util created dir cache
New submission from Diego Queiroz queiroz.di...@gmail.com: There is a problem with dir_util cache (defined by _path_created global variable). It appears to be useful but it isn't, just repeat these steps to understand the problem I'm facing: 1) Use mkpath to create any path (eg. /home/user/a/b/c) 2) Open the terminal and manually delete the directory /home/user/a and its contents 3) Try to create /home/user/a/b/c again using mkpath Expected behavior: mkpath should create the folder tree again. What happens: Nothing, mkpath thinks the folder already exists because its creation was cached. Moreover, if you try to create one more folder level (eg. /home/user/a/b/c/d) it raises an exception because it thinks that part of the tree was already created and fails to create the last folder. I'm working with parallel applications that deal with files asynchronously, this problem gave me a headache. Anyway, the solution is easy: remove the cache. -- assignee: tarek components: Distutils messages: 126540 nosy: diegoqueiroz, eric.araujo, tarek priority: normal severity: normal status: open title: Trouble with dir_util created dir cache type: behavior versions: Python 2.5, Python 2.6, Python 2.7, Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10948 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10949] logging.RotatingFileHandler not robust enough
New submission from Christophe Kalt k...@taranis.org: logging.RotatingFileHandler.doRollover() can fail leaving the handler with a closed filehandle, causing all subsequent logging attempts to fail: import logging import logging.handlers logging.getLogger().addHandler(logging.handlers.RotatingFileHandler('testlog', None, 10, 5)) logging.getLogger().setLevel(logging.INFO) logging.info('qwertyuiop') os.system('ls -l testlog*') -rw-r--r-- 1 - - 11 Jan 19 10:02 testlog -rw-r--r-- 1 - - 0 Jan 19 10:02 testlog.1 0 os.remove('testlog') logging.info('qwertyuiop') Traceback (most recent call last): File /home8/taraniso/opt/lib/python2.6/logging/handlers.py, line 72, in emit self.doRollover() File /home8/taraniso/opt/lib/python2.6/logging/handlers.py, line 129, in doRollover os.rename(self.baseFilename, dfn) OSError: [Errno 2] No such file or directory logging.info('qwertyuiop') Traceback (most recent call last): File /home8/taraniso/opt/lib/python2.6/logging/handlers.py, line 71, in emit if self.shouldRollover(record): File /home8/taraniso/opt/lib/python2.6/logging/handlers.py, line 145, in shouldRollover self.stream.seek(0, 2) #due to non-posix-compliant Windows feature ValueError: I/O operation on closed file logging.info('qwertyuiop') Traceback (most recent call last): File /home8/taraniso/opt/lib/python2.6/logging/handlers.py, line 71, in emit if self.shouldRollover(record): File /home8/taraniso/opt/lib/python2.6/logging/handlers.py, line 145, in shouldRollover self.stream.seek(0, 2) #due to non-posix-compliant Windows feature ValueError: I/O operation on closed file Fix seems trivial enough, attaching. This is against 2.6.5, browsing subversion online seems to indicate it is needed on the trunk as well, although it won't apply cleanly. -- components: Library (Lib) files: logging.diff keywords: patch messages: 126541 nosy: kalt priority: normal severity: normal status: open title: logging.RotatingFileHandler not robust enough type: behavior versions: Python 2.6, Python 2.7, Python 3.1 Added file: http://bugs.python.org/file20454/logging.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10949 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10935] wsgiref.handlers.BaseHandler and subclasses of str
Andrey Popp 8may...@gmail.com added the comment: the spec says an object of type str he means 'type(x) is str' as opposed to 'isinstance(x, str)' -1 Liskov substitution principle states, that every subtype S of type T can be used whenever type T is used. -- nosy: +andreypopp ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10935 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9509] argparse FileType raises ugly exception for missing file
Éric Araujo mer...@netwok.org added the comment: SilentGhost, can you remove old files from the report (or tell which ones I should remove if you can’t do it) and make one patch with code and test changes that apply cleanly to current py3k? That would make a final review by Steven easier. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9509 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10887] Add link to development ML
Éric Araujo mer...@netwok.org added the comment: Done. -- assignee: tarek - eric.araujo resolution: - fixed stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10887 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10932] distutils.core.setup - data_files misbehaviour ?
Éric Araujo mer...@netwok.org added the comment: Thanks for the report. “No directory information from files is used to determine the final location of the installed file; only the name of the file is used” I understand this line to mean that only the basename of the file will be used in the target directory, IOW that ('config', ['cfg/data.cfg']) will create a file in config/data.cfg, not config/cfg/data.cfg. I’m not 100% sure about my reading though, this line is confusing. Paths starting with '..' are relative, even if they’re not under the top-level directory of the project (do the docs say they should be?), so the ability to give '../../spam/whatever' as data file looks okay. However, it should not be installed to target_dir/../../spam, that’s definitely a bug (coming from os.path.join in cmd.Command.copy_file, I think). If you want to write a test and fix, there are some guidelines at http://wiki.python.org/moin/Distutils/FixingBugs -- assignee: tarek - eric.araujo components: +Distutils2 keywords: +easy nosy: +fdrake title: distutils.core.setup - data_files missbehaviour ? - distutils.core.setup - data_files misbehaviour ? versions: +3rd party, Python 2.7, Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10932 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10923] Python 2.7 hangs on Unicode+threading
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: import child_directory Then it's certainly an effect of the import lock: http://docs.python.org/library/threading.html#importing-in-threaded-code In your case, the first call to encode('utf8') indirectly imports utf8.py, while the import lock is held by 'import child_directory'. Then the self.loglock is the second resource that closes the deadlock loop. A workaround is to add some call to encode('utf8') before the thread is created. -- nosy: +amaury.forgeotdarc resolution: - works for me ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10923 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10932] distutils.core.setup - data_files misbehaviour ?
Fred L. Drake, Jr. fdr...@acm.org added the comment: On Wed, Jan 19, 2011 at 12:42 PM, Éric Araujo rep...@bugs.python.org wrote: I understand this line to mean that only the basename of the file will be used in the target directory, IOW that ('config', ['cfg/data.cfg']) will create a file in config/data.cfg, not config/cfg/data.cfg. I’m not 100% sure about my reading though, this line is confusing. This is my reading as well. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10932 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10948] Trouble with dir_util created dir cache
Éric Araujo mer...@netwok.org added the comment: Thanks for the report and diagnosis. Why does your application randomly removes files created by distutils? -- assignee: tarek - eric.araujo versions: +Python 3.2 -Python 2.5, Python 2.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10948 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10921] imaplib: Internaldate2tuple() string/bytes issues, does not handle negative TZ offsets, does not handle DST correctly
Changes by Alexander Belopolsky belopol...@users.sourceforge.net: -- resolution: - duplicate stage: unit test needed - committed/rejected superseder: - imaplib: Internaldate2tuple() is documented to return UTC, but it returns local time ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10921 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1371826] distutils is silent about multiple -I/-L/-R
Changes by Éric Araujo mer...@netwok.org: -- assignee: tarek - eric.araujo keywords: +easy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1371826 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10932] distutils.core.setup - data_files misbehaviour ?
Éric Araujo mer...@netwok.org added the comment: See also #9261. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10932 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10948] Trouble with dir_util created dir cache
Diego Queiroz queiroz.di...@gmail.com added the comment: Well. My application does not actually randomly remove the folders, it just can't guarantee for a given process how the folder it created will be deleted. I have many tasks running on a cluster using the same disk. Some tasks creates the folders/files and some of them remove them after processing. What each task will do depends of the availability of computational resources. The application is also aware of possible user interaction, that is, I need to be able to manipulate folders manually (adding or removing) without crashing the application or corrupting data. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10948 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10948] Trouble with dir_util created dir cache
Éric Araujo mer...@netwok.org added the comment: Maybe I’m tired, but I don’t understand why your application would remove directories that distutils creates. We’ve fixed a bug related to a race condition when *creating* directories (#9281), but behaving sanely on an unstable tree seems something different to me. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10948 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10950] ServerProxy returns bad XML
New submission from Beau beaumarti...@gmail.com: xmlrpc.client.ServerProxy calls that return XML (ie, the a non-marshallable type) give bad XML, with \ (backslash then double quote characters, '\\'; not escaped double quote) in place of , and \' in place of '. Ampersands aren't XML-escaped either. (I have only tested this with Last.fm's API but I have made calls that return marshallable types with no problem, so I'm assuming the issue lies with ServerProxy and not Last.fm's XML-RPC servers.) The following test code, identical to that in the attached file illustrates the bug; it throws an xml.parsers.expat.ExpatError as the XML is bad: # Get a Last.fm user's library. # http://www.last.fm/api/show?service=323 import xmlrpc.client import xml.etree server = xmlrpc.client.ServerProxy('http://ws.audioscrobbler.com/2.0/') parameters = {'api_key': 'b25b959554ed76058ac220b7b2e0a026', 'user': 'joanofarctan', 'page': 1} tracks = server.library.getTracks(parameters) tracks_xml = xml.etree.ElementTree.parse(tracks) # Should get xml.parsers.expat.ExpatError: XML declaration not well-formed: line 1, column 14. # (Line 1, column 14 is a backslash: ?xml version=\1.0\ encoding=\utf-8\?.) I'm running Python 3.1.2 (r312:79149, Mar 20 2010, 22:55:39) [MSC v.1500 64 bit (AMD64)] on win32. -- components: Library (Lib) files: serverproxy_test.py messages: 126552 nosy: beaumartinez priority: normal severity: normal status: open title: ServerProxy returns bad XML type: compile error versions: Python 3.1 Added file: http://bugs.python.org/file20455/serverproxy_test.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10950 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9509] argparse FileType raises ugly exception for missing file
SilentGhost ghost@gmail.com added the comment: Here is the single patch. All tests pass. -- Added file: http://bugs.python.org/file20456/argparse.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9509 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9509] argparse FileType raises ugly exception for missing file
Changes by SilentGhost ghost@gmail.com: Removed file: http://bugs.python.org/file19827/test_argparse.py.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9509 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9509] argparse FileType raises ugly exception for missing file
Changes by SilentGhost ghost@gmail.com: Removed file: http://bugs.python.org/file19805/argparse.py.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9509 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10948] Trouble with dir_util created dir cache
Diego Queiroz queiroz.di...@gmail.com added the comment: Suppose the application creates one folder and add some data to it: - /scratch/a/b/c While the application is still running (it is not using the folder anymore), you see the data, copy it to somewhere and delete everything manually using the terminal. After some time, (maybe a week or a month later, it doesn't really matter) the application wants to write again on that folder, but ops, the folder was removed. As application is very well coded :-), it checks for that folder and note that it doesn't exist anymore and needs to be recreated. But, when the application try to do so, nothing happens, because the cache is not updated. ;/ Maybe distutils package was not designed for the purpose I am using it (I am not using it to install python modules or anything), but this behavior is not well documented anyway. If you really think the cache is important, two things need to be done: 1) Implement a way to update/clear the cache 2) Include details about the cache and its implications on distutils documentation -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10948 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10935] wsgiref.handlers.BaseHandler and subclasses of str
Phillip J. Eby p...@telecommunity.com added the comment: One of the original reasons was to make it easier for server authors writing C code to interface with WSGI. C APIs that operate on lists and dicts often do not do what you would expect, when called on a subclass. Essentially, this could lead to an app that appears to work correctly on one server, but breaks strangely when run on another. (IOW, Python's C API and built-in types often break the Liskov principle: there are C-level operations that don't call back into Python subclass methods, so overriding just a few methods usually doesn't work as expected.) Another reason was to avoid having to document precisely which methods of a str, list, etc. are required to be implemented. (This is somewhat easier now that we have abc's, but really, it's still a royal PITA.) In any event, it's entirely moot now, six years later. Any change requests should be sent to the Web-SIG for WSGI 2.0 discussion, as changing the existing PEPs is not an option. (Guido has pronounced that I cannot change PEP 333 in any way, so even if I agreed with the requests in this thread, there is simply no way that wsgiref is changing in 2.x. PEP has just been approved as well, so the odds of even a 3.x change are low. But as I said, I won't object to a Headers patch that *converts* its non-conforming inputs to objects of type str, as long as they were stringlike objects to start with.) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10935 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10887] Add link to development ML
anatoly techtonik techto...@gmail.com added the comment: Backlink to project web site won't hurt either. ;) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10887 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10934] imaplib: Internaldate2tuple() is documented to return UTC, but it returns local time
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: It makes sense that Internaldate2tuple() returns local time because timetuple (with its tm_isdst flag) strongly suggests local time. (See also issue 9004.) If UTC or any other timezone time is needed, it would be best to provide a function that would return an aware datetime object. I made some changes to Joe's patch in attached diff. I would appreciate another pair of eyes to look at it before I commit. -- nosy: +belopolsky resolution: - accepted stage: - commit review Added file: http://bugs.python.org/file20457/issue10934.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10934 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9509] argparse FileType raises ugly exception for missing file
akira 4kir4...@gmail.com added the comment: no such file or directory '%s' is misleading if you are trying to open a readonly file for writing. The message might be replace by: can't open '%s' -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9509 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9509] argparse FileType raises ugly exception for missing file
Changes by SilentGhost ghost@gmail.com: Added file: http://bugs.python.org/file20458/argparse.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9509 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9509] argparse FileType raises ugly exception for missing file
Changes by SilentGhost ghost@gmail.com: Removed file: http://bugs.python.org/file20456/argparse.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9509 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10934] imaplib: Internaldate2tuple() is documented to return UTC, but it returns local time
Joe Peterson j...@skyrush.com added the comment: Hey Alexander, Looks great. Just a few small things: * In hunk 2 of the imaplib.rst file patch section, insert word to (i.e. Convert *date_time* to an IMAP4 ``INTERNALDATE`` representation.) * Two lines, down there's only one space at end of sentence: double-quotes). The (all other places have 2 spaces). * In first hunk of imaplib.py patch section, there is a period that does not belong after tuple: time.struct_time tuple. or None That's all I saw! Thanks for expanding on the doc! -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10934 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10934] imaplib: Internaldate2tuple() is documented to return UTC, but it returns local time
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: Committed in revision 88114. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10934 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10906] wsgiref should mention that CGI scripts usually expect HTTPS variable to be set to 'on'
Georg Brandl ge...@python.org added the comment: The doc says 1, yes or on. Looks fine to me. -- nosy: +georg.brandl resolution: - works for me status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10906 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10887] Add link to development ML
Éric Araujo mer...@netwok.org added the comment: What’s the project Web site? In any case, the wiki is open to edition to everyone. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10887 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10944] ctypes documentation does not mention c_bool in table of standard types
Georg Brandl ge...@python.org added the comment: Fixed in r88115. -- nosy: +georg.brandl resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10944 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10950] ServerProxy returns bad XML
Changes by Beau beaumarti...@gmail.com: -- type: compile error - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10950 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10948] Trouble with dir_util created dir cache
Éric Araujo mer...@netwok.org added the comment: “Maybe distutils package was not designed for the purpose I am using it (I am not using it to install python modules or anything), but this behavior is not well documented anyway.” Aaaah, I had no idea you were using the function directly for something unrelated to distutils’s purpose. There is no clear distinction between public and private functions in distutils, so I understand how you could find this seemingly useful function and use it in your code. The solution is to use a public function like os.makedirs. For distutils, I don’t think a doc change is needed: the cache is an implementation detail. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10948 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10950] ServerProxy returns bad XML
Georg Brandl ge...@python.org added the comment: Not sure what you mean by non-marshallable type. The Last.fm API returns the XML as an XMLRPC string, including the backslashes. I tried the same call in Ruby using the script below, and get the backslashes too. I would say this is a fault of Last.fm's XMLRPC server. Ruby code: require 'xmlrpc/client' cl = XMLRPC::Client.new2 'http://ws.audioscrobbler.com/2.0/' puts cl.call('library.getTracks', {'api_key' = 'b25b959554ed76058ac220b7b2e0a026', 'user' = 'joanofarctan', 'page' = 1}) -- nosy: +georg.brandl resolution: - invalid status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10950 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10950] ServerProxy returns bad XML
Beau beaumarti...@gmail.com added the comment: Thanks for your time, georg.brandl. I'll file a bug report with them. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10950 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10950] ServerProxy returns bad XML
Georg Brandl ge...@python.org added the comment: BTW, you might want to exchange your API key since this one is now publicly available forever :) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10950 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10948] Trouble with dir_util created dir cache
Diego Queiroz queiroz.di...@gmail.com added the comment: You were right, os.makedirs fits my needs. :-) Anyway, I still think the change in the documentation is needed. This is not an implementation detail, it is part of the way the function works. The user should be aware of the behavior when he call this function twice. In my opinion, the documentation should be clear about everything. We could call this an implementation detail iff it does not affect anything externally, but this is not the case (it affects subsequent calls). This function does exactly the same of os.makedirs but the why is discribed only in a comment inside the code. We know this is a poor programming style. This information need to be available in the documentation too. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10948 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10948] Trouble with dir_util created dir cache
Éric Araujo mer...@netwok.org added the comment: “This is not an implementation detail, it is part of the way the function works. The user should be aware of the behavior when [they] call this function twice.” I would agree if mkpath were a public function. I think it’s an implementation detail used by other distutils code, especially commands. Considering that dir_util is gone in distutils2, I see no benefit in editing the doc. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10948 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10934] imaplib: Internaldate2tuple() is documented to return UTC, but it returns local time
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: Merged to 2.7 in revision 88116. -- stage: commit review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10934 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10951] gcc 4.6 warnings
New submission from STINNER Victor victor.stin...@haypocalc.com: To analyze #9880, I installed gcc-4.6. It looks like this new gcc version emits new warnings. Here is a report of py3k warnings generated with gcc-4.6 -O3 -Wall -Wextra -Wstrict-prototypes -Wno-missing-field-initializers -Wno-unused-parameter on AMD64. I grouped manually the warnings. sign-compare: Parser/node.c: In function 'PyNode_AddChild': Parser/node.c:94:31: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] Objects/bytesobject.c: In function 'PyBytes_FromStringAndSize': Objects/bytesobject.c:95:14: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] Objects/floatobject.c: In function 'PyFloat_ClearFreeList': Objects/floatobject.c:1960:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] Objects/floatobject.c:1970:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] Objects/floatobject.c: In function 'PyFloat_Fini': Objects/floatobject.c:2014:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] Objects/memoryobject.c: In function '_indirect_copy_nd': Objects/memoryobject.c:199:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] Objects/tupleobject.c: In function 'PyTuple_New': Objects/tupleobject.c:85:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] Objects/typeobject.c: In function 'PyType_FromSpec': Objects/typeobject.c:2339:17: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] Objects/unicodeobject.c: In function '_PyUnicode_New': Objects/unicodeobject.c:326:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] Objects/unicodeobject.c: In function 'PyUnicodeUCS2_AsWideCharString': Objects/unicodeobject.c:1288:42: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] Objects/unicodeobject.c: In function 'PyUnicodeUCS2_DecodeFSDefaultAndSize': Objects/unicodeobject.c:1804:37: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] Objects/unicodeobject.c: In function 'PyUnicodeUCS2_FSConverter': Objects/unicodeobject.c:1851:14: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] Objects/unicodeobject.c: In function 'PyUnicodeUCS2_FSDecoder': Objects/unicodeobject.c:1892:14: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] Objects/unicodeobject.c: In function 'PyUnicode_AsUnicodeCopy': Objects/unicodeobject.c:10336:37: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] Python/asdl.c: In function 'asdl_seq_new': Python/asdl.c:12:30: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] Python/asdl.c: In function 'asdl_int_seq_new': Python/asdl.c:43:30: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] Parser/printgrammar.c: In function 'printdfas': Parser/printgrammar.c:96:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] Parser/pgenmain.c: In function 'getgrammar': Parser/pgenmain.c:102:27: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] Python/bltinmodule.c: In function 'source_as_string': Python/bltinmodule.c:528:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] Python/getargs.c: In function 'convertsimple': Python/getargs.c:876:28: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] Python/getargs.c:993:43: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] Python/pythonrun.c: In function 'print_error_text': Python/pythonrun.c:1352:34: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] ./Python/sysmodule.c: In function 'svnversion_init': ./Python/sysmodule.c:1367:9: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] Python/traceback.c: In function '_Py_FindSourceFile': Python/traceback.c:191:29: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] Python/dtoa.c: In function 'Balloc': Python/dtoa.c:349:56: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] Python/thread_pthread.h: In function 'PyThread_create_key': Python/thread_pthread.h:592:22: warning: signed and unsigned type in conditional expression [-Wsign-compare] Python/compile.c: In function 'compiler_import_as': Python/compile.c:2076:49: warning: signed and unsigned type in conditional expression [-Wsign-compare] Python/compile.c: In function 'assemble_init': Python/compile.c:3619:17: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
[issue10951] gcc 4.6 warnings
Changes by STINNER Victor victor.stin...@haypocalc.com: -- components: +Build versions: +Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10951 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10951] gcc 4.6 warnings
Changes by Brett Cannon br...@python.org: -- nosy: +brett.cannon ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10951 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10939] imaplib: Internaldate2tuple raises KeyError parsing month and does not work with negative TZ offset due to bytes/str issues
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: Georg, This is an obvious artifact of an untested py3k port. Can this go in 3.2? The patch looks good except for a long line in the test which I can take care of. -- assignee: - belopolsky nosy: +belopolsky, georg.brandl stage: - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10939 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10941] imaplib: Internaldate2tuple produces wrong result if date is near a DST change
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: I agree that this is a bug and the solution is right, I am not sure this should be applied during RC period. The bug has been present and known for a long time, so affected parties probably have a work-around in place already. -- nosy: +belopolsky, georg.brandl stage: - patch review versions: +Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10941 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10947] imaplib: Internaldate2tuple and ParseFlags require (and latter returns) bytes arrays; should allow/return str
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: David, Can you weigh in on this? I am -1 on improving Internaldate2tuple(). I think the module should provide a function that would return an aware datetime object instead of a timetuple. The proposed patch will make error reporting from Internaldate2tuple() inconsistent: invalid bytes result in None return while non-ASCII characters in strings would raise an encoding error. While I don't like the if not mo: return None logic, if compatibility with 2.x is the goal, encoding errors should be caught and converted to return None. -- nosy: +belopolsky, r.david.murray type: behavior - feature request versions: +Python 3.3 -Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10947 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10947] imaplib: Internaldate2tuple and ParseFlags require (and latter returns) bytes arrays; should allow/return str
Changes by Alexander Belopolsky belopol...@users.sourceforge.net: -- stage: - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10947 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10923] Python 2.7 hangs on Unicode+threading
Changes by Brett Cannon br...@python.org: -- nosy: +brett.cannon ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10923 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10950] ServerProxy returns bad XML
Beau beaumarti...@gmail.com added the comment: Use my API key? That would have been telling! Fortunately I used the example API key Last.fm provide on the page I linked ;) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10950 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10951] gcc 4.6 warnings
Terry J. Reedy tjre...@udel.edu added the comment: I took a look at an example of each type. Sign-compare, Parser/node.c, 94 if (required_capacity PY_SIZE_MAX / sizeof(node)) I presume PY_SIZE_MAX and sizeof(node) are both unsigned. So is, conceptually, required_capacity, but it is defined as an int because it is defined with XXXROUNDUP() and hence fancy_roundup(), which returns -1 if n1-n_nchildren is so large that the smallest power of 2 larger is too big for an int. The comparison is 'OK' in context in that it is preceded by and guarded by if (current_capacity 0 || required_capacity 0) return E_OVERFLOW; If I had written this, I might have thought about replacing all the comparisons with one check of n1-n_nchildren against some reasonable limit calculated from PY_SIZE_MAX / sizeof(node), and making both capacities unsigned. --- Unused, Parser/parsetok.c, 130: local vars handling_with and handling_import are both set to 0 both here and again on line 157 and not seen elsewhere in the file. I presume both could just be deleted both places. --- Empty body, pgen, multiple places: those I checked are appearances of the REQN() macro. The REQ() macro did not generate a warning. #ifdef Py_DEBUG #define REQN(i, count) \ if (i count) { \ fprintf(stderr, REQNFMT, count); \ Py_FatalError(REQN); \ } else #else #define REQN(i, count) /* empty */ #endif Since all invocations of REQN look like REQN(i, 1);, I presume the 'else' is there to swallow up the ';' which is added to make macro calls look like statements with a function call. I guess this is a style issue. As I remember, the suggestion to simply add '{}' to the macro would make syntax errors. --- Uninitialized, Objects/setobject.c, 2445, in test_c_api: while (_PySet_NextEntry((PyObject *)dup, i, x, hash)) { s = _PyUnicode_AsString(x); I presume x is set by _PySet... . (If i and hash are also, they are not used). So 'may be' but not actually. --- Conclusion: the 'fix' is some real cleanup, some warning suppression. -- nosy: +terry.reedy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10951 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10952] Don't normalize module names to NFKC?
New submission from STINNER Victor victor.stin...@haypocalc.com: The Python 3 parser normalizes all identifiers using NFKC (as described in the PEP 3131). Examples: - U+00B5 (µ: Micro sign) is normalized to U+03BC (μ: Greek small letter mu) - U+FB03 (ffi: Latin small ligature ffi) is normalized to 'ffi' The problem is that it does also normalize module names, but not the filename. The module name in the Python source code is written with the keyboard (eg. U+00B5 in my case) and then normalized to NFKC (= U+03BC). The filename is also written using the keyboard (U+00B5), but it is never normalized. Attached script tests the current behaviour using µTorrent name with U+00B5 and U+03BC: import with U+00B5 or U+03BC use the filename with U+03BC. The problem is that I'm able to write 'µ' (U+00B5) with my keyboard, but not U+03BC (μ). -- components: Interpreter Core, Unicode files: module_name.py messages: 126577 nosy: haypo priority: normal severity: normal status: open title: Don't normalize module names to NFKC? versions: Python 3.1, Python 3.2, Python 3.3 Added file: http://bugs.python.org/file20459/module_name.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10952 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10946] bdist doesn’t pass --skip-build on to subcommands
Éric Araujo mer...@netwok.org added the comment: I added the required calls to pass skip-build from bdist to bdist_* but that isn’t enough to make the test from https://bitbucket.org/ygingras/distutils2/changeset/71f5c39c9100 pass. build gets somehow called, even though install, install_lib, bdist and bdist_dumb have skip_build set to 0. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10946 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10952] Don't normalize module names to NFKC?
Changes by Alexander Belopolsky belopol...@users.sourceforge.net: -- nosy: +belopolsky ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10952 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10952] Don't normalize module names to NFKC?
STINNER Victor victor.stin...@haypocalc.com added the comment: µTorrent.py filename example comes from #10754. This issue is unrelated to the Python parser or the import machinery: it is a surprising behaviour of the MBCS codec which replaces unencodable characters to a similar glyph. I changed the MBCS in Python 3.2 to be strict (it now raises an error on unencodable character). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10952 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10952] Don't normalize module names to NFKC?
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: This proposal makes sense because it would make import µTorrent behave the same as µTorrent = __import__('µTorrent') However, I think this is a feature request and a language change because the current grammar is import_stmt ::= import module .. module ::= (identifier .)* identifier and in order to implement the proposed feature, module will have to become a separate AST node that won't be treated as identifier. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10952 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10952] Don't normalize module names to NFKC?
STINNER Victor victor.stin...@haypocalc.com added the comment: New problem: if the parser doesn't normalize module names on import, it does still normalize module names on other instructions. Example: import \xB5Torrent; del \xB5Torrent raises an error on del because the parser normalized del identifier (the second module name) = import \xB5Torrent; del \u03BCTorrent. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10952 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10952] Don't normalize module names to NFKC?
STINNER Victor victor.stin...@haypocalc.com added the comment: See also #3080 (which is not directly related). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10952 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10951] gcc 4.6 warnings
Changes by Jesús Cea Avión j...@jcea.es: -- nosy: +jcea ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10951 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10952] Don't normalize module names to NFKC?
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: On Wed, Jan 19, 2011 at 9:21 PM, STINNER Victor rep...@bugs.python.org wrote: .. New problem: if the parser doesn't normalize module names on import, it does still normalize module names on other instructions. Example: import \xB5Torrent; del \xB5Torrent raises an error on del because the parser normalized del identifier (the second module name) = import \xB5Torrent; del \u03BCTorrent. This won't be a problem if you make import \xB5Torrent behave as \xB5Torrent = __import__('\xB5Torrent'). The latter is equivalent to \u03BCTorrent = __import__('\xB5Torrent'). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10952 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10952] Don't normalize module names to NFKC?
STINNER Victor victor.stin...@haypocalc.com added the comment: This won't be a problem if you make import \xB5Torrent behave as (...) \u03BCTorrent = __import__('\xB5Torrent') import name is compiled to IMPORT_NAME(name); STORE_NAME(name) bytecode instructions. So you proposed to compile it to IMPORT_NAME(name); STORE_NAME(normalized_name) if name is different than the normalized name. Ok, I think that it is possible. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10952 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10923] Deadlock because of the import lock when loading the utf8 codec
Changes by STINNER Victor victor.stin...@haypocalc.com: -- title: Python 2.7 hangs on Unicode+threading - Deadlock because of the import lock when loading the utf8 codec ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10923 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10923] Deadlock because of the import lock when loading the utf8 codec
STINNER Victor victor.stin...@haypocalc.com added the comment: Dummy question: can't we raise a RuntimeError on a deadlock? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10923 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10953] safely eval serialized dict/list data from arbitrary string over web with no side effects
New submission from kai zhu kai...@ugcs.caltech.edu: rather than serialize python dicts list to json / xml / protocol buffer for web use, its more efficient to just serialize w/ repr() then use eval(), if only there was a way to guarantee arbitrary code can't b executed. this is a very simple proposed method for the latter. b4 eval(), it compiles string to python code object checks for: 1. co_names list can only contain 'False', 'None', 'True' -this ensures no function call can b made 2. co_consts list cannot contain code objects -embedded lambda's r forbidden. 3. grave accents are explicitly forbidden. here is the code for both python2.5 (intended for google appengine) python 3k: ## safe_eval.py import sys, types if sys.version_info[0] == 2: ## py2x _co_safe = 'co_argcount co_nlocals co_varnames co_filename co_freevars co_cellvars'.split(' ') else: ## py3k _co_safe = 'co_argcount co_kwonlyargcount co_nlocals co_names co_varnames co_filename co_freevars co_cellvars'.split(' ') ## safely eval string with no side-effects def safe_eval(ss): if not ss: return None if '`' in ss: raise ValueError('grave accent ` forbidden') cc = compile(ss, '', 'eval') for aa in _co_safe: if getattr(cc, aa): raise ValueError(aa + ' must be empty / none / zero') for aa in cc.co_names: if aa not in ['False', 'None', 'True']: raise ValueError('co_names can only contain False, None, True') for aa in cc.co_consts: if isinstance(aa, types.CodeType): raise TypeError('code objects not allowed in co_consts') return eval(cc, {}) python2.5 Python 2.5.5 (r255:77872, Nov 28 2010, 19:00:19) [GCC 4.4.5] on linux2 Type help, copyright, credits or license for more information. from safe_eval import safe_eval safe_eval('[False, None, True, {1:2}]') [False, None, True, {1: 2}] safe_eval('[None, False, True, {1:2}, evil_code()]') Traceback (most recent call last): File stdin, line 1, in module File safe_eval.py, line 19, in safe_eval if aa not in ['False', 'None', 'True']: raise ValueError('co_names can only contain False, None, True') ValueError: co_names can only contain False, None, True safe_eval('[None, False, True, {1:2}, `evil_code()`]') Traceback (most recent call last): File stdin, line 1, in module File safe_eval.py, line 14, in safe_eval if '`' in ss: raise ValueError('grave accent ` forbidden') ValueError: grave accent ` forbidden safe_eval('[None, False, True, {1:2}, lambda: evil_code()]') Traceback (most recent call last): File stdin, line 1, in module File safe_eval.py, line 21, in safe_eval if isinstance(aa, types.CodeType): raise TypeError('code objects not allowed in co_consts') TypeError: code objects not allowed in co_consts -- components: Library (Lib) messages: 126586 nosy: kaizhu priority: normal severity: normal status: open title: safely eval serialized dict/list data from arbitrary string over web with no side effects type: feature request versions: Python 2.5, Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10953 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10952] Don't normalize module names to NFKC?
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: Victor Ok, I think that it is possible. While it is possible, I am not sure it is a good idea. For example, if a filesystem uses encoding that is capable of distinguishing between \xB5Torrent.py and \u03BCTorrent.py, should import \xB5Torrent and import \u03BCTorrent import different modules? -- nosy: +loewis ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10952 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3080] Full unicode import system
Changes by Alexander Belopolsky belopol...@users.sourceforge.net: -- nosy: +belopolsky ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3080 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6059] uuid.uuid4 cause segfault in emesene
Ross Lagerwall rosslagerw...@gmail.com added the comment: I tried to reproduce the bug on 2.7 3.2 using libuuid version 2.17.2 and up to 100 threads but couldn't. Perhaps there was an issue with the uuid library function that he was using and threading? -- nosy: +rosslagerwall ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6059 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10953] safely eval serialized dict/list data from arbitrary string over web with no side effects
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: rather than serialize python dicts list to json ... its more efficient to just serialize w/ repr() then use eval() Do you have benchmarks that support this claim? -- nosy: +belopolsky versions: -Python 2.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10953 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10952] Don't normalize module names to NFKC?
Martin v. Löwis mar...@v.loewis.de added the comment: I think this issue falls into a similar category as support for case-insensitive but case-preserving file systems. Python uses regular file system lookups, but then may need to verify whether it got the right one. I'd like to request that PEP 3131 is followed as it stands: identifier lookup uses NFKC, period. This gives two issues: a) how can users make sure that they name the files correctly? and b) what if the file system implementation mangles file names. For b), I'd use the same approach as with case-insensitive lookups: verify that the file we read is really the one we want. For a), wrt. I'm not able to write U+03BC with my keyboard, I say tough luck - don't use that character in a module name, then. Somebody with a Greek keyboard will have no problems doing that. This is really the same as any other non-ASCII character which you are unable to type: it just means that you can't conveniently enter the respective Python identifier. Just try importing саша, for example. Get a different keyboard. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10952 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10953] safely eval serialized dict/list data from arbitrary string over web with no side effects
Georg Brandl ge...@python.org added the comment: Have a look at ast.literal_eval(). -- nosy: +georg.brandl resolution: - works for me status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10953 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10952] Don't normalize module names to NFKC?
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: On Thu, Jan 20, 2011 at 1:19 AM, Martin v. Löwis rep...@bugs.python.org wrote: .. I'd like to request that PEP 3131 is followed as it stands: identifier lookup uses NFKC, period. This gives two issues: a) how can users make sure that they name the files correctly? and b) what if the file system implementation mangles file names. There is also issue c) what if the filesystem encoding can only represent a compatibility character, say U+00B5, but not its NFKC equivalent, U+03BC? Suppose you have a system with both locale and FS encodings being Latin-1. You can write Python code using Latin-1 and the following is valid bytestream: b'# encoding: latin-1\nimport \xB5Torrent\n However, this code will always fail because '\xB5Torrent' will be normalized into '\u03BCTorrent' and a file named '\u03BCTorrent.py' cannot be created on a filesystem with Latin-1 encoding. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10952 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7198] Extraneous newlines with csv.writer on Windows
John Machin sjmac...@lexicon.net added the comment: docpatch for 3.x csv docs: In the csv.writer docs, insert the sentence If csvfile is a file object, it should be opened with newline=''. immediately after the sentence csvfile can be any object with a write() method. In the closely-following example, change the open call from open('eggs.csv', 'w') to open('eggs.csv', 'w', newline=''). In section 13.1.5 Examples, there are 2 reader cases and 1 writer case that likewise need inserting , newline='' in the open call. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7198 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com