Re: Change a file type in Python?

2013-12-01 Thread Mark Lawrence
On 01/12/2013 00:04, Eamonn Rea wrote: Thanks for the help! Ok, I'll look into the mailing list. It's very useful, you can even see things in context, which is conspicious by its absence above :) -- Python is the second best programming language in the world. But the best has yet to be

Re: Change a file type in Python?

2013-12-01 Thread Steven D'Aprano
On Sun, 01 Dec 2013 16:03:17 +1100, Chris Angelico wrote: Most of it is getting annoyed at the results of 3, and then attacking 3. I know the feeling. I've never trusted 3, I've always felt that it's plotting something. And it looks like half an 8, but it's not. What's with that? -- Steven

Re: Python Unicode handling wins again -- mostly

2013-12-01 Thread wxjmfauth
Le dimanche 1 décembre 2013 00:07:36 UTC+1, Ned Batchelder a écrit : On 11/30/13 5:37 PM, Gregory Ewing wrote: wxjmfa...@gmail.com wrote: And do you know the origin of this typographical feature? Because, mechanically, the dot of the i broke too often. In my opinion, a very

Re: Python Unicode handling wins again -- mostly

2013-12-01 Thread Serhiy Storchaka
30.11.13 02:44, Steven D'Aprano написав(ла): (2) If you reverse that string, does it give lëon? The implication of this question is that strings should operate on grapheme clusters rather than code points. Python fails this test: py print(noe\u0308l[::-1]) leon

Extending the 'function' built-in class

2013-12-01 Thread G.
Hi, I can't figure out how I can extend the 'function' built-in class. I tried: class test(function): def test(self): print(test) but I get an error. Is it possible ? Regards, G. -- https://mail.python.org/mailman/listinfo/python-list

Re: Extending the 'function' built-in class

2013-12-01 Thread Roy Smith
In article 529b8ba2$0$2270$426a7...@news.free.fr, G. gru...@grumsk.tz wrote: Hi, I can't figure out how I can extend the 'function' built-in class. I tried: class test(function): def test(self): print(test) but I get an error. Is it possible ? Regards, G. It really helps

Re: Extending the 'function' built-in class

2013-12-01 Thread G.
Le 01-12-2013, Roy Smith r...@panix.com a écrit : class foo(type(open)): pass I get: Traceback (most recent call last): File stdin, line 1, in module TypeError: Error when calling the metaclass bases type 'builtin_function_or_method' is not an acceptable base type So, we're

Re: Extending the 'function' built-in class

2013-12-01 Thread Tim Chase
On 2013-12-01 19:18, G. wrote: Hi, I can't figure out how I can extend the 'function' built-in class. I tried: class test(function): def test(self): print(test) but I get an error. Is it possible ? While I don't have an answer, I did find this interesting. First, function doesn't

Re: Extending the 'function' built-in class

2013-12-01 Thread Gary Herron
On 12/01/2013 11:18 AM, G. wrote: Hi, I can't figure out how I can extend the 'function' built-in class. I tried: class test(function): def test(self): print(test) but I get an error. Is it possible ? Regards, G. What error do you get? What version of Python? What OS? And in

Re: Extending the 'function' built-in class

2013-12-01 Thread G.
Le 01-12-2013, Gary Herron gary.her...@islandtraining.com a écrit : And in particular: What 'function' built-in class? I know of no such thing, and the error message I get with your code says exactly that: NameError: name 'function' is not defined Did you not get that same error? Yes,

Re: Extending the 'function' built-in class

2013-12-01 Thread Robert Kern
On 2013-12-01 19:43, Tim Chase wrote: I'm not quite sure *why* one might want to subclass FunctionType, but I'm also not sure why you should be *prevented* from subclassing it. Previously:

Re: Python Unicode handling wins again -- mostly

2013-12-01 Thread wxjmfauth
0.11.13 02:44, Steven D'Aprano написав(ла): (2) If you reverse that string, does it give lëon? The implication of this question is that strings should operate on grapheme clusters rather than code points. ... BTW, a grapheme cluster *is* a code points cluster. jmf --

Re: Python Unicode handling wins again -- mostly

2013-12-01 Thread Tim Delaney
On 2 December 2013 07:15, wxjmfa...@gmail.com wrote: 0.11.13 02:44, Steven D'Aprano написав(ла): (2) If you reverse that string, does it give lëon? The implication of this question is that strings should operate on grapheme clusters rather than code points. ... BTW, a grapheme cluster

Checking Common File Types

2013-12-01 Thread jade
Hello, I'm trying to create a script that checks all the files in my 'downloaded' directory against common file types and then tells me how many of the files in that directory aren't either a GIF or a JPG file. I'm familiar with basic Python but this is the first time I've attempted anything

wiimote IR tracking in python

2013-12-01 Thread martin koh
Hi all..may i know how to do the IR tracking by using wiimote? i did tried the source code from (http://ph-elec.com/archives/simple-python-wii-mote-test/) using command prompt but i can't compile successfully, i think is because i don't have any idea how to import the cwiid module. Can anyone

Re: Python Unicode handling wins again -- mostly

2013-12-01 Thread Mark Lawrence
On 01/12/2013 20:54, Tim Delaney wrote: On 2 December 2013 07:15, wxjmfa...@gmail.com mailto:wxjmfa...@gmail.com wrote: 0.11.13 02:44, Steven D'Aprano написав(ла): (2) If you reverse that string, does it give lëon? The implication of this question is that strings should

Re: wiimote IR tracking in python

2013-12-01 Thread Johannes Findeisen
On Mon, 2 Dec 2013 05:59:07 +0800 martin koh wrote: Hi all..may i know how to do the IR tracking by using wiimote? i did tried the source code from (http://ph-elec.com/archives/simple-python-wii-mote-test/) using command prompt but i can't compile successfully, i think is because i don't

Re: Python Unicode handling wins again -- mostly

2013-12-01 Thread Tim Delaney
On 2 December 2013 09:06, Mark Lawrence breamore...@yahoo.co.uk wrote: I don't remember him ever having a valid point, so FTR can we have a reference please. I do remember Steven D'Aprano showing that there was a regression which I flagged up here http://bugs.python.org/issue16061. It was

Re: Checking Common File Types

2013-12-01 Thread Chris Angelico
On Mon, Dec 2, 2013 at 5:27 AM, jade jadec...@msn.com wrote: file_sigs = {'\xFF\xD8\xFF':('JPEG','jpg'), '\x47\x49\x46':('GIF','gif')} file_sig = fh.read(4) You're reading in four bytes, but your signatures are three bytes long. :) After that, all you need to do is look up file_sig in

Re: Python Unicode handling wins again -- mostly

2013-12-01 Thread Mark Lawrence
On 01/12/2013 22:29, Tim Delaney wrote: On 2 December 2013 09:06, Mark Lawrence breamore...@yahoo.co.uk mailto:breamore...@yahoo.co.uk wrote: I don't remember him ever having a valid point, so FTR can we have a reference please. I do remember Steven D'Aprano showing that there was

Re: Python Unicode handling wins again -- mostly

2013-12-01 Thread Ethan Furman
On 12/01/2013 02:06 PM, Mark Lawrence wrote: I don't remember him [jmf] ever having a valid point, so FTR can we have a reference please. I do remember Steven D'Aprano showing that there was a regression which I flagged up here http://bugs.python.org/issue16061. It was fixed by Serhiy

Re: Python Unicode handling wins again -- mostly

2013-12-01 Thread Mark Lawrence
On 01/12/2013 22:50, Ethan Furman wrote: On 12/01/2013 02:06 PM, Mark Lawrence wrote: I don't remember him [jmf] ever having a valid point, so FTR can we have a reference please. I do remember Steven D'Aprano showing that there was a regression which I flagged up here

Re: Need help with programming in python for class (beginner level)

2013-12-01 Thread Julio Schwarzbeck
On 11/29/2013 04:31 PM, farhan...@gmail.com wrote: It's for a school assignment. Basically, I need to roll 5 dies with 6 sides each. So basically, 6 random numbers. That part is easy. Then I need to add it up. Ok, done that. However, I also need to say something along the lines of your total

Re: Extending the 'function' built-in class

2013-12-01 Thread Mark Janssen
Hi, I can't figure out how I can extend the 'function' built-in class. I tried: class test(function): def test(self): print(test) but I get an error. Is it possible ? It has to do with differing models of computation, and python isn't designed for this. Perhaps you're

Re: Extending the 'function' built-in class

2013-12-01 Thread alex23
On 2/12/2013 5:18 AM, G. wrote: Hi, I can't figure out how I can extend the 'function' built-in class. I tried: class test(function): def test(self): print(test) but I get an error. Is it possible ? Others have pointed out that you cannot subclass the function type. Could you

RE: Checking Common File Types

2013-12-01 Thread jade
To: python-list@python.org From: wlfr...@ix.netcom.com Subject: Re: Checking Common File Types Date: Sun, 1 Dec 2013 18:23:22 -0500 On Sun, 1 Dec 2013 18:27:16 +, jade jadec...@msn.com declaimed the following: Hello, I'm trying to create a script that checks all the files in my

Re: Checking Common File Types

2013-12-01 Thread rusi
On Monday, December 2, 2013 5:11:15 AM UTC+5:30, jade wrote: To: pytho...@python.org From: wlf...@ix.netcom.com Subject: Re: Checking Common File Types Date: Sun, 1 Dec 2013 18:23:22 -0500 On Sun, 1 Dec 2013 18:27:16 +, jade jade...@msn.com declaimed the following: Hello,

Re: Extending the 'function' built-in class

2013-12-01 Thread Steven D'Aprano
On Sun, 01 Dec 2013 19:18:58 +, G. wrote: Hi, I can't figure out how I can extend the 'function' built-in class. I tried: class test(function): def test(self): print(test) but I get an error. Is it possible ? You cannot subclass the function type directly, but you can

[issue19842] selectors: refactor BaseSelector implementation

2013-12-01 Thread Charles-François Natali
Charles-François Natali added the comment: Guido van Rossum added the comment: LGTM, although I wish that you had time to implement the comment TODO: Subclasses can probably optimize this even further rather than just shuffling the existing code around. :-) I will look a this, but I

[issue19840] The is no way to tell shutil.move to ignore metadata

2013-12-01 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: -- nosy: +Arfrever ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19840 ___

[issue15798] subprocess.Popen() fails if 0, 1 or 2 descriptor is closed

2013-12-01 Thread Gregory P. Smith
Changes by Gregory P. Smith g...@krypto.org: -- resolution: fixed - stage: committed/rejected - commit review status: closed - open ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15798 ___

[issue15798] subprocess.Popen() fails if 0, 1 or 2 descriptor is closed

2013-12-01 Thread Roundup Robot
Roundup Robot added the comment: New changeset efcdf2a70f2a by Gregory P. Smith in branch '3.3': Undo supposed fix for Issue #15798 until I understand why this is http://hg.python.org/cpython/rev/efcdf2a70f2a New changeset ddbf9632795b by Gregory P. Smith in branch 'default': Undo supposed fix

[issue18885] handle EINTR in the stdlib

2013-12-01 Thread Charles-François Natali
Charles-François Natali added the comment: Just for the record, I was initially in favor of recomputing the timeout and retrying upon EINTR, but Guido prefers to return empty lists, and since that's a better compromise than the current situation (I've seen *many* people complaining on EINTR

[issue15798] subprocess.Popen() fails if 0, 1 or 2 descriptor is closed

2013-12-01 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: -- nosy: +Arfrever ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15798 ___

[issue19840] The is no way to tell shutil.move to ignore metadata

2013-12-01 Thread Claudiu.Popa
Changes by Claudiu.Popa pcmantic...@gmail.com: -- nosy: +Claudiu.Popa ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19840 ___ ___ Python-bugs-list

[issue19840] The is no way to tell shutil.move to ignore metadata

2013-12-01 Thread Claudiu.Popa
Claudiu.Popa added the comment: Hi. Here's a patch which adds `copy_function` parameter to `shutil.move`. -- keywords: +patch Added file: http://bugs.python.org/file32917/shutil.patch ___ Python tracker rep...@bugs.python.org

[issue19831] tracemalloc: stop the module later at Python shutdown

2013-12-01 Thread Roundup Robot
Roundup Robot added the comment: New changeset cc8953ea3c7e by Victor Stinner in branch 'default': Closes #19831: Stop tracemalloc later at Python shutdown to be able to use http://hg.python.org/cpython/rev/cc8953ea3c7e -- nosy: +python-dev resolution: - fixed stage: -

[issue5885] uuid.uuid1() is too slow

2013-12-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Instead hexadecimals in _long_from_uuid_t you can use _PyLong_FromByteArray. However adding new C implemented module has hight cost. I doubt that the speed up of UUID generation is worth this cost. -- nosy: +serhiy.storchaka

[issue19834] Unpickling exceptions pickled by Python 2

2013-12-01 Thread Walter Dörwald
Walter Dörwald added the comment: Here's an updated version of the patch, addressing most of Alexandre's comments. -- Added file: http://bugs.python.org/file32918/python-2-exception-pickling-2.diff ___ Python tracker rep...@bugs.python.org

[issue19842] selectors: refactor BaseSelector implementation

2013-12-01 Thread STINNER Victor
STINNER Victor added the comment: I think that's a cleaner design. For common containers like Sequence or Mapping, ABC are useful. But I don't expect new implementations of BaseSelector. Is it just for purity? :-p -- nosy: +haypo ___ Python

[issue19842] selectors: refactor BaseSelector implementation

2013-12-01 Thread STINNER Victor
STINNER Victor added the comment: (I'm not opposed to the change, I'm just asking.) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19842 ___ ___

[issue19776] Provide expanduser() on Path objects

2013-12-01 Thread Claudiu.Popa
Claudiu.Popa added the comment: Hello. Here's a patch for `expanduser()`. -- keywords: +patch nosy: +Claudiu.Popa Added file: http://bugs.python.org/file32919/pathlib.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19776

[issue19842] selectors: refactor BaseSelector implementation

2013-12-01 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: In those protocols where client and server exchange a lot of commands and responses in a single session, such as FTP, modify() is going to be called many times. I don't have actual numbers but I remember that using epoll.modify() was one of those

[issue19848] Misleading error on creating already existed symlink

2013-12-01 Thread Vajrasky Kok
New submission from Vajrasky Kok: Steps to reproduce the bug: 1. Download cute cat picture from internet. Name it CuteCat.jpg. import os os.listdir('.') ['CuteCat.jpg'] 2. Create symbolic link. os.symlink('CuteCat.jpg', 'Aaawww.lnk') os.listdir('.') ['Aaawww.lnk', 'CuteCat.jpg'] 3. Do it

[issue19848] Misleading error on creating already existed symlink

2013-12-01 Thread Vajrasky Kok
Vajrasky Kok added the comment: Python 2.7 on Windows does not have symlink. Python 3.3 on Windows got the same symptom as Python 3.4. Do we need to fix it? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19848

[issue19842] selectors: refactor BaseSelector implementation

2013-12-01 Thread Roundup Robot
Roundup Robot added the comment: New changeset f48f302f54aa by Charles-François Natali in branch 'default': Issue #19842: Refactor BaseSelector to make it an actual usable ABC. http://hg.python.org/cpython/rev/f48f302f54aa -- nosy: +python-dev ___

[issue19842] selectors: refactor BaseSelector implementation

2013-12-01 Thread Charles-François Natali
Charles-François Natali added the comment: STINNER Victor added the comment: I think that's a cleaner design. For common containers like Sequence or Mapping, ABC are useful. But I don't expect new implementations of BaseSelector. Is it just for purity? :-p There are already

[issue19506] subprocess.communicate() should use a memoryview

2013-12-01 Thread Charles-François Natali
Charles-François Natali added the comment: Impressive speedup :-) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19506 ___ ___ Python-bugs-list

[issue19837] Wire protocol encoding for the JSON module

2013-12-01 Thread Antoine Pitrou
Antoine Pitrou added the comment: The problem with adding new APIs with different names to the JSON module is that it breaks symmetry with other wire protocols. The quartet of module level load, loads, dump and dumps functions has become a de facto standard API for wire protocols. Breaking

[issue18885] handle EINTR in the stdlib

2013-12-01 Thread Antoine Pitrou
Antoine Pitrou added the comment: Guido's point was that it is already a bug in code to not check the elapsed time after a select call returns rather than assuming the full timeout time has elapsed. I don't understand how it's a bug. You're assuming select() has unreliable timing, but it

[issue10803] ctypes: better support of bytearray objects

2013-12-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Here is preliminary patch which makes bytearray support in ctypes better. -- keywords: +patch nosy: +amaury.forgeotdarc, belopolsky, meador.inge, serhiy.storchaka stage: - patch review versions: +Python 3.5 -Python 3.2 Added file:

[issue18885] handle EINTR in the stdlib

2013-12-01 Thread Antoine Pitrou
Antoine Pitrou added the comment: On dim., 2013-12-01 at 08:14 +, Charles-François Natali wrote: So really, I'm like Gregory: I don't care which solution we chose, but I just don't want to have to let the user handle EINTR. Well this is wishing thinking, since by returning an empty list

[issue17397] ttk::themes missing from ttk.py

2013-12-01 Thread klappnase
klappnase added the comment: Are 'unloaded but available' themes really available to use? Yes. Does Style.theme_use(available_name) work? Yes. If so, it seems to me that available_name should be reported by theme_names. I agree, one should think so. I am not 100% certain about that, but

[issue11489] json.dumps not parsable by json.loads (on Linux only)

2013-12-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you Arfrever. Does this patch fix the test? -- Added file: http://bugs.python.org/file32922/test_json_surrogates.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11489

[issue19804] test_uuid.TestUUID.test_find_mac() fails

2013-12-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Where ifconfig is located? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19804 ___ ___ Python-bugs-list

[issue16549] regression: -m json.tool module is broken

2013-12-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This doesn't look related to json tests. Are there other tests failures with similar symptoms (_assert_python is None)? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16549

[issue18885] handle EINTR in the stdlib

2013-12-01 Thread Charles-François Natali
Charles-François Natali added the comment: Well this is wishing thinking, since by returning an empty list you force the user to handle EINTR - just in a different way. I know that returning an empty list changes the semantics: I just think that's better - or not as bad - than the current

[issue18885] handle EINTR in the stdlib

2013-12-01 Thread Antoine Pitrou
Antoine Pitrou added the comment: I know that returning an empty list changes the semantics: I just think that's better - or not as bad - than the current possibility of having any single piece of code possibly die upon EINTR. If you want to implement retry with timeout re-computation, I'm

[issue19849] selectors behaviour on EINTR undocumented

2013-12-01 Thread Antoine Pitrou
New submission from Antoine Pitrou: Selector.Select() may return an empty list when interrupted, but the doc doesn't say so. The reader will probably trust the statement that If timeout is None, the call will block until a monitored file object becomes ready. -- assignee: docs@python

[issue19850] asyncio: limit EINTR occurrences with SA_RESTART

2013-12-01 Thread Charles-François Natali
New submission from Charles-François Natali: asyncio makes heavy use of SIGCHLD for subprocesses. A consequence of this if that a lot of syscalls can fail with EINTR (see e.g. issue #18885). The attached patch uses SA_RESTART (through signal.siginterrupt()) to limit EINTR occurrences, e.g. :

[issue19849] selectors behaviour on EINTR undocumented

2013-12-01 Thread Charles-François Natali
Charles-François Natali added the comment: How about this? -- keywords: +needs review, patch stage: - patch review Added file: http://bugs.python.org/file32924/selectors_select_signal.diff ___ Python tracker rep...@bugs.python.org

[issue19849] selectors behaviour on EINTR undocumented

2013-12-01 Thread Antoine Pitrou
Antoine Pitrou added the comment: Looks good to me. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19849 ___ ___ Python-bugs-list mailing list

[issue19849] selectors behaviour on EINTR undocumented

2013-12-01 Thread Roundup Robot
Roundup Robot added the comment: New changeset b0c4c7f04f05 by Charles-François Natali in branch 'default': Issue #19849: selectors: Document the possibility of early select() wakeup upon http://hg.python.org/cpython/rev/b0c4c7f04f05 -- nosy: +python-dev

[issue19849] selectors behaviour on EINTR undocumented

2013-12-01 Thread Charles-François Natali
Changes by Charles-François Natali cf.nat...@gmail.com: -- resolution: - fixed stage: patch review - committed/rejected status: open - closed versions: +Python 3.2 -Python 3.4 ___ Python tracker rep...@bugs.python.org

[issue18843] Py_FatalError (msg=0x7f0e3b373232 bad leading pad byte) at Python-2.7.5/Python/pythonrun.c:1689

2013-12-01 Thread Charles-François Natali
Changes by Charles-François Natali cf.nat...@gmail.com: -- status: open - pending ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18843 ___ ___

[issue1611154] os.path.exists(file/) failure on Solaris 9

2013-12-01 Thread Charles-François Natali
Changes by Charles-François Natali cf.nat...@gmail.com: -- resolution: - rejected stage: patch review - committed/rejected status: pending - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1611154

[issue19848] Misleading error on creating already existed symlink

2013-12-01 Thread Vajrasky Kok
Vajrasky Kok added the comment: This is the patch for Python 3.3. -- Added file: http://bugs.python.org/file32925/fix_python_33_windows_create_existed_symlink.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19848

[issue19851] imp.reload problem with submodule

2013-12-01 Thread Ronald Oussoren
New submission from Ronald Oussoren: To reproduce: * create a package with the following structure: pkg/ __init__.py _sub.py * __init__.py contains: from pkg._sub import * * the contents of _sub.py is not important * in a python shell do: import pkg._sub as s import

[issue19804] test_uuid.TestUUID.test_find_mac() fails

2013-12-01 Thread Arfrever Frehtes Taifersar Arahesis
Arfrever Frehtes Taifersar Arahesis added the comment: /bin/ifconfig (/bin is in ${PATH}.) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19804 ___

[issue19828] test_site fails with -S flag

2013-12-01 Thread Vajrasky Kok
Vajrasky Kok added the comment: Before patch: $ ./python -S Lib/test/test_site.py Traceback (most recent call last): File Lib/test/test_site.py, line 28, in module raise unittest.SkipTest(importation of site.py suppressed) unittest.case.SkipTest: importation of site.py suppressed After

[issue19804] test_uuid.TestUUID.test_find_mac() fails

2013-12-01 Thread Arfrever Frehtes Taifersar Arahesis
Arfrever Frehtes Taifersar Arahesis added the comment: This test passes (on all branches) after adding /bin to hardcoded list in uuid._find_mac(). Minimal solution: Add /bin and /usr/bin to that list. Better solution: Search ${PATH}+['/sbin/', '/usr/sbin'] for ifconfig. In =3.2

[issue19775] Provide samefile() on Path objects

2013-12-01 Thread Vajrasky Kok
Vajrasky Kok added the comment: Updated grammar according to Arfrever's review. Thanks! Anyway, should samefile accepts only string? Or should it accept Path object as well? -- Added file: http://bugs.python.org/file32927/pathlib_samefile_v2.patch

[issue16549] regression: -m json.tool module is broken

2013-12-01 Thread Arfrever Frehtes Taifersar Arahesis
Arfrever Frehtes Taifersar Arahesis added the comment: No other tests fail in this way. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16549 ___

[issue19852] Misplaced private API method in pathlib.py

2013-12-01 Thread Vajrasky Kok
New submission from Vajrasky Kok: In class Path, line 942, you have this comment: # Public API but down there, in line 1048, you have this private method: def _raw_open(self, flags, mode=0o777): Open the file pointed by this path and return a file descriptor, as

[issue11489] json.dumps not parsable by json.loads (on Linux only)

2013-12-01 Thread Arfrever Frehtes Taifersar Arahesis
Arfrever Frehtes Taifersar Arahesis added the comment: test_json_surrogates.patch fixes these tests. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11489 ___

[issue18994] Inside fcntl module, we does not check the return code of all_ins function

2013-12-01 Thread Roundup Robot
Roundup Robot added the comment: New changeset 84148898a606 by Charles-François Natali in branch 'default': Issue #18994: Add a missing check for a return value in fcntmodule. Patch by http://hg.python.org/cpython/rev/84148898a606 -- nosy: +python-dev

[issue19848] Misleading error on creating already existed symlink

2013-12-01 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: -- nosy: +Arfrever ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19848 ___

[issue18994] Inside fcntl module, we does not check the return code of all_ins function

2013-12-01 Thread Charles-François Natali
Charles-François Natali added the comment: Vajrasky, thanks for the patch! -- resolution: - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18994

[issue19851] imp.reload problem with submodule

2013-12-01 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: -- nosy: +Arfrever ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19851 ___

[issue19853] Add support for Bitrig

2013-12-01 Thread Martin Natano
New submission from Martin Natano: This patch adds support for Bitrig to 2.7. -- components: Build files: cpython2.7-bitrig.patch keywords: patch messages: 204930 nosy: Martin.Natano priority: normal severity: normal status: open title: Add support for Bitrig versions: Python 2.7 Added

[issue19854] Add support for Bitrig to 3.4

2013-12-01 Thread Martin Natano
New submission from Martin Natano: This patch adds support for Bitrig to 3.4. -- components: Build files: cpython3.4-bitrig.patch keywords: patch messages: 204931 nosy: Martin.Natano priority: normal severity: normal status: open title: Add support for Bitrig to 3.4 versions: Python 3.4

[issue19853] Add support for Bitrig to 2.7

2013-12-01 Thread Martin Natano
Changes by Martin Natano natanopta...@gmail.com: -- title: Add support for Bitrig - Add support for Bitrig to 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19853 ___

[issue19855] uuid._find_mac fails if an executable not in /sbin or /usr/sbin

2013-12-01 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: The uuid._find_mac() function tests that executable file exist before run it. First it tries to run unmodified executable name (i.e. from $PATH) and then from the /sbin or /usr/sbin directories. However test for unmodified executable name is wrong,

[issue19855] uuid._find_mac fails if an executable not in /sbin or /usr/sbin

2013-12-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Initially the issue was reported in msg204881. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19855 ___ ___

[issue19804] test_uuid.TestUUID.test_find_mac() fails

2013-12-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This is different issue. See issue19855. -- resolution: - fixed stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19804

[issue19804] test_uuid.TestUUID.test_find_mac() fails

2013-12-01 Thread Arfrever Frehtes Taifersar Arahesis
Arfrever Frehtes Taifersar Arahesis added the comment: The test currently uses: @unittest.skipUnless(os.name == 'posix', 'requires Posix') Maybe this test should be skipped also on posix systems with ifconfig not available at all? -- ___ Python

[issue11489] json.dumps not parsable by json.loads (on Linux only)

2013-12-01 Thread Roundup Robot
Roundup Robot added the comment: New changeset 02d186e3af09 by Serhiy Storchaka in branch '2.7': Fixed JSON tests on wide build when ran from *.pyc files (issue #11489). http://hg.python.org/cpython/rev/02d186e3af09 -- ___ Python tracker

[issue10976] json.loads() raises TypeError on bytes object

2013-12-01 Thread Martin v . Löwis
Martin v. Löwis added the comment: Bike-shedding: instead of jsonb, make it json.bytes. Else, it may get confused with other protocols, such as JSONP or BSON. -- nosy: +loewis ___ Python tracker rep...@bugs.python.org

[issue11489] json.dumps not parsable by json.loads (on Linux only)

2013-12-01 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- resolution: - fixed stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11489 ___

[issue18716] Deprecate the formatter module

2013-12-01 Thread Brett Cannon
Brett Cannon added the comment: On Sun, Dec 1, 2013 at 12:36 AM, Larry Hastings rep...@bugs.python.orgwrote: Larry Hastings added the comment: They're not on Python 3. I think we should keep the deprecation and let them roll their own when they upgrade. It's not like the module provides

[issue19837] Wire protocol encoding for the JSON module

2013-12-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I agree that adding a new module is very bad idea. I think that the reviving the encoding parameter is a lest wrong way. json.dumps() should return bytes when the encoding argument is specifiead and str otherwise. json.dump() should write binary data when

[issue19853] Add support for Bitrig to 2.7

2013-12-01 Thread Brett Cannon
Brett Cannon added the comment: To prevent lesser-used OSs from being poorly serviced by Python we do not accept patches to add support for them. We suggest alternative OSs keep their own set of patches external to Python for ease of updating. We have mirrors on both bitbucket and github if

[issue19854] Add support for Bitrig to 3.4

2013-12-01 Thread Brett Cannon
Brett Cannon added the comment: As I said on the similar bug for adding support in Python 2.7: To prevent lesser-used OSs from being poorly serviced by Python we do not accept patches to add support for them. We suggest alternative OSs keep their own set of patches external to Python for ease

[issue19848] Misleading error on creating already existed symlink

2013-12-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: There are several similar issues on the tracker. -- nosy: +serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19848 ___

[issue19848] Misleading error on creating already existed symlink

2013-12-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: See issue16074. -- resolution: - duplicate stage: - committed/rejected status: open - closed superseder: - bad error message in os.rename ___ Python tracker rep...@bugs.python.org

[issue16074] bad error message in os.rename

2013-12-01 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- keywords: +3.3regression ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16074 ___ ___

[issue19850] asyncio: limit EINTR occurrences with SA_RESTART

2013-12-01 Thread Guido van Rossum
Guido van Rossum added the comment: Do you haven an example of a program using asyncio that fails because of this? Adding gps because he seems to agree that EINTR must die. -- nosy: +gregory.p.smith ___ Python tracker rep...@bugs.python.org

[issue19828] test_site fails with -S flag

2013-12-01 Thread R. David Murray
R. David Murray added the comment: That's not relevant, though. In fact, the existing error message for running the module directly is exactly correct: the entire test module fails to run, which is a more accurate reflection of the reality than showing all of the individual tests as skipped.

[issue19839] bz2: regression wrt supporting files with trailing garbage after EOF

2013-12-01 Thread Nadeem Vawda
Nadeem Vawda added the comment: I'll have a patch for this in the next couple of days (and a similar one for the lzma module, which has the same issue (even though it's not a regression in that case)). In the meanwhile, you can work around this by feeding the compressed data to a

[issue19804] test_uuid.TestUUID.test_find_mac() fails

2013-12-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: When someone will report about failures on such systems. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19804 ___

  1   2   >