[issue12094] Cannot Launch IDLE
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Maybe you have created a file named abc.py somewhere? What happens when you type: C:\Python26python.exe -c import abc; print abc -- nosy: +amaury.forgeotdarc ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12094 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4709] Mingw-w64 and python on windows x64
Ralf Schmitt sch...@gmail.com added the comment: I'm also using this patch successfully (together with http://tdm-gcc.tdragon.net/). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4709 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12086] Tutorial doesn't discourage name mangling
Radomir Dopieralski python-b...@sheep.art.pl added the comment: I am reporting this specifically because I just had two independent cases of people who submitted code that had almost all methods name-mangled (within 2 weeks), and who then pointed to that section of the tutorial as justification. I have a hard time convincing them that it is a bad idea, as I have to work against the official documentation here. I agree that the language and library references should explain the mechanics behind the language in a neutral and empowering way. But I think that tutorial shouldn't tell people to write horrible code. Perhaps it would suffice if the tutorial didn't call this private methods? A more descriptive and accurate section name, such as name mangling or avoiding name clashes could help a lot. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12086 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12086] Tutorial doesn't discourage name mangling
Ezio Melotti ezio.melo...@gmail.com added the comment: FWIW that section used to be called Private variables through name mangling back in 1.5, and started by saying There is now limited support for class-private identifiers.. PEP8 [0] also talks about the name mangling in several places, and carefully avoids the use of private: To avoid name clashes with subclasses, use two leading underscores to invoke Python's name mangling rules. Python mangles these names with the class name: if class Foo has an attribute named __a, it cannot be accessed by Foo.__a. (An insistent user could still gain access by calling Foo._Foo__a.) Generally, double leading underscores should be used only to avoid name conflicts with attributes in classes designed to be subclassed. And it even includes the following two notes: We don't use the term private here, since no attribute is really private in Python (without a generally unnecessary amount of work). Not everyone likes name mangling. Try to balance the need to avoid accidental name clashes with potential use by advanced callers. [0]: http://www.python.org/dev/peps/pep-0008/ -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12086 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6721] Locks in python standard library should be sanitized on fork
Steffen Daode Nurpmeso sdao...@googlemail.com added the comment: @ Nir Aides wrote (2011-05-16 20:57+0200): Steffen, can you explain in layman's terms? I am the layman here. Charles-François has written a patch for Python which contradicted his own proposal from msg135079, but he seems to have tested a lot so that he then was even able to prove that his own proposal was correct. His new patch does implement that with a nice introductional note. He has also noticed that the only really safe solution is to simply disallow multi-threading in programs which fork(). And this either-or is exactly the conclusion we have taken and implemented in our C++ library - which is not an embeddable programming language that needs to integrate nicely in whatever environment it is thrown into, but even replaces main(). And i don't know any application which cannot be implemented regardless of fork()-or-threads instead of fork()-and-threads. (You *can* have fork()+exec()-and-threads at any time!) So what i tried to say is that it is extremely error-prone and resource intensive to try to implement anything that tries to achieve both. I.e. on Solaris they do have a forkall() and it seems they have atfork handlers for everything (and even document that in the system manual). atfork handlers for everything!! And for what? To implement a standart which is obviously brain-dead because it is *impossible* to handle it - as your link has shown this is even confessed by members of the committee. And writing memory in the child causes page-faults. That's all i wanted to say. (Writing this mail required more than 20 minutes, the mentioned one was out in less than one. And it is much more meaningful AFAIK.) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6721 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12095] test failures due to missing module
New submission from Ronald Oussoren ronaldousso...@mac.com: When I run the test suite on OSX (configure; make test) I get unexpected est failures: 6 tests failed: test_codecencodings_cn test_codecencodings_hk test_codecencodings_jp test_codecencodings_kr test_codecencodings_tw When I run one of these manually I get the following traceback: ./python.exe ../Lib/test/test_codecencodings_cn.py Traceback (most recent call last): File ../Lib/test/test_codecencodings_cn.py, line 11, in module class Test_GB2312(test_multibytecodec_support.TestBase, unittest.TestCase): File ../Lib/test/test_codecencodings_cn.py, line 13, in Test_GB2312 tstring = test_multibytecodec_support.load_teststring('gb2312') File /Users/ronald/Projects/python/rw/2.7/Lib/test/test_multibytecodec_support.py, line 330, in load_teststring from test import cjkencodings_test ImportError: cannot import name cjkencodings_test The only reference to cjkencodings_test in the entire 2.7 tree is this import line, there is no module or extension with this name. -- components: Library (Lib) messages: 136148 nosy: ronaldoussoren priority: high severity: normal status: open title: test failures due to missing module type: behavior versions: Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12095 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12095] test failures due to missing module
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12095 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12095] test failures due to missing module
Ronald Oussoren ronaldousso...@mac.com added the comment: I've verified the issue in a fresh download of revision c449d3c3e0da of the 2.7 branch. I'm on OSX 10.6, but that's not really relevant for this issue. If I'm using 'hg bisect' correctly (and that's a big if as I haven't used it before) this failure is caused by this patch: The first bad revision is: changeset: 70161:1bd697cdd210 branch: 2.7 parent: 70145:978016199be8 user:Victor Stinner victor.stin...@haypocalc.com date:Mon May 16 17:16:18 2011 +0200 summary: Issue #12057: Convert CJK encoding testcase BLOB into multiple text files And indeed in this revision: $ ls cjkencodings_test.py ls: cjkencodings_test.py: No such file or directory $ grep cjkencodings_test test_multibytecodec_support.py from test import cjkencodings_test return cjkencodings_test.teststring[encoding] -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12095 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10154] locale.normalize strips - from UTF-8, which fails on Mac
Roundup Robot devnull@devnull added the comment: New changeset 932de36903e7 by Ronald Oussoren in branch '2.7': (backport)Fix #10154 and #10090: locale normalizes the UTF-8 encoding to UTF-8 instead of UTF8 http://hg.python.org/cpython/rev/932de36903e7 New changeset 28e410eb86af by Ronald Oussoren in branch '3.1': Fix #10154 and #10090: locale normalizes the UTF-8 encoding to UTF-8 instead of UTF8 http://hg.python.org/cpython/rev/28e410eb86af New changeset 454d13e535ff by Ronald Oussoren in branch '3.2': (merge) Fix #10154 and #10090: locale normalizes the UTF-8 encoding to UTF-8 instead of UTF8 http://hg.python.org/cpython/rev/454d13e535ff -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10154 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10154] locale.normalize strips - from UTF-8, which fails on Mac
Changes by Ronald Oussoren ronaldousso...@mac.com: -- resolution: - fixed stage: needs patch - committed/rejected ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10154 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10154] locale.normalize strips - from UTF-8, which fails on Mac
Changes by Ronald Oussoren ronaldousso...@mac.com: -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10154 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10090] python -m locale fails on OSX
Ronald Oussoren ronaldousso...@mac.com added the comment: I've applied a fix for #10154 and that also fixes this problem. -- nosy: +ronaldoussoren resolution: - fixed stage: test needed - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10090 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9811] strftime strips '%' from unknown format codes on OS X
Ronald Oussoren ronaldousso...@mac.com added the comment: I've filed #9451707 about this in Apple's bug tracker. BTW. I don't think this is a platform bug, neither the manpage nor the unix specification at http://pubs.opengroup.org/onlinepubs/007908799/xsh/strftime.html specify what happens when you use an undocumented format specifier. -- nosy: +ronaldoussoren ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9811 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10154] locale.normalize strips - from UTF-8, which fails on Mac
Roundup Robot devnull@devnull added the comment: New changeset 3d7cb852a176 by Ronald Oussoren in branch 'default': Fix for issue 10154, merge from 3.2 http://hg.python.org/cpython/rev/3d7cb852a176 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10154 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11088] IDLE on OS X with Cocoa Tk 8.5 can hang waiting on input / raw_input
Roundup Robot devnull@devnull added the comment: New changeset 1c6823317a06 by Ronald Oussoren in branch '3.2': Fixes #11088: IDLE crashes when using F5 to run a script on OSX with Tk 8.5 http://hg.python.org/cpython/rev/1c6823317a06 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11088 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11088] IDLE on OS X with Cocoa Tk 8.5 can hang waiting on input / raw_input
Roundup Robot devnull@devnull added the comment: New changeset 85aa02bc674c by Ronald Oussoren in branch 'default': Fixes #11088: IDLE crashes when using F5 to run a script on OSX with Tk 8.5 http://hg.python.org/cpython/rev/85aa02bc674c -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11088 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11088] IDLE on OS X with Cocoa Tk 8.5 can hang waiting on input / raw_input
Roundup Robot devnull@devnull added the comment: New changeset 578020fe2875 by Ronald Oussoren in branch '2.7': (backport) Fixes #11088: IDLE crashes when using F5 to run a script on OSX with Tk 8.5 http://hg.python.org/cpython/rev/578020fe2875 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11088 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11088] IDLE on OS X with Cocoa Tk 8.5 can hang waiting on input / raw_input
Ronald Oussoren ronaldousso...@mac.com added the comment: I don't really like this patch, but like crashes that cause data loss even less... -- resolution: - fixed stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11088 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11877] Change os.fsync() to support physical backing store syncs
Steffen Daode Nurpmeso sdao...@googlemail.com added the comment: Thank you, thank you, thank you. I'm a bit irritated that a french man treats a wet-her as a typo! What if *i* like it?? In fact it is a fantastic physical backing store. Unbeatable. Well and about dropping the fsync() in case the fcntl() fails with ENOTTY. This is Esc2dd, which shouldn't hurt a committer. I'm convinced that full_fsync=False is optional and false by default, but i don't trust Apple. I've seen a reference to an atomic file somewhere on bugs.python.org and that does fsync() first followed by fcntl() if FULLFSYNC is available. Thus, if someone knows about that, she may do so, but otherwise i would guess he doesn't, and in that case i would not expect ENOTTY from an fsync() - still i want a full flush! This is what NetBSD describes: NOTES For optimal efficiency, the fsync_range() call requires that the file system containing the file referenced by fd support partial synchronization of file data. For file systems which do not support partial synchronization, the entire file will be synchronized and the call will be the equivalent of calling fsync(). But Apple is *s*spcil* again. Happy birthday. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11877 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12057] HZ codec has no test
Roundup Robot devnull@devnull added the comment: New changeset 83f4c270b27d by Victor Stinner in branch '2.7': Issue #12057: Fix .hgeol and test_multibytecodec_support for the conversion of http://hg.python.org/cpython/rev/83f4c270b27d -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12057 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12095] test failures due to missing module
STINNER Victor victor.stin...@haypocalc.com added the comment: Oh oh. I forgot to patch .hgeol and test_multibytecodec_support.py during my merge 3.1 (16503022c4b8) - 2.7 (1bd697cdd210). It should be ok with 83f4c270b27d. Thank you for your report Ronald. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12095 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9811] strftime strips '%' from unknown format codes on OS X
R. David Murray rdmur...@bitdance.com added the comment: Right, that's why I said if it is a bug :) FreeBSD has the same behavior, so I'd actually prefer that Apple not fix this. It would be nice if FreeBSD did and Apple adopted it, though, since only dropping the % is the least intuitive approach to handling unknown codes I can think of. Is Apple tracking FreeBSD development at all these days, or are they a true fork now? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9811 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12091] multiprocessing: simplify ApplyResult and MapResult with threading.Event
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12091 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12009] netrc module crashes if netrc file has comment lines
Ruslan Mstoi rms...@gmail.com added the comment: OK, finally got some time to make a patch. The fix is to seek the beginning of the comment before calling readline. That way the next line won't be deleted. Also, provided a test case for this issue in the patch. -- keywords: +patch Added file: http://bugs.python.org/file22013/issue12009_patch.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12009 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9811] strftime strips '%' from unknown format codes on OS X
Ronald Oussoren ronaldousso...@mac.com added the comment: I'm not sure if Apple's tracking FreeBSD, but they at the very least heavily borrow code (see http://opensource.apple.com/source/Libc/Libc-594.9.4/ for libc) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9811 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12096] test_threading.test_waitfor() timeout (1 hour) on x86 Gentoo 3.x buildbot
New submission from STINNER Victor victor.stin...@haypocalc.com: Builder x86 Gentoo 3.x Build #130: http://www.python.org/dev/buildbot/all/builders/x86%20Gentoo%203.x/builds/130/steps/test/logs/stdio [263/354] test_threading Timeout (1:00:00)! Thread 0x48f0bb70: File /var/lib/buildslave/3.x.murray-gentoo/build/Lib/threading.py, line 237 in wait File /var/lib/buildslave/3.x.murray-gentoo/build/Lib/threading.py, line 278 in wait_for File /var/lib/buildslave/3.x.murray-gentoo/build/Lib/test/lock_tests.py, line 472 in f File /var/lib/buildslave/3.x.murray-gentoo/build/Lib/test/lock_tests.py, line 37 in task Thread 0x401aa010: File /var/lib/buildslave/3.x.murray-gentoo/build/Lib/test/lock_tests.py, line 16 in _wait File /var/lib/buildslave/3.x.murray-gentoo/build/Lib/test/lock_tests.py, line 51 in wait_for_finished File /var/lib/buildslave/3.x.murray-gentoo/build/Lib/test/lock_tests.py, line 482 in test_waitfor File /var/lib/buildslave/3.x.murray-gentoo/build/Lib/unittest/case.py, line 407 in _executeTestPart File /var/lib/buildslave/3.x.murray-gentoo/build/Lib/unittest/case.py, line 462 in run File /var/lib/buildslave/3.x.murray-gentoo/build/Lib/unittest/case.py, line 514 in __call__ File /var/lib/buildslave/3.x.murray-gentoo/build/Lib/unittest/suite.py, line 105 in run File /var/lib/buildslave/3.x.murray-gentoo/build/Lib/unittest/suite.py, line 67 in __call__ File /var/lib/buildslave/3.x.murray-gentoo/build/Lib/unittest/suite.py, line 105 in run File /var/lib/buildslave/3.x.murray-gentoo/build/Lib/unittest/suite.py, line 67 in __call__ File /var/lib/buildslave/3.x.murray-gentoo/build/Lib/test/support.py, line 1096 in run File /var/lib/buildslave/3.x.murray-gentoo/build/Lib/test/support.py, line 1184 in _run_suite File /var/lib/buildslave/3.x.murray-gentoo/build/Lib/test/support.py, line 1210 in run_unittest File /var/lib/buildslave/3.x.murray-gentoo/build/Lib/test/test_threading.py, line 743 in test_main File ./Lib/test/regrtest.py, line 1044 in runtest_inner File ./Lib/test/regrtest.py, line 838 in runtest File ./Lib/test/regrtest.py, line 662 in main File ./Lib/test/regrtest.py, line 1622 in module -- components: Library (Lib) messages: 136164 nosy: haypo priority: normal severity: normal status: open title: test_threading.test_waitfor() timeout (1 hour) on x86 Gentoo 3.x buildbot versions: Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12096 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12096] test_threading.test_waitfor() timeout (1 hour) on x86 Gentoo 3.x buildbot
Charles-François Natali neolo...@free.fr added the comment: The sleep is too short: def f(): with cond: result = cond.wait_for(lambda : state==4) for i in range(5): time.sleep(0.01) with cond: state += 1 cond.notify() If state is incremented to 5 before the thread waits on the condition, it's going to wait forever (it can be reproduced easily by removing the sleep). We could either increase the sleep, or change the predicate to state==5. -- nosy: +neologix ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12096 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6059] ctypes/uuid-related segmentation fault
Charles-François Natali neolo...@free.fr added the comment: It's probably a libc buc, see http://sources.redhat.com/bugzilla/show_bug.cgi?id=12453 Basically, when libraries are dynamically loaded in an interleaved way, this can lead to TLS being returned uninitialized, hence leading to a segfault upon access. A fix has been committed really recently. If I'm correct, importing uuid first should do the trick. -- nosy: +neologix ___ 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
[issue12096] test_threading.test_waitfor() timeout (1 hour) on x86 Gentoo 3.x buildbot
Changes by R. David Murray rdmur...@bitdance.com: -- keywords: +buildbot nosy: +r.david.murray ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12096 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11486] Add option to not install into /Applications
Ronald Oussoren ronaldousso...@mac.com added the comment: This patch adds an flag to the configure script: --without-framework-applications. When this flag is used 'make install' will not create /Applications/Python 3.3, and won't install IDLE.app and PythonLauncher.app -- keywords: +patch stage: needs patch - patch review Added file: http://bugs.python.org/file22014/issue11486.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11486 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12009] netrc module crashes if netrc file has comment lines
Changes by R. David Murray rdmur...@bitdance.com: -- assignee: - r.david.murray stage: test needed - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12009 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12009] netrc module crashes if netrc file has comment lines
R. David Murray rdmur...@bitdance.com added the comment: With these new additions, the test input is getting unwieldy. If you have the time, I'd like to see the unit tests refactored to be more unit-testy. That is, instead of a single test netrc file, have multiple inputs, one for each thing being tested, and turn setUp into a factory function that each test calls: def make_nrc (self, test_data): mode = 'w' if sys.platform not in ['cygwin']: mode += 't' fp = open(temp_filename, mode) fp.write(test_data) fp.close() return netrc.netrc(temp_filename) You can also use textwrap.dedent to embed the test_string in the call to make_nrc in the test method in a pretty fashion: def test_default_login(self): nrc = self.make_nrc(textwrap.dedent(\ default login log2 password pass2 ) self.assertEqual(self.nrc.hosts['default'], ('log2', None, 'pass2')) If you don't have time to do this I'll do it at some point (not sure when). I haven't looked at your fix in detail because the unit tests don't currently isolate the issues, but it looks to like it is the right approach. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12009 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12094] Cannot Launch IDLE
Nathan nathaniel.j.b...@gmail.com added the comment: Thanks for the speedy reply I have cut and past the results from the for following tests I can't test this on Windows, but you could try the following things: 1) check that 'python.exe -V' returns 2.6.6; 2) try using the IDLE shortcut in the start menu; 3) try from abc import ABCMeta from the interactive interpreter; 4) install Python 2.7 and see if it works there. 1) C:\Documents and Settings\buckpython.exe -V Python 2.6.6 2.) Does not open from the start menu 3.) C:\Documents and Settings\buckpython 'import site' failed; use -v for traceback Python 2.6.6 (r266:84297, Aug 24 2010, 18:46:32) [MSCv.1500 32 bit (Intel)] on win32 Type help, copyright, credits or license for more information. from abc import ABCMeta Traceback (most recent call last): File stdin, line 1, in module ImportError: cannot import name ABCMeta 4.) C:\Python27python.exe Lib\idlelib\idle.py Traceback (most recent call last): File C:\Python27\lib\site.py, line 62, in module import os File C:\Python27\lib\os.py, line 398, in module import UserDict File C:\Python27\lib\UserDict.py, line 83, in module import _abcoll File C:\Python27\lib\_abcoll.py, line 11, in module from abc import ABCMeta, abstractmethod ImportError: cannot import name ABCMeta Lastly C:\Python26python.exe -c import abc; print abc 'import site' failed; use -v for traceback module 'abc' from 'C:\w\ADCP_programs\abc.py' Thanks again Nathan -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12094 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12094] Cannot Launch IDLE
Nathan nathaniel.j.b...@gmail.com added the comment: So obviously the abc.py is already a module in the the frame work! All fixed Thanks again -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12094 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12096] test_threading.test_waitfor() timeout (1 hour) on x86 Gentoo 3.x buildbot
Charles-François Natali neolo...@free.fr added the comment: Here's a one-liner patch using the later approach (that way we're sure the test won't hang). -- keywords: +patch Added file: http://bugs.python.org/file22015/wait_for_race.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12096 ___diff -r 85aa02bc674c Lib/test/lock_tests.py --- a/Lib/test/lock_tests.pyTue May 17 14:52:21 2011 +0200 +++ b/Lib/test/lock_tests.pyTue May 17 19:21:59 2011 +0200 @@ -474,7 +474,7 @@ self.assertEqual(state, 4) b = Bunch(f, 1) b.wait_for_started() -for i in range(5): +for i in range(4): time.sleep(0.01) with cond: state += 1 ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12094] Cannot Launch IDLE
Changes by Ezio Melotti ezio.melo...@gmail.com: -- resolution: - invalid stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12094 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12002] ftplib.FTP.abort fails with TypeError on Python 3.x
Changes by Giampaolo Rodola' g.rod...@gmail.com: -- resolution: - fixed stage: needs patch - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12002 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12077] Harmonizing descriptor protocol documentation
Jay Parlar par...@gmail.com added the comment: While working on this, I believe it would also make sense to remove all instances of the terms new-style and old-style from the Descriptor HowTo (and wherever else they might be present) It still makes sense for them to be present in the 2.7 documentation, but they're concepts that don't exist in 3.x -- nosy: +Jay.Parlar ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12077 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12097] python.exe crashes if it is unable to find its .dll
New submission from anatoly techtonik techto...@gmail.com: On Windows, if Python is unable to find its .dll it crashes badly. This affects `vurtualenv` project that doesn't copy .dll file. It would be more user friendly if python.exe launcher could detect this situation and fail gracefully. Such kind of dynamic linking can also serve as an example for building launchers for applications that optionally provide Python scripting depending on if Python .dll is present on the system. And the ultimate launcher will allow to load any available .dll This can be extremely handy for apps with embedded Python that use scripts compatible with Python 2.5+ -- messages: 136173 nosy: techtonik priority: normal severity: normal status: open title: python.exe crashes if it is unable to find its .dll versions: Python 2.6, Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12097 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1746656] IPv6 Interface naming/indexing functions
Antoine Pitrou pit...@free.fr added the comment: Sorry to reopen, but do these methods really have to return *byte strings* for interface names? In Python 3, we usually take the position that textually meaningful data should be str, not bytes (even filenames under POSIX). The usual way to do this is to use the filesystem encoding (os.fsdecode in pure Python, PyUnicode_DecodeFSDefault in C). Also, the tests are really minimal. They should at least check the type and structure of values returned by these functions. -- nosy: +pitrou status: closed - open ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1746656 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11877] Change os.fsync() to support physical backing store syncs
Steffen Daode Nurpmeso sdao...@googlemail.com added the comment: I've dropped wet-her! I hope now you're satisfied! So the buffer cache is all which remains hot. How deserted! And you could also add a test (I guess that just calling fsync with full_sync=True on a valid FD would be enough. I was able to add two tests as an extension to what is yet tested about os.fsync(), but that uses an invalid fd. (At least it enters the conditional and fails as expected.) I'm not sure static is necessary, I'd rather make it const. Yes.. This code is correct as it is, see other extension modules in the stdlib for other examples of this pattern ..but i've used copy+paste here. And you could also add a test (I guess that just calling fsync with full_sync=True on a valid FD would be enough. The alternative would be that full_sync Ok, i've renamed full_fsync to full_sync. -- Added file: http://bugs.python.org/file22016/11877.9.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11877 ___diff --git a/Doc/library/os.rst b/Doc/library/os.rst --- a/Doc/library/os.rst +++ b/Doc/library/os.rst @@ -798,7 +798,7 @@ Availability: Unix. -.. function:: fsync(fd) +.. function:: fsync(fd, full_sync=False) Force write of file with filedescriptor *fd* to disk. On Unix, this calls the native :c:func:`fsync` function; on Windows, the MS :c:func:`_commit` function. @@ -807,6 +807,15 @@ ``f.flush()``, and then do ``os.fsync(f.fileno())``, to ensure that all internal buffers associated with *f* are written to disk. + The POSIX standart requires that :c:func:`fsync` must transfer the buffered + data to the storage device, not that the data is actually written by the + device itself. It explicitely leaves it up to operating system implementors + whether users are given stronger guarantees on data integrity or not. Some + systems also offer special functions which overtake the part of making such + stronger guarantees, i.e., Mac OS X and NetBSD. The optional *full_sync* + argument can be used to enforce usage of these special functions if that is + appropriate for the *fd* in question. + Availability: Unix, and Windows. diff --git a/Lib/test/test_os.py b/Lib/test/test_os.py --- a/Lib/test/test_os.py +++ b/Lib/test/test_os.py @@ -837,10 +837,10 @@ singles = [fchdir, dup, fdopen, fdatasync, fstat, fstatvfs, fsync, tcgetpgrp, ttyname] #singles.append(close) -#We omit close because it doesn'r raise an exception on some platforms +# We omit close because it doesn't raise an exception on some platforms def get_single(f): def helper(self): -if hasattr(os, f): +if hasattr(os, f): self.check(getattr(os, f)) return helper for f in singles: @@ -855,6 +855,11 @@ self.fail(%r didn't raise a OSError with a bad file descriptor % f) +def test_fsync_arg(self): +if hasattr(os, fsync): +self.check(os.fsync, True) +self.check(os.fsync, False) + def test_isatty(self): if hasattr(os, isatty): self.assertEqual(os.isatty(support.make_bad_fd()), False) diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c --- a/Modules/posixmodule.c +++ b/Modules/posixmodule.c @@ -2121,13 +2121,50 @@ #ifdef HAVE_FSYNC PyDoc_STRVAR(posix_fsync__doc__, -fsync(fildes)\n\n\ -force write of file with filedescriptor to disk.); - -static PyObject * -posix_fsync(PyObject *self, PyObject *fdobj) -{ -return posix_fildes(fdobj, fsync); +fsync(fildes, full_sync=False)\n\n +force write of file buffers with fildes to disk;\n +full_sync forces flush of disk caches in case fsync() alone is not enough.); + +static PyObject * +posix_fsync(PyObject *self, PyObject *args, PyObject *kwargs) +{ +PyObject *fdobj; +int full_sync = 0; +static char *keywords[] = {fd, full_sync, NULL }; + +if (!PyArg_ParseTupleAndKeywords(args, kwargs, O|i, keywords, + fdobj, full_sync)) +return NULL; + +/* See issue 11877 discussion */ +# if ((defined __APPLE__ defined F_FULLFSYNC) || \ + (defined __NetBSD__ defined FDISKSYNC)) +if (full_sync != 0) { +int res, fd = PyObject_AsFileDescriptor(fdobj); +if (fd 0) +return NULL; +if (!_PyVerify_fd(fd)) +return posix_error(); + +Py_BEGIN_ALLOW_THREADS +# if defined __APPLE__ +/* F_FULLFSYNC is not supported for all types of FDs/FSYSs; + * be on the safe side and test for inappropriate ioctl errors */ +res = fcntl(fd, F_FULLFSYNC); +if (res 0 errno == ENOTTY) +res = fsync(fd); +# elif defined __NetBSD__ +res = fsync_range(fd, FFILESYNC|FDISKSYNC, 0, 0); +# endif +Py_END_ALLOW_THREADS + +if
[issue12097] python.exe crashes if it is unable to find its .dll
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Which dll was missing in your case? python27.dll, python32.dll or another one? Virtualenv usually work on Windows. What did it fail to copy? There is already PEP387 about a Python launcher on Windows. Can you please read the specifications, and tell us if they would fit your needs? -- nosy: +amaury.forgeotdarc ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12097 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11877] Change os.fsync() to support physical backing store syncs
Changes by Steffen Daode Nurpmeso sdao...@googlemail.com: Removed file: http://bugs.python.org/file21986/11877.8.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11877 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11877] Change os.fsync() to support physical backing store syncs
Antoine Pitrou pit...@free.fr added the comment: I've dropped wet-her! I hope now you're satisfied! So the buffer cache is all which remains hot. How deserted! I'm not sure I'm always understanding your messages well (I'm not a native English speaker), but I don't think this kind of joke is appropriate for the bug tracker. Thank you. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11877 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12098] Child process running as debug
New submission from Sergey Mezentsev theb...@yandex.ru: I run this code: from multiprocessing import Pool def myfunc(x): assert False #if __debug__: print 'debug' return x - 1 if __name__ == '__main__': pool = Pool(processes=1) it = pool.imap(myfunc, xrange(5)) # or imap_unordered, map print it.next() python -O myscript.py The myfunc() always raise AssertionError. But I run script with -O (optimization) command. Interpreter is: Python 2.6.6 (r266:84297, Aug 24 2010, 18:46:32) [MSC v.1500 32 bit (Intel)] on win32 Thanks! -- components: Interpreter Core, Library (Lib), Windows messages: 136178 nosy: thebits priority: normal severity: normal status: open title: Child process running as debug type: behavior versions: Python 2.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12098 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12098] Child process running as debug
STINNER Victor victor.stin...@haypocalc.com added the comment: I'm unable to reproduce this bug on Linux. $ cat script.py from multiprocessing import Pool import os def myfunc(x): import sys print(child, os.getpid(), optimize?, sys.flags.optimize) assert False, assert False return x if __name__ == '__main__': import sys print(parent optimize?, sys.flags.optimize) pool = Pool(processes=2) pool.map(myfunc, xrange(2)) # or imap_unordered, map $ python -O script.py ('parent optimize?', 1) ('child', 30397, 'optimize?', 1) ('child', 30398, 'optimize?', 1) -- nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12098 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11877] Change os.fsync() to support physical backing store syncs
STINNER Victor victor.stin...@haypocalc.com added the comment: I don't like the API because it gives a different behaviour depending on the OS and I don't see how to check that the function does really a full sync. I would prefer a new option os.fullsync() function which is like your os.fsync(fd, full_sync=False), except that the function doesn't exist if the OS doesn't implement it. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11877 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12098] Child process running as debug
Sergey Mezentsev theb...@yandex.ru added the comment: In my system (Windows 7 (64) SP1, Python 2.6.6 32-bit) I have: d:\temppython -O pool.py ('parent optimize?', 1) ('child', 4712, 'optimize?', 0) (Traceback (most recent call last): ' File new.py, line 14, in module childpool.map(myfunc, xrange(2)) # or imap_unordered, map' , File C:\Python26\lib\multiprocessing\pool.py, line 148, in map 4712, 'optimize?return self.map_async(func, iterable, chunksize).get() ' File C:\Python26\lib\multiprocessing\pool.py, line 422, in get , 0) raise self._value AssertionError: assert False -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12098 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12098] Child process running as debug
Charles-François Natali neolo...@free.fr added the comment: Under Linux, child processes are created with fork(), so they're run with the exact same environment as the parent process (among which sys.flags.optimize). I don't know Windows at all, but since I've heard it doesn't have fork(), my guess is that the command-line is constructed before creating the child process, and maybe the -O command line argument is lost. Just a guess. -- nosy: +neologix ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12098 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12098] Child process running as debug on Windows
Changes by STINNER Victor victor.stin...@haypocalc.com: -- title: Child process running as debug - Child process running as debug on Windows ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12098 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12098] Child process running as debug on Windows
Changes by Antoine Pitrou pit...@free.fr: -- type: behavior - feature request versions: +Python 3.3 -Python 2.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12098 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9811] strftime strips '%' from unknown format codes on OS X
Santoso Wijaya santoso.wij...@gmail.com added the comment: `strftime` does not, indeed, seem to define what behaviour it is supposed to do when given non-supported format characters. Under Windows, in fact, it will crash the runtime (see: issue #10762). -- nosy: +santa4nt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9811 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6727] ImportError when package is symlinked on Windows
Jason R. Coombs jar...@jaraco.com added the comment: Digging deeper with the Visual Studio debugger, I discovered the following interesting outcome (run with cmd.exe): @echo off mklink /d sample sample-target mkdir sample-target echo sample-target\__init__.py :: Before KB2467174, returns 0; after, returns -1 python -c import ctypes; buf = (ctypes.c_char*256)(); print(ctypes.windll.msvcr90._wstat64i32(u'sample', ctypes.byref(buf))) :: Always returns 13 python -c import ctypes; fd = ctypes.c_int(-1); print(ctypes.windll.msvcrt._wsopen_s(ctypes.byref(fd), u'sample', 0, 0x40, 0)) rmdir sample rmdir /s /q sample-target The call to _wstat64i32 is returning -1 with the patched CRT... but when I traced _wstat64i32 (on a machine with the patched CRT), it called _wsopen_s, which apparently always returns -1. So my guess is that the patched CRT changed something about _wstat64i32 such that it doesn't defer to _wsopen_s. I'm going to see if I can get an early version of Visual Studio that I can trace where _wstat64i32 doesn't fail. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6727 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12098] Child process running as debug on Windows
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: This happens only on Windows, where multiprocessing has to spawn a new intepreter; the -O parameter is certainly omitted. Unix platforms fork() the current interpreter with all its state and don't have this issue. -- nosy: +amaury.forgeotdarc ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12098 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6727] ImportError when package is symlinked on Windows
Jason R. Coombs jar...@jaraco.com added the comment: Indeed, this appears to be a bug in stat64.c, specifically a regression in KB2467174. If I look at the code for _wstat64i32, it doesn't have the code that calls into _wsopen_s for symlinked files/dirs, so uses the legacy behavior to stat the target. I suspect it's also a memory leak, because it doesn't properly close the findhandle in this case. Any suggestions on how to handle upstream bugs in Windows? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6727 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12096] test_threading.test_waitfor() timeout (1 hour) on x86 Gentoo 3.x buildbot
Roundup Robot devnull@devnull added the comment: New changeset a6b4a00fb1c7 by Victor Stinner in branch '3.2': Issue #12096: Fix a race condition in test_threading.test_waitfor(). Patch http://hg.python.org/cpython/rev/a6b4a00fb1c7 New changeset c52807b17e03 by Victor Stinner in branch 'default': (Merge 3.2) Issue #12096: Fix a race condition in http://hg.python.org/cpython/rev/c52807b17e03 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12096 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6727] ImportError when package is symlinked on Windows
Brian Curtin br...@python.org added the comment: Wow, nice analysis. http://connect.microsoft.com/ is the external Microsoft bug tracker, as far as I know. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6727 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12096] test_threading.test_waitfor() timeout (1 hour) on x86 Gentoo 3.x buildbot
STINNER Victor victor.stin...@haypocalc.com added the comment: Oh, it is a real bug in the test. Bug fixed by your patch. Thanks, I commited your patch. I don't wait for the buildbot because it's a sporadic (and rare) failure. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12096 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11779] test_mmap.test_large_offset() timeout (1 hour) on AMD64 Snow Leopard 3.x buildbot
STINNER Victor victor.stin...@haypocalc.com added the comment: I did not see new failure recently, let's close this issue. Reopen if it is not fixed. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11779 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11610] Improving property to accept abstract methods
Changes by Ned Deily n...@acm.org: -- nosy: -ned.deily ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11610 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6059] ctypes/uuid-related segmentation fault
Senthil Kumaran sent...@uthcode.com added the comment: neologix, that is right. Importing uuid before importing the other modules does not result in Seg Fault. Till the libc fix is available in Operating systems and as a result in CPython, this is probably the only way to go for. -- nosy: +orsenthil -BreamoreBoy ___ 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
[issue6059] ctypes/uuid-related segmentation fault
STINNER Victor victor.stin...@haypocalc.com added the comment: It's probably a libc bug The bug looks to be specific to the GNU libc. It exists in glibc-2.11.3 and glibc-2.12.2. I suppose that all versions of the GNU libc are affected. The bug has been fixed: http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=d26dfc60edc8 I don't know which versions will include the fix. I don't think that Python can workaround the bug, and so the issue should be fixed. -- nosy: +haypo ___ 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
[issue12099] re pattern objects have no __class__
New submission from Michael Foord mich...@voidspace.org.uk: import re re.compile('foo') _sre.SRE_Pattern object at 0x1043230 p = re.compile('foo') p.__class__ Traceback (most recent call last): File stdin, line 1, in module AttributeError: __class__ Already fixed in 3.2. -- messages: 136193 nosy: michael.foord priority: normal severity: normal stage: test needed status: open title: re pattern objects have no __class__ type: behavior versions: Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12099 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12100] Incremental encoders of CJK codecs reset the codec at each call to encode()
New submission from STINNER Victor victor.stin...@haypocalc.com: Stateful CJK codecs reset the codec at each call to encode() producing a valid but overlong output: import codecs encoder = codecs.getincrementalencoder('hz')() encoder.encode('\u804a') + encoder.encode('\u804a') b'~{AD~}~{AD~}' '\u804a\u804a'.encode('hz') b'~{ADAD~}' Multibyte encodings: HZ and all encodings of the ISO 2022 family (e.g. iso-2022-jp). Attached patch fixes this issue. I don't like how I added the tests, these tests may be moved somewhere else, but HZ codec doesn't have tests today (I opened issue #12057 for that), and ISO 2022 codecs don't have specific tests (test_multibytecodec is Unit test for multibytecodec itself). We should maybe also add tests specific to ISO 2022 first? I hesitate to reset the codec on .encode(text, final=True), but UTF-8-SIG or UTF-16 don't reset the codec if final=True. io.TextIOWrapper only calls encoder.reset() on file.seek(0). On a seek to another position, it calls encoder.setstate(0). See also issues #12016 and #12057. -- components: Interpreter Core files: cjk_no_reset.patch keywords: patch messages: 136194 nosy: haypo, hyeshik.chang, lemburg priority: normal severity: normal status: open title: Incremental encoders of CJK codecs reset the codec at each call to encode() versions: Python 3.3 Added file: http://bugs.python.org/file22017/cjk_no_reset.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12100 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12057] HZ codec has no test
STINNER Victor victor.stin...@haypocalc.com added the comment: ISO 2022 encodings don't have tests neither: test_multibytecodec doesn't test directly these encodings but it is Unit test for multibytecodec itself. We may also add tests specific to ISO 2022 encodings: - iso2022_kr - iso2022_jp - iso2022_jp_1 - iso2022_jp_2 - iso2022_jp_2004 - iso2022_jp_3 - iso2022_jp_ext While trying to write tests for the HZ encoding, I found a bug in CJK multibyte encodings = #12100, Incremental encoders of CJK codecs reset the codec at each call to encode(). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12057 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12099] re pattern objects have no __class__
Roundup Robot devnull@devnull added the comment: New changeset c9df95b57af3 by Benjamin Peterson in branch '2.7': stop using the old brain-dead interface for providing attributes/methods http://hg.python.org/cpython/rev/c9df95b57af3 -- nosy: +python-dev resolution: - fixed stage: test needed - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12099 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8796] Deprecate codecs.open()
STINNER Victor victor.stin...@haypocalc.com added the comment: Python 3.2 has been published. Can we start deprecating StreamWriter and StreamReader in Python 3.3 (to remove them from Python 3.4)? The doc should explain how to convert code using codecs into code using the io module (it should be simple), and using a StreamReader/StreamWriter should emit a warning. -- codecs.StreamWriter writes twice the BOM of UTF-8-SIG, UTF-16, UTF-32 encodings if the file is opened in append mode or after a seek(0). Bug fixed in io.TextIOWrapper (issue #5006). io.TextIOWrapper calls also encoder.setstate(0) on a seek different than seek(0), whereas codecs.StreamWriter doesn't (it is not an incremental encoder, it doesn't have the setstate method). codecs.StreamReader doesn't ignore the BOM of UTF-8-SIG, UTF-16 or UTF-32 encodings after seek(0). Bug fixed in io.TextIOWrapper (issue #4862). These bugs should maybe be mentioned in the codecs doc, with a pointer to the io module saying that the io module handles these encodings correctly. -- resolution: postponed - ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8796 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8796] Deprecate codecs.open()
Changes by STINNER Victor victor.stin...@haypocalc.com: -- status: closed - ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8796 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8796] Deprecate codecs.open()
STINNER Victor victor.stin...@haypocalc.com added the comment: ... once most Linux distributions have moved to Python 2.6 Debian uses Python 2.6 by default since it's last stable release (Squeeze). I think that it was the last distro using Python 2.5 by default. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8796 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8796] Deprecate codecs.open()
Changes by Raymond Hettinger raymond.hettin...@gmail.com: -- nosy: +rhettinger ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8796 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11702] dir on return value of msilib.OpenDatabase() crashes python
Brian Curtin br...@python.org added the comment: If we can generate a testable MSI file that would be the best. Including a very small pre-generated MSI for the purposes of the test would be acceptable. As-is, the tests don't pass because my machine has C:\Windows\installer\1032f.msi that gets used for the test, which apparently doesn't work with this functionality, and other machines may end up with the same situation. I'm not sure if that's a bug in the code or in whatever MSI that is, though. The OpenDatabase call returns unknown error 6e for both new tests. -- nosy: +brian.curtin ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11702 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12097] python.exe crashes if it is unable to find its .dll
anatoly techtonik techto...@gmail.com added the comment: pythonXX.dll is missing. Virtualenv copies python.exe, which is only 25kB long. It works only if pythonXX.dll is present in system PATH - either installed into Windows\System32 or comes with Mercurial, Bazaar or other frozen app install. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12097 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12097] python.exe crashes if it is unable to find its .dll
anatoly techtonik techto...@gmail.com added the comment: As for PEPs I think you've meant PEP 397 http://www.python.org/dev/peps/pep-0397/ which is tl; dr for the moment. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12097 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12101] PEPs should have consecutive revision numbers
New submission from anatoly techtonik techto...@gmail.com: Currently, PEPs have only hash number, which doesn't explain about how many changes were done to the PEP since my last review. It will be convenient to have consecutive revision number for PEP edits and link it to short history log (like wiki history) with current revision highlighted. This is useful to track when PEP on site is not updated to current version. -- components: Devguide messages: 136204 nosy: techtonik priority: normal severity: normal status: open title: PEPs should have consecutive revision numbers ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12101 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12097] python.exe crashes if it is unable to find its .dll
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Virtualenv only works with an installed Python. This is really a virtualenv limitation, then; your issue looks similar to this one: https://github.com/pypa/virtualenv/issues/87 -- resolution: - invalid status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12097 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com