[issue12911] Expose a private accumulator C API
Martin v. Löwis mar...@v.loewis.de added the comment: I'm -1 on this approach; I don't think yet another container type is the right solution, given that we have already plenty of them. If you want to avoid creating large lists, then the StringIO type should already provide that. So I wonder why these functions couldn't be rewritten to use StringIO. If you really want to use this approach, I'd try to avoid allocating the large list if there are only few substrings. I.e. allocate it only when flushing, and only if the flush is not the final flush. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12911 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12924] Missing call to quote_plus() in test_urllib.test_default_quoting()
Changes by Senthil Kumaran sent...@uthcode.com: -- assignee: - orsenthil nosy: +orsenthil ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12924 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1043134] Add preferred extensions for MIME types
Leo Shklovskii l...@thermopylae.net added the comment: I'm running into a similar issue with this function. My bug is that get_type('foo.png') returns image/x-png. This occurs on windows because there are mappings to both image/png and image/x-png in the registry (as there should be, since that key is actually a reverse mapping) and the code simply picks the first key that it enumerates over. This issue strikes in both directions. Chris and others bring up a valid issue: how to decide what the winning result is? I think the answer is pretty clear - you use the common_types mapping already in the file and expand it as appropriate. If the mimetype can't be found, only then do you go to the windows registry. The behavior on Linux is even stranger to me (now we'll dig through an arbitrary list of files that might contain MIME info or may have completely irrelevant data) but it's a pragmatic solution. If someone needs to customize what guess_type returns, they can simply wrap the guess_type function in their own code or monkey patch if they don't have access to the source they're running. Changing such a mime type is a really advanced and unusual operation. If that's unacceptable, the code can provide a hook for an 'apache MIME config' file on windows in a standard place (either pythonpath, or %system% or wherever) that it will check before going to common_types or to the registry. Making this change doesn't require changing the API at all, just the implementation changes. -- nosy: +leos versions: +Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1043134 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12925] python setup.py upload_docs doesn't ask for login and password
New submission from Sergei Stolyarov ser...@regolit.com: python setup.py upload_docs doesn't ask for login and password instead it prints Upload failed (401): You must be identified to edit package information Works only with valid ~/.pypirc -- assignee: tarek components: Distutils messages: 143666 nosy: cancel, eric.araujo, tarek priority: normal severity: normal status: open title: python setup.py upload_docs doesn't ask for login and password type: behavior versions: Python 2.6, Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12925 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12926] tarfile tarinfo.extract*() broken with symlinks
New submission from Fabio Erculiani lx...@sabayonlinux.org: TarFile.makelink() is plain broken. Test file: http://git.sabayon.org/entropy.git/tree/libraries/tests/packages/amarok-2.2.2.90.tbz2 _extract_member calls makelink which does os.symlink() and then falls to the else branch and calls back _extract_member(), which calls makelink() which calls os.symlink() and causes errno 17. ERROR: test_db_insert_compare_match_mime (__main__.EntropyRepositoryTest) -- Traceback (most recent call last): File db.py, line 490, in test_db_insert_compare_match_mime data = self.Spm.extract_package_metadata(test_pkg) File ../entropy/spm/plugins/interfaces/portage_plugin/__init__.py, line 1038, in extract_package_metadata extract_path = pkg_dir, catch_empty = False) File ../entropy/tools.py, line 2088, in uncompress_tarball tar.extract(tarinfo, encoded_path) File /usr/lib64/python3.2/tarfile.py, line 2174, in extract set_attrs=set_attrs) File /usr/lib64/python3.2/tarfile.py, line 2258, in _extract_member self.makelink(tarinfo, targetpath) File /usr/lib64/python3.2/tarfile.py, line 2358, in makelink targetpath) File /usr/lib64/python3.2/tarfile.py, line 2258, in _extract_member self.makelink(tarinfo, targetpath) File /usr/lib64/python3.2/tarfile.py, line 2341, in makelink os.symlink(tarinfo.linkname, targetpath) OSError: [Errno 17] File exists -- components: Library (Lib) messages: 143667 nosy: Fabio.Erculiani priority: normal severity: normal status: open title: tarfile tarinfo.extract*() broken with symlinks type: crash versions: Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12926 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12919] Control what module is imported first
Thomas Wouters tho...@python.org added the comment: Here's the patch implementing this, which I'd attached to Issue11561 (although I noticed 'hg diff' omitted the empty stdlib_landmark.py file.) -- keywords: +patch nosy: +twouters Added file: http://bugs.python.org/file23113/stdlib_landmark.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12919 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12911] Expose a private accumulator C API
Antoine Pitrou pit...@free.fr added the comment: I'm -1 on this approach; I don't think yet another container type is the right solution, given that we have already plenty of them. It's not a container type, just a small C struct that gets allocated on the stack. Think of it as a library, like stringlib. If you want to avoid creating large lists, then the StringIO type should already provide that. So I wonder why these functions couldn't be rewritten to use StringIO. That's another possibility. But we'd have to expose a C API anyway, and this one is as good as any other. Note that StringIO will copy data twice (once when calling write(), once when calling getvalue()), while ''.join() only once (at the end, when concatenating all strings). If you really want to use this approach, I'd try to avoid allocating the large list if there are only few substrings. I.e. allocate it only when flushing, and only if the flush is not the final flush. That's possible, indeed. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12911 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12927] test_ctypes: segfault with suncc
New submission from Stefan Krah stefan-use...@bytereef.org: stefan@opensolaris:~/hg/cpython$ ./python -m test -uall -v test_ctypes == CPython 3.3.0a0 (default:5c8b6e03ebfe, Sep 7 2011, 13:41:08) [C] == Solaris-2.11-i86pc-i386-32bit little-endian == /export/home/stefan/hg/cpython/build/test_python_28849 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) [1/1] test_ctypes test_cast (ctypes.test.test_memfunctions.MemFunctionsTest) ... ok test_memmove (ctypes.test.test_memfunctions.MemFunctionsTest) ... ok test_memset (ctypes.test.test_memfunctions.MemFunctionsTest) ... ok test_string_at (ctypes.test.test_memfunctions.MemFunctionsTest) ... ok test_wstring_at (ctypes.test.test_memfunctions.MemFunctionsTest) ... ok test_chararray (ctypes.test.test_delattr.TestCase) ... ok test_simple (ctypes.test.test_delattr.TestCase) ... ok test_struct (ctypes.test.test_delattr.TestCase) ... ok test_struct_by_value (ctypes.test.test_win32.Structures) ... ok test_buffers (ctypes.test.test_unicode.StringTestCase) ... ok test_func (ctypes.test.test_unicode.StringTestCase) ... ok test_wcslen (ctypes.test.test_unicode.StringTestCase) ... ok test_buffers (ctypes.test.test_unicode.UnicodeTestCase) ... ok test_wcslen (ctypes.test.test_unicode.UnicodeTestCase) ... ok test_compare (ctypes.test.test_simplesubclasses.Test) ... ok test_ignore_retval (ctypes.test.test_simplesubclasses.Test) ... Fatal Python error: Segmentation fault Current thread 0x0001: File /export/home/stefan/hg/cpython/Lib/ctypes/test/test_simplesubclasses.py, line 24 in test_ignore_retval File /export/home/stefan/hg/cpython/Lib/unittest/case.py, line 386 in _executeTestPart File /export/home/stefan/hg/cpython/Lib/unittest/case.py, line 441 in run File /export/home/stefan/hg/cpython/Lib/unittest/case.py, line 493 in __call__ File /export/home/stefan/hg/cpython/Lib/unittest/suite.py, line 105 in run File /export/home/stefan/hg/cpython/Lib/unittest/suite.py, line 67 in __call__ File /export/home/stefan/hg/cpython/Lib/unittest/suite.py, line 105 in run File /export/home/stefan/hg/cpython/Lib/unittest/suite.py, line 67 in __call__ File /export/home/stefan/hg/cpython/Lib/unittest/suite.py, line 105 in run File /export/home/stefan/hg/cpython/Lib/unittest/suite.py, line 67 in __call__ File /export/home/stefan/hg/cpython/Lib/unittest/runner.py, line 168 in run File /export/home/stefan/hg/cpython/Lib/test/support.py, line 1293 in _run_suite File /export/home/stefan/hg/cpython/Lib/test/support.py, line 1327 in run_unittest File /export/home/stefan/hg/cpython/Lib/test/test_ctypes.py, line 13 in test_main File /export/home/stefan/hg/cpython/Lib/test/regrtest.py, line 1140 in runtest_inner File /export/home/stefan/hg/cpython/Lib/test/regrtest.py, line 916 in runtest File /export/home/stefan/hg/cpython/Lib/test/regrtest.py, line 708 in main File /export/home/stefan/hg/cpython/Lib/test/__main__.py, line 13 in module File /export/home/stefan/hg/cpython/Lib/runpy.py, line 73 in _run_code File /export/home/stefan/hg/cpython/Lib/runpy.py, line 160 in _run_module_as_main Segmentation Fault (core dumped) -- components: ctypes messages: 143670 nosy: skrah priority: normal severity: normal status: open title: test_ctypes: segfault with suncc type: crash versions: Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12927 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12927] test_ctypes: segfault with suncc
STINNER Victor victor.stin...@haypocalc.com added the comment: Code of the test: from ctypes import * def test_ignore_retval(self): # Test if the return value of a callback is ignored # if restype is None proto = CFUNCTYPE(None) def func(): return (1, abc, None) cb = proto(func) self.assertEqual(None, cb()) The crash occurs on self.assertEqual(None, cb()). I suppose that it occurs on cb(). Is CFUNCTYPE correct? Or should it be PYFUNCTYPE? -- nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12927 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12928] exec not woking in unittest
New submission from simon ext-simon.stei...@nokia.com: works in 2.6, fails in 3.2.2 import unittest class MyTest(unittest.TestCase): def test_a(self): exec(compile(a = 1, '', 'single')) assert a == 1 if __name__ == '__main__': unittest.main() -- components: Library (Lib) messages: 143672 nosy: simonsteiner priority: normal severity: normal status: open title: exec not woking in unittest type: compile error versions: Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12928 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12928] exec not woking in unittest
simon ext-simon.stei...@nokia.com added the comment: seems i need to use exec(compile(a = 1, '', 'single'), globals()) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12928 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12928] exec not woking in unittest
simon ext-simon.stei...@nokia.com added the comment: Can't get this one working: import unittest class MyTest(unittest.TestCase): def test_a(self): b = 1 exec(compile(a = b + 1, '', 'single')) assert a == 2 if __name__ == '__main__': unittest.main() -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12928 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12922] StringIO and seek()
Changes by Pierre Quentel pierre.quen...@gmail.com: -- nosy: +quentel ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12922 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12895] In MSI/EXE installer, allow installing Python modules in free path
Changes by Jeremy Kloth jeremy.kloth+python-trac...@gmail.com: -- nosy: +jkloth ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12895 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12929] faulthandler: void pointer used in arithmetic
New submission from Stefan Krah stefan-use...@bytereef.org: Hi, suncc detected pointer arithmetic with a pointer to void: ./Modules/faulthandler.c, line 910: warning: pointer to void or function used in arithmetic ./Modules/faulthandler.c, line 911: warning: pointer to void or function used in arithmetic ./Modules/faulthandler.c, line 914: warning: pointer to void or function used in arithmetic ./Modules/faulthandler.c, line 916: warning: pointer to void or function used in arithmetic -- components: Extension Modules messages: 143675 nosy: haypo, skrah priority: normal severity: normal status: open title: faulthandler: void pointer used in arithmetic type: behavior versions: Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12929 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12912] xmlrpclib.__version__ not bumped with updates
Éric Araujo mer...@netwok.org added the comment: Unfortunately that update changed the interface of Transport.make_connection(), breaking any code that overrode or extended it. That’s a bad thing. Can you open a bug report about that? We need at least a documentation update. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12912 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12929] faulthandler: void pointer used in arithmetic
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset e91ad9669c08 by Victor Stinner in branch 'default': Issue #12929: faulthandler now uses char* for arithmetic on pointers http://hg.python.org/cpython/rev/e91ad9669c08 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12929 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12929] faulthandler: void pointer used in arithmetic
STINNER Victor victor.stin...@haypocalc.com added the comment: Does my commit fixed the warning? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12929 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12930] reindent.py inserts spaces in multiline literals
New submission from Dima Tisnek dim...@gmail.com: Given this as input: #!/usr/bin/python def x(): s = line one line two line three return s reindent.py changes it to: #!/usr/bin/python def x(): s = line one line two line three return s Which means that I cannot use reindent.py on any source that includes multiline literals that are not docs. Btw, it is generally weird that reindented file ends up with 2 spaces before line two. -- components: Demos and Tools messages: 143679 nosy: Dima.Tisnek priority: normal severity: normal status: open title: reindent.py inserts spaces in multiline literals type: behavior versions: Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12930 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12931] xmlrpclib confuses unicode and string
New submission from Wolfgang Schnerring wosc+pyt...@wosc.de: This is a similar issue to http://bugs.python.org/issue7093, but more insiduous: This works: xmlrpclib.ServerProxy(u'http://localhost:8080').foo(dict(baz=u'bär')) While this fails with a UnicodeDecodeError (note the trailing slash in the URI): xmlrpclib.ServerProxy(u'http://localhost:8080/').foo(dict(baz=u'bär')) File /usr/local/python2.7/lib/python2.7/httplib.py, line 937, in endheaders self._send_output(message_body) File /usr/local/python2.7/lib/python2.7/httplib.py, line 795, in _send_output msg += message_body UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 139: ordinal not in range(128) So, somewhere in xmlrpclib, confusion happens, since even though the URI is passed in as unicode both times, it is stored as string in the first case (thus compatible with the serialized, utf-8 encoded string of the message body), but in the second case it remains unicode (thus failing, as #7093 tells, which I personally wouldn't have closed wontfix). -- components: Library (Lib) messages: 143680 nosy: wosc priority: normal severity: normal status: open title: xmlrpclib confuses unicode and string type: behavior versions: Python 2.6, Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12931 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12870] Regex object should have introspection methods
Ezio Melotti ezio.melo...@gmail.com added the comment: Limiting the number of calls to re.match sounds like an optimization to me, and I still think that the methods you proposed are too specific. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12870 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12931] xmlrpclib confuses unicode and string
STINNER Victor victor.stin...@haypocalc.com added the comment: (thus failing, as #7093 tells, which I personally wouldn't have closed wontfix). I don't know the right encoding to encode a HTTP header. In Python 3, http.client.HTTPConnection.putheader() encodes header name to ASCII and header values to ISO-8859-1. -- nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12931 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12931] xmlrpclib confuses unicode and string
STINNER Victor victor.stin...@haypocalc.com added the comment: New patch using ISO-8859-1 instead of the default encoding (ASCII). -- keywords: +patch Added file: http://bugs.python.org/file23114/xmlrpclib_unicode_host-2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12931 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12929] faulthandler: void pointer used in arithmetic
STINNER Victor victor.stin...@haypocalc.com added the comment: Ok, thanks for the report. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12929 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12929] faulthandler: void pointer used in arithmetic
Stefan Krah stefan-use...@bytereef.org added the comment: Yes, the warning is gone. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12929 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12870] Regex object should have introspection methods
Éric Araujo mer...@netwok.org added the comment: I tend to agree with Ezio. Matt, maybe you could ask for other opinions on python-ideas? -- nosy: +eric.araujo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12870 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12922] StringIO and seek()
Changes by Antoine Pitrou pit...@free.fr: -- components: +IO stage: test needed - needs patch type: behavior - feature request ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12922 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12779] Update packaging documentation
Ezio Melotti ezio.melo...@gmail.com added the comment: 1) sounds good; 2) would be fine too if it makes your life easier; 3) doesn't seem too useful. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12779 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1492704] distinct error type from shutil.move()
Gennadiy Zlobin gennad.zlo...@gmail.com added the comment: Thanks for the comments! Here'a a new patch. -- Added file: http://bugs.python.org/file23115/new_patch.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1492704 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12870] Regex object should have introspection methods
Matt Chaput m...@whoosh.ca added the comment: Yes, it's an optimization of my code, not the regex, as I said. Believe me, it's not premature. I've listed two general use cases for the two methods. To me it seems obvious that having to test a large number of regexes against a string, and having to test a single regex against a large number of strings, are two very common programming tasks, and they could both be speeded up quite a bit using these methods. As of now my parsing code and other code such as PyParsing are resorting to hacks like requiring the user to manually specify the possible first chars of a regex at configuration. With the hacks, the code can be hundreds of times faster. But the hacks are error-prone and should be unnecessary. The PCRE library implements at least the first char functionality, and a lot more regex introspection that would be useful, through its pcre_fullinfo() function. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12870 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1492704] distinct error type from shutil.move()
Éric Araujo mer...@netwok.org added the comment: Thanks, looks good. There are a few minor cosmetic things I’ll change before committing. I assume you have tested it on Windows? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1492704 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12927] test_ctypes: segfault with suncc
Stefan Krah stefan-use...@bytereef.org added the comment: The segfault occurs both with CFUNCTYPE and PYFUNCTYPE in ffi_prep_incoming_args_SYSV(). I'm not very familiar with either suncc or the dbx debugger, and I can't get dbx to step into that function (compiled with -g, libffi is not stripped as far as I can see). Anyway, here's what I got: (dbx) stop at ffi.c:403 (2) stop at ffi.c:403 (dbx) run Running: python (process id 29932) Python 3.3.0a0 (default:5c8b6e03ebfe+, Sep 7 2011, 15:48:46) [C] on sunos5 Type help, copyright, credits or license for more information. from ctypes import * Reading _struct.so Reading libscf.so.1 Reading libuutil.so.1 Reading libgen.so.1 Reading libmd.so.1 Reading libmp.so.2 proto = CFUNCTYPE(None) def func(): return (1, abc, None) ... cb = proto(func) cb() stopped in ffi_closure_SYSV_inner at line 403 in file ffi.c 403 ffi_prep_incoming_args_SYSV(args, respp, arg_area, cif); (dbx) step signal SEGV (no mapping at the fault address) in ffi_closure_SYSV_inner at line 403 in file ffi.c 403 ffi_prep_incoming_args_SYSV(args, respp, arg_area, cif); -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12927 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11805] package_data only allows one glob per-package
Changes by Jeremy Kloth jeremy.kloth+python-trac...@gmail.com: -- nosy: +jkloth ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11805 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12932] dircmp does not allow non-shallow comparisons
New submission from Kevin Smith kevin.sm...@sixquickrun.com: While filecmp.cmp and filecmp.cmpfiles allow a shallow option to be specified to invoke a more involved comparison of files, filecmp.dircmp does not. It is limited to shallow-only comparisons. This could be solved quite easily by adding a shallow keyword option to dircmp then changing the phase3 method to the following. def phase3(self): # Find out differences between common files xx = cmpfiles(self.left, self.right, self.common_files, self.shallow) self.same_files, self.diff_files, self.funny_files = xx -- components: Library (Lib) messages: 143692 nosy: kesmit priority: normal severity: normal status: open title: dircmp does not allow non-shallow comparisons type: feature request versions: Python 2.6, Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12932 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12925] python setup.py upload_docs doesn't ask for login and password
Éric Araujo mer...@netwok.org added the comment: There is no upload_docs command in distutils, I think you have found a setuptools bug. You should report it to these bug trackers: - http://bugs.python.org/setuptools/ - https://bitbucket.org/tarek/distribute/issues (there is a fork, that’s why there are two bug trackers) In Python 3.3 however, the packaging module (a.k.a. distutils2) does have an upload_docs command; we should add a test to make sure the bug you report doesn’t show up there. -- components: +Distutils2 -Distutils nosy: +alexis stage: - test needed versions: +3rd party, Python 3.3 -Python 2.6, Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12925 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12933] Update or remove claims that distutils requires external programs
New submission from Éric Araujo mer...@netwok.org: In the past, distutils could use either the zipfile/tarfile modules or the external programs tar, zip and friends. This is told in the documentation and checked in the tests. I suspect that the docs and tests are now outdated. For example, some tests will be skipped if the tar program is not found, even if the code would have used the tarfile module and run successfully. I’ll look into this for packaging, but I don’t have the time right now to go over the distutils test and docs for 2.7 and 3.2. -- assignee: eric.araujo components: Distutils, Documentation, Tests keywords: easy messages: 143694 nosy: eric.araujo priority: normal severity: normal stage: needs patch status: open title: Update or remove claims that distutils requires external programs versions: Python 2.7, Python 3.2, Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12933 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12934] pysetup doesn’t work for the docutils project
New submission from Éric Araujo mer...@netwok.org: I tried to run “pysetup metadata” in a docutils source directory but the program failed, because packaging tries to import docutils and it picks up the 2.x version in the local directory. The import chain is: pysetup → packaging.run → packaging.metadata → docutils I could edit sys.path in pysetup, but that would mean that people calling “python3.y -m packaging.run” would not get the fix. Another idea would be to catch both ImportError and SyntaxError when packaging.metadata tries to import docutils, but it would be better to find the 3.x version of docutils in site-packages if it exists. What do you import experts think? -- assignee: tarek components: Distutils2 messages: 143695 nosy: alexis, brett.cannon, eric.araujo, ncoghlan, tarek priority: normal severity: normal status: open title: pysetup doesn’t work for the docutils project versions: 3rd party, Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12934 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12870] Regex object should have introspection methods
Ezio Melotti ezio.melo...@gmail.com added the comment: If there is a generic introspection method like the pcre_fullinfo you mentioned, and if it's also useful and used with other languages/libraries, then it might be considered. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12870 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12931] xmlrpclib confuses unicode and string
Wolfgang Schnerring wosc+pyt...@wosc.de added the comment: I guess it should use the configured encoding[1] (which is utf-8 by default) to do that, shouldn't it? Since that's the encoding that is used for the message body, too. [1] http://docs.python.org/library/xmlrpclib.html#xmlrpclib.ServerProxy -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12931 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12931] xmlrpclib confuses unicode and string
STINNER Victor victor.stin...@haypocalc.com added the comment: I guess it should use the configured encoding[1] (which is utf-8 by default) to do that, shouldn't it? Since that's the encoding that is used for the message body, too. The URI is only used in HTTP headers, not in the body. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12931 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12905] multiple errors in test_socket on OpenBSD
Charles-François Natali neolo...@free.fr added the comment: Using SA_RESTART, read() is not interrupted. But if the program is linked to pthread, read() is always interrupted: with sa_flags=0 or sa_flags=SA_RESTART. Ouch... But OpenBSD's pthread implementation has severe limitations/bugs. rthread doc contains: Future work: Quite simply, signal handling is one the most complicated aspects of threads to get right. (...) This paper dates back to 2005, I was hoping they would have solved this by now... As for the original problem, IIUC you don't reproduce it with your C test code... It might be due to a subtle difference in the way Python is built (like POSIX_SOURCE...), but it's hard to tell... -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12905 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12852] POSIX level issues in posixmodule.c on OpenBSD 5.0
Charles-François Natali neolo...@free.fr added the comment: this is the result of gcc -E on Modules/posixmodule.o, asked by haypo. And this confirms that __POSIX_VISIBLE 200809 when dirent.h is included, hence the missing prototype. I suppose that there is a conflict between Python's _POSIX_C_SOURCE and other defines related to the POSIX level. Lookie here: http://www.openbsd.org/cgi-bin/cvsweb/src/sys/sys/cdefs.h?rev=1.31 #ifdef _XOPEN_SOURCE # if (_XOPEN_SOURCE - 0 = 700) # define __XPG_VISIBLE 700 # undef _POSIX_C_SOURCE # define _POSIX_C_SOURCE 200809L # elif (_XOPEN_SOURCE - 0 = 600) # define __XPG_VISIBLE 600 # undef _POSIX_C_SOURCE # define _POSIX_C_SOURCE 200112L configure.in defines _XOPEN_SOURCE to 600: if test $define_xopen_source = yes then AC_DEFINE(_XOPEN_SOURCE, 600, Define to the level of X/Open that your system supports) So, try with _POSIX_C_SOURCE set to 200809L and _XOPEN_SOURCE to 700 (see http://pubs.opengroup.org/onlinepubs/9699919799/), and it should work. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12852 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12909] Inconsistent exception usage in PyLong_As* C functions
Mark Dickinson dicki...@gmail.com added the comment: Looks good to me. I'd prefer 'test_long_as_size' to be called 'test_long_as_size_t' (even though that's inaccurate for the ssize_t bits :-). The 'Py_None' reference counting in test_long_as_size and test_long_as_double looked a little odd at first glance---particularly the lack of a Py_INCREF just before the return Py_None. I see that it works; it just caught my eye. Anyway, those are just nitpicks; I leave it to you whether you want to change anything. Otherwise, please go ahead and apply. Thanks for the patches! -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12909 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12729] Python lib re cannot handle Unicode properly due to narrow/wide bug
Tom Christiansen tchr...@perl.com added the comment: Ezio Melotti rep...@bugs.python.org wrote on Sat, 03 Sep 2011 00:28:03 -: Ezio Melotti ezio.melo...@gmail.com added the comment: Or they are still called UTF-8 but used in combination with different error handlers, like surrogateescape and surrogatepass. The plain UTF-* codecs should produce data that can be used for open interchange, rejecting all the invalid data, both during encoding and decoding. Chapter 03, D79 also says: To ensure that the mapping for a Unicode encoding form is one-to-one, all Unicode scalar values, including those corresponding to noncharacter code points and unassigned code points, must be mapped to unique code unit sequences. Note that this requirement does not extend to high-surrogate and low-surrogate code points, which are excluded by definition from the set of Unicode scalar values. and this seems to imply that the only unencodable codepoint are the non-scalar values, i.e. surrogates and codepoints U+10. Noncharacters shouldn't thus receive any special treatment (at least during encoding). Tom, do you agree with this? What does Perl do with them? I agree that one needs to be able to encode any scalar value and store it in memory in a designated character encoding form. This is different from streams, though. The 3 different Unicode character encoding *forms* -- UTF-8, UTF-16, and UTF-32 -- certainly need to support all possible scalar values. These are the forms used to store code points in memory. They do not have BOMs, because one knows one's memory layout. These are specifically allowed to contain the noncharacters: http://www.unicode.org/reports/tr17/#CharacterEncodingForm The third type is peculiar to the Unicode Standard: the noncharacter. This is a kind of internal-use user-defined character, not intended for public interchange. The problem is that one must make a clean distinction between character encoding *forms* and character encoding *schemes*. http://www.unicode.org/reports/tr17/#CharacterEncodingScheme It is important not to confuse a Character Encoding Form (CEF) and a CES. 1. The CEF maps code points to code units, while the CES transforms sequences of code units to byte sequences. 2. The CES must take into account the byte-order serialization of all code units wider than a byte that are used in the CEF. 3. Otherwise identical CESs may differ in other aspects, such as the number of user-defined characters allowed. Some of the Unicode encoding schemes have the same labels as the three Unicode encoding forms. [...] As encoding schemes, UTF-16 and UTF-32 refer to serialized bytes, for example the serialized bytes for streaming data or in files; they may have either byte orientation, and a single BOM may be present at the start of the data. When the usage of the abbreviated designators UTF-16 or UTF-32 might be misinterpreted, and where a distinction between their use as referring to Unicode encoding forms or to Unicode encoding schemes is important, the full terms should be used. For example, use UTF-16 encoding form or UTF-16 encoding scheme. They may also be abbreviated to UTF-16 CEF or UTF-16 CES, respectively. The Unicode Standard has seven character encoding schemes: UTF-8, UTF-16, UTF-16BE, UTF-16LE, UTF-32, UTF-32BE, and UTF-32LE. * UTF-8, UTF-16BE, UTF-16LE, UTF-32BE and UTF32-LE are simple CESs. * UTF-16 and UTF-32 are compound CESs, consisting of an single, optional byte order mark at the start of the data followed by a simple CES. I believe that what this comes down to is that you can have noncharacters in memory as a CEF, but that you cannot have them in a CES meant for open interchange. And what you do privately is a different, third matter. What Perl does differs somewhat depending on whether you are just playing around with encodings in memory verus using streams that have particular encodings associated with them. I belive that you can think of this as the first being for CEF stuff and the second is for CES stuff. Streams are strict. Memory isn't. Perl will never ever produce nor accept one of the 66 noncharacers on any stream marked as one of the 7 character encoding schemes. However, we aren't always good about whether we generate an exception or whether we return replacement characters. Here the first process created a (for the nonce, nonfatal) warning, whereas the second process raised an exception: % perl -wle 'binmode(STDOUT, encoding(UTF-16))|| die; print chr(0xFDD0)' | perl -wle 'binmode(STDIN, encoding(UTF-16))||die; print ord STDIN' Unicode non-character U+FDD0 is illegal for open interchange at -e line 1. UTF-16:Unicode character fdd0 is illegal at -e line 1. Exit 255 Here the first again makes a warning, and
[issue12909] Inconsistent exception usage in PyLong_As* C functions
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 4a66a35da3fd by Nadeem Vawda in branch 'default': Issue #12909: Make PyLong_As* functions consistent in their use of exceptions. http://hg.python.org/cpython/rev/4a66a35da3fd -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12909 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12909] Inconsistent exception usage in PyLong_As* C functions
Nadeem Vawda nadeem.va...@gmail.com added the comment: The 'Py_None' reference counting in test_long_as_size and test_long_as_double looked a little odd at first glance Indeed, it is rather roundabout, so I added a comment to avoid confusion. Anyway, those are just nitpicks; I leave it to you whether you want to change anything. Otherwise, please go ahead and apply. Thanks for the patches! Thanks for the review. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12909 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12909] Inconsistent exception usage in PyLong_As* C functions
Changes by Nadeem Vawda nadeem.va...@gmail.com: -- resolution: - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12909 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12926] tarfile tarinfo.extract*() broken with symlinks
Changes by Ned Deily n...@acm.org: -- nosy: +lars.gustaebel ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12926 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12852] POSIX level issues in posixmodule.c on OpenBSD 5.0
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset cf66578d03d1 by Victor Stinner in branch 'default': Issue #12852: Set _XOPEN_SOURCE to 700 to get POSIX 2008 http://hg.python.org/cpython/rev/cf66578d03d1 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12852 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12852] POSIX level issues in posixmodule.c on OpenBSD 5.0
STINNER Victor victor.stin...@haypocalc.com added the comment: try with _POSIX_C_SOURCE set to 200809L and _XOPEN_SOURCE to 700 _POSIX_C_SOURCE value is set automatically depending on _XOPEN_SOURCE value. I chose to set _XOPEN_SOURCE to 700, instead of 600: it works on OpenBSD 5.0. I don't know if _XOPEN_SOURCE=700 is supported by old platforms. I don't want to touch such sensitive thing like configure in stable releases. @rpointel: You can backport manually the fix into OpenBSD for Python 3.2, or (safer?) patch pyconfig.h to set _XOPEN_SOURCE to 700. According to configure.in, it was not possible to set _XOPEN_SOURCE on OpenBSD 4.7: # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined, # even though select is a POSIX function. Reported by J. Ribbens. # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish. # In addition, Stefan Krah confirms that issue #1244610 exists through # OpenBSD 4.6, but is fixed in 4.7. @rpointel: Does the fix work for you? If yes, I will close the issue. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12852 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12852] POSIX level issues in posixmodule.c on OpenBSD 5.0
Charles-François Natali neolo...@free.fr added the comment: _POSIX_C_SOURCE value is set automatically depending on _XOPEN_SOURCE value. I know, but I think it's better to be consistent an also bump _POSIX_C_SOURCE to POSIX 2008, and follow POSIX's recommandation (http://pubs.opengroup.org/onlinepubs/9699919799/): A Strictly Conforming POSIX Application is an application that requires only the facilities described in POSIX.1-2008. Such an application: [...] For the C programming language, shall define _POSIX_C_SOURCE to be 200809L before any header is included -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12852 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1669349] make install fails if no previous Python installation
Chad Whitacre c...@zetaweb.com added the comment: I am seeing this behavior with 2.7.1. -- nosy: +whit537 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1669349 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12852] POSIX level issues in posixmodule.c on OpenBSD 5.0
Remi Pointel pyt...@xiri.fr added the comment: @rpointel: Does the fix work for you? If yes, I will close the issue. Hi, yes it sounds good for me: $ hg pull -u $ ./configure make $ ./python Lib/test/test_posix.py [...] test_fdlistdir (__main__.PosixTester) ... ok [...] Ran 79 tests in 0.097s OK (skipped=17) Thanks. Remi. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12852 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12852] POSIX level issues in posixmodule.c on OpenBSD 5.0
Changes by STINNER Victor victor.stin...@haypocalc.com: -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12852 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12909] Inconsistent exception usage in PyLong_As* C functions
Raymond Hettinger raymond.hettin...@gmail.com added the comment: +1 -- assignee: nadeem.vawda - rhettinger ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12909 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12659] Add tests for packaging.tests.support
Francisco Martín Brugué franci...@email.de added the comment: I've updated the patch. From your review: the class 'Mixin' is still there as the idea was to imitate the use of 'TempdirManager' as is used in the rest of the tests and test what it's documentation says. Just let me know your preferences here. Thank in advance ! -- Added file: http://bugs.python.org/file23116/issue12659_v2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12659 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12852] POSIX level issues in posixmodule.c on OpenBSD 5.0
STINNER Victor victor.stin...@haypocalc.com added the comment: I know, but I think it's better to be consistent an also bump _POSIX_C_SOURCE to POSIX 2008 Oh, I missed AC_DEFINE(_POSIX_C_SOURCE, ...) after AC_DEFINE(_XOPEN_SOURCE, ...). Fixed. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12852 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12852] POSIX level issues in posixmodule.c on OpenBSD 5.0
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 92842e347d98 by Victor Stinner in branch 'default': Issue #12852: Set _POSIX_C_SOURCE to 200809 to get POSIX 2008 http://hg.python.org/cpython/rev/92842e347d98 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12852 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6560] socket sendmsg(), recvmsg() methods
Nick Coghlan ncogh...@gmail.com added the comment: If Bill gets a chance to investigate this before the weekend, great, otherwise my plan to stop making noise in the buildbot results will be to: 1. Create a separate issue specifically for the errors reported by the Mac OS X buildbots (allowing the problem to be spelled out more clearly for readers, and also allowing the feature request itself to be closed) 2. Flag the offending tests as expected failures on Mac OS X, with a pointer back to the new tracker issue. That way, if these failures are due to underlying OS bugs or limitations (as they appear to be), we'll get a clear indication in the buildbots when Apple have fixed the relevant problems. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6560 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12930] reindent.py inserts spaces in multiline literals
Caio Romão caioro...@gmail.com added the comment: This patch fixes the reported issue. First time contributor here, feel free to bash. -- keywords: +patch nosy: +caioromao Added file: http://bugs.python.org/file23117/caioromao-fix-12930.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12930 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12930] reindent.py inserts spaces in multiline literals
Changes by Caio Romão caioro...@gmail.com: Removed file: http://bugs.python.org/file23117/caioromao-fix-12930.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12930 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12927] test_ctypes: segfault with suncc
Changes by Meador Inge mead...@gmail.com: -- stage: - needs patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12927 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2180] tokenize: mishandles line joining
Meador Inge mead...@gmail.com added the comment: That syntax error is coming from the CPython parser and *not* the tokenizer. Both CPython and the 'tokenizer' modules produce the same tokenization: [meadori@motherbrain cpython]$ cat repro.py if 1: \ pass [meadori@motherbrain cpython]$ ./python tokenize.py repro.py 0,0-0,0:ENCODING'utf-8' 1,0-1,2:NAME'if' 1,3-1,4:NUMBER '1' 1,4-1,5:OP ':' 1,5-1,6:NEWLINE '\n' 2,0-2,2:INDENT ' ' 3,0-3,1:NEWLINE '\n' 4,2-4,6:NAME'pass' 4,6-4,7:NEWLINE '\n' 5,0-5,0:DEDENT '' 5,0-5,0:ENDMARKER '' [44319 refs] [meadori@motherbrain cpython]$ ./python -d repro.py | grep Token | tail -10 File repro.py, line 3 ^ SyntaxError: invalid syntax [44305 refs] Token NEWLINE/'' ... It's a token we know Token DEDENT/'' ... It's a token we know Token NEWLINE/'' ... It's a token we know Token ENDMARKER/'' ... It's a token we know Token NAME/'if' ... It's a keyword Token NUMBER/'1' ... It's a token we know Token COLON/':' ... It's a token we know Token NEWLINE/'' ... It's a token we know Token INDENT/'' ... It's a token we know Token NEWLINE/'' ... It's a token we know The NEWLINE INDENT NEWLINE tokenization causes the parser to choke because 'suite' nonterminals: suite: simple_stmt | NEWLINE INDENT stmt+ DEDENT are defined as NEWLINE INDENT. It seems appropriate that the NEWLINE after INDENT should be dropped by both tokenizers. In other words, I think: if 1: \ pass should produce the same tokenization as: if 1: pass This seems consistent with with how explicit line joining is defined [2]. [1] http://hg.python.org/cpython/file/92842e347d98/Grammar/Grammar [2] http://docs.python.org/reference/lexical_analysis.html#explicit-line-joining -- stage: test needed - needs patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2180 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3353] make built-in tokenizer available via Python C API
Meador Inge mead...@gmail.com added the comment: It would be nice if this same C API was used to implement the 'tokenize' module. Issues like issue2180 will potentially require bug fixes in two places :-/ -- nosy: +meadori ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3353 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12930] reindent.py inserts spaces in multiline literals
Caio Romão caioro...@gmail.com added the comment: New patch, fixing issue pointed out by gutworth and some others that came up. I've used the following as a test input: -8--8 #!/usr/bin/python def x(): This is a doc ''' Another doc.''' s = line one line two line three ''' line five var = '''test''' Third doc return s -8--8 The patch got way bigger than the initial version and feels a little hackish, but I couldn't come up with something better. -- Added file: http://bugs.python.org/file23118/caioromao-fix-12930-v2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12930 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com