Re: Why Python 3?

2014-04-22 Thread Gregory Ewing
Chris Angelico wrote: As it is, we have the case that most lowish integers have equivalent floats (all integers within the range that most people use them), and beyond that, you have problems. No, I don't. I'm not talking about representing ints using floats, I'm talking about representing

Re: Unicode in Python

2014-04-22 Thread Steven D'Aprano
On Mon, 21 Apr 2014 20:57:39 -0700, Rustom Mody wrote: As a unicode user (ok wannabe unicode user :D ) Ive written up some unicode ideas that have been discussed here in the last couple of weeks: http://blog.languager.org/2014/04/unicoded-python.html What you are talking about is not

Re: Unicode in Python

2014-04-22 Thread Rustom Mody
On Tuesday, April 22, 2014 11:14:17 AM UTC+5:30, Terry Reedy wrote: On 4/21/2014 11:57 PM, Rustom Mody wrote: As a unicode user (ok wannabe unicode user :D ) Ive written up some unicode ideas that have been discussed here in the last couple of weeks:

Re: Unicode in Python

2014-04-22 Thread Ian Kelly
On Apr 22, 2014 12:01 AM, Rustom Mody rustompm...@gmail.com wrote: As a unicode user (ok wannabe unicode user :D ) Ive written up some unicode ideas that have been discussed here in the last couple of weeks: http://blog.languager.org/2014/04/unicoded-python.html I'm reminded of this satire:

Re: Unicode in Python

2014-04-22 Thread Chris Angelico
On Tue, Apr 22, 2014 at 4:18 PM, Rustom Mody rustompm...@gmail.com wrote: Ive reworded it to make it clear that I am referring to the character-sets and not encodings. It's still false, and was in Python 2 as well. The only difference on that front is that, in the absence of an encoding cookie,

Re: Unicode in Python

2014-04-22 Thread Rustom Mody
On Tuesday, April 22, 2014 11:41:56 AM UTC+5:30, Steven D'Aprano wrote: On Mon, 21 Apr 2014 20:57:39 -0700, Rustom Mody wrote: As a unicode user (ok wannabe unicode user :D ) Ive written up some unicode ideas that have been discussed here in the last couple of weeks:

Re: Unicode in Python

2014-04-22 Thread Chris Angelico
On Tue, Apr 22, 2014 at 4:30 PM, Rustom Mody rustompm...@gmail.com wrote: So instead of using λ (0x3bb) we should use 흀 (0x1d740) or something thereabouts like 휆 You still have a major problem: How do you type that? It gives you very little advantage over the word lambda, it introduces

Running programs on mobile phones

2014-04-22 Thread Mok-Kong Shen
I have seen by chance a number of years ago a book on Python programming for running on mobile phones (of a certain producer only). What is the current state of the art in that? Could someone kindly give a few good literature references? Thanks in advance. M. K. Shen --

Re: Unicode in Python

2014-04-22 Thread wxjmfauth
Le mardi 22 avril 2014 08:30:45 UTC+2, Rustom Mody a écrit : @ rusy Ive reworded it to make it clear that I am referring to the character-sets and not encodings. Very good, excellent, comment. An healthy coding scheme can only work properly with a unique characters set and the coding is

Re: How to properly get the microseconds from the timestamps?

2014-04-22 Thread Vlastimil Brom
2014-04-22 4:38 GMT+02:00 Igor Korot ikoro...@gmail.com: ... datetime.datetime.fromtimestamp(1092787200/1000.0) datetime.datetime(1970, 1, 13, 7, 33, 7, 20) Is there a way to know if the timestamp has a microseconds? Thank you. -- Hi, I believe, in these cases, you can just test,

Best Website Design Services by Professional Web Designing Company

2014-04-22 Thread aveinfosys
Ave Infosys is a leading professional in Web Designing Company in Hyderabad India for the E-Business Industry.Ave Infosys are providing Best Website Development and Design Services in Hyderabad.Our company offers the Best Web Design Development services, Web Hosting Services,Responsive

Re: Unicode in Python

2014-04-22 Thread Rustom Mody
On Tuesday, April 22, 2014 12:01:06 PM UTC+5:30, Ian wrote: On Apr 22, 2014 12:01 AM, Rustom Mody rusto...@gmail.com wrote: As a unicode user (ok wannabe unicode user :D ) Ive written up some unicode ideas that have been discussed here in the last couple of weeks:

[ANN] Pylint 1.2 released

2014-04-22 Thread Sylvain Thénault
Hi there, Pylint 1.2 has been uploaded to pypi by the end of the last week! More info on this heavy release on http://www.logilab.org/blogentry/240019. As usual, feedback and comments welcome. Enjoy! -- Sylvain Thénault, LOGILAB, Paris (01.45.32.03.12) - Toulouse (05.62.17.16.42) Formations

Strange syntax error, occurs only when script is executed directly

2014-04-22 Thread Antoon Pardon
I am workin on a solaris 11 machine. The python version is 2.7.6 path to python is /opt/local/bin/python. These are the 15 first lines of the script: #! /opt/local/bin/python class vslice(object): def __init__(self, fun): self.fun = fun def __getitem__(self,

Re: Strange syntax error, occurs only when script is executed directly

2014-04-22 Thread Tim Golden
On 22/04/2014 11:29, Antoon Pardon wrote: I am workin on a solaris 11 machine. The python version is 2.7.6 path to python is /opt/local/bin/python. These are the 15 first lines of the script: #! /opt/local/bin/python class vslice(object): def __init__(self, fun):

Re: Strange syntax error, occurs only when script is executed directly

2014-04-22 Thread Frank Millman
Antoon Pardon antoon.par...@rece.vub.ac.be wrote in message news:535644a4.6060...@rece.vub.ac.be... I am workin on a solaris 11 machine. The python version is 2.7.6 path to python is /opt/local/bin/python. [...] Now if I execute the script by explicitly calling the interpreter everything

Re: Strange syntax error, occurs only when script is executed directly

2014-04-22 Thread Antoon Pardon
On 22-04-14 12:42, Frank Millman wrote: Antoon Pardon antoon.par...@rece.vub.ac.be wrote in message news:535644a4.6060...@rece.vub.ac.be... I am workin on a solaris 11 machine. The python version is 2.7.6 path to python is /opt/local/bin/python. [...] Now if I execute the script by

Re: Strange syntax error, occurs only when script is executed directly

2014-04-22 Thread Chris Angelico
On Tue, Apr 22, 2014 at 8:29 PM, Antoon Pardon antoon.par...@rece.vub.ac.be wrote: However if I call the script directly and want the #! line do its work I get the following error. # /usr/local/bin/ldapwatch /opt/local/log/openldap.log | head /usr/local/bin/ldapwatch: line 3: syntax error

Re: Strange syntax error, occurs only when script is executed directly [solved]

2014-04-22 Thread Antoon Pardon
On 22-04-14 14:09, Chris Angelico wrote: On Tue, Apr 22, 2014 at 8:29 PM, Antoon Pardon antoon.par...@rece.vub.ac.be wrote: However if I call the script directly and want the #! line do its work I get the following error. # /usr/local/bin/ldapwatch /opt/local/log/openldap.log | head

Re: Unicode in Python

2014-04-22 Thread Steven D'Aprano
On Tue, 22 Apr 2014 02:07:58 -0700, wxjmfauth wrote: Le mardi 22 avril 2014 08:30:45 UTC+2, Rustom Mody a écrit : @ rusy Ive reworded it to make it clear that I am referring to the character-sets and not encodings. Very good, excellent, comment. An healthy coding scheme can only

Re: Strange syntax error, occurs only when script is executed directly [solved]

2014-04-22 Thread Chris Angelico
On Tue, Apr 22, 2014 at 10:21 PM, Antoon Pardon antoon.par...@rece.vub.ac.be wrote: Yes that was it. I changed the first line of my script to: #!/opt/local/bin/python2.7 and it now works. Excellent! Shebangs are *extremely* specific, so you may want to consider using /usr/bin/env python to

Re: Strange syntax error, occurs only when script is executed directly

2014-04-22 Thread Steven D'Aprano
On Tue, 22 Apr 2014 12:29:56 +0200, Antoon Pardon wrote: I am workin on a solaris 11 machine. The python version is 2.7.6 path to python is /opt/local/bin/python. Are you sure about that? You ought to double check that /opt/local/bin/ python is what you think it is, and not (say) a symlink to

Re: Strange syntax error, occurs only when script is executed directly

2014-04-22 Thread Chris Angelico
On Tue, Apr 22, 2014 at 10:36 PM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: These are the 15 first lines of the script: #! /opt/local/bin/python This being Solaris, what happens if you remove the space between the hash- bang and the path? On Linux it makes no difference,

Re: Strange syntax error, occurs only when script is executed directly [solved]

2014-04-22 Thread Antoon Pardon
On 22-04-14 14:26, Chris Angelico wrote: On Tue, Apr 22, 2014 at 10:21 PM, Antoon Pardon antoon.par...@rece.vub.ac.be wrote: Yes that was it. I changed the first line of my script to: #!/opt/local/bin/python2.7 and it now works. Excellent! Shebangs are *extremely* specific, so you may

Re: Strange syntax error, occurs only when script is executed directly [solved]

2014-04-22 Thread Chris Angelico
On Tue, Apr 22, 2014 at 11:01 PM, Antoon Pardon antoon.par...@rece.vub.ac.be wrote: On 22-04-14 14:26, Chris Angelico wrote: On Tue, Apr 22, 2014 at 10:21 PM, Antoon Pardon antoon.par...@rece.vub.ac.be wrote: Yes that was it. I changed the first line of my script to:

Re: Strange syntax error, occurs only when script is executed directly

2014-04-22 Thread Tim Chase
On 2014-04-22 22:52, Chris Angelico wrote: I'm pretty sure the POSIX standard stipulates that a space there is optional. Should be no difference between #!/ and #! / on any compliant OS. (But I can't right now find a citation for that, so I may be wrong.) I wondered this too, so went

Re: Strange syntax error, occurs only when script is executed directly

2014-04-22 Thread Chris Angelico
On Tue, Apr 22, 2014 at 11:22 PM, Tim Chase python.l...@tim.thechases.com wrote: On 2014-04-22 22:52, Chris Angelico wrote: I'm pretty sure the POSIX standard stipulates that a space there is optional. Should be no difference between #!/ and #! / on any compliant OS. (But I can't right now

Re: Best Website Design Services by Professional Web Designing Company

2014-04-22 Thread alister
On Tue, 22 Apr 2014 02:21:01 -0700, aveinfosys wrote: Ave Infosys is a leading professional in Web Designing Company in Hyderabad India for the E-Business Industry.Ave Infosys are providing Best Website Development and Design Services in Hyderabad.Our company offers the Best Web Design

Google open positions at Shanghai/China ?

2014-04-22 Thread Wesley
Hi guys, Anybody know if there are openning positions at Shanghai, China? Just ask for one of my friend in case someone here woring for Google:-) Although see some opened positions from google career, seems no actaully hire going on. Thanks. Wesley --

Re: Best Website Design Services by Professional Web Designing Company

2014-04-22 Thread Chris Angelico
On Tue, Apr 22, 2014 at 11:40 PM, alister alister.nospam.w...@ntlworld.com wrote: Considering the poor quality of your own site it is hardly surprising that you have to resorts to spamming a totally unrelated newsgroup/ mailing list. If you *must* respond to spam, please at least trim out the

Re: Best Website Design Services by Professional Web Designing Company

2014-04-22 Thread alister
On Wed, 23 Apr 2014 00:35:37 +1000, Chris Angelico wrote: On Tue, Apr 22, 2014 at 11:40 PM, alister alister.nospam.w...@ntlworld.com wrote: Considering the poor quality of your own site it is hardly surprising that you have to resorts to spamming a totally unrelated newsgroup/ mailing list.

Re: Unicode in Python

2014-04-22 Thread wxjmfauth
Le mardi 22 avril 2014 14:21:40 UTC+2, Steven D'Aprano a écrit : On Tue, 22 Apr 2014 02:07:58 -0700, wxjmfauth wrote: Le mardi 22 avril 2014 08:30:45 UTC+2, Rustom Mody a écrit : @ rusy Ive reworded it to make it clear that I am referring to the

Re: Running programs on mobile phones

2014-04-22 Thread Miki Tebeka
I have seen by chance a number of years ago a book on Python programming for running on mobile phones (of a certain producer only). What is the current state of the art in that? Could someone kindly give a few good literature references? Thanks in advance. I'm not an expert, but take a look at

Re: Unicode in Python

2014-04-22 Thread Rustom Mody
On Tuesday, April 22, 2014 12:01:06 PM UTC+5:30, Ian wrote: On Apr 22, 2014 12:01 AM, Rustom Mody rusto...@gmail.com wrote: As a unicode user (ok wannabe unicode user :D ) Ive written up some unicode ideas that have been discussed here in the last couple of weeks:

analyse Chinese language using Python code

2014-04-22 Thread linda.s
How to analyse Chinese language using Python code? -- https://mail.python.org/mailman/listinfo/python-list

Re: analyse Chinese language using Python code

2014-04-22 Thread haiticare2011
On Tuesday, April 22, 2014 3:04:39 PM UTC-4, linda.s wrote: How to analyse Chinese language using Python code? You will need to program a pattern recognizer system. Are you interested in spoken chinese or written Kanji? xie xie JB -- https://mail.python.org/mailman/listinfo/python-list

Glade on Windows using Python

2014-04-22 Thread mbg1708
Using Windows 8.1 Update. I've loaded ActiveState python (version 2.7) --- installed OK. I don't need Glade, but I do want to use some Glade XML and run the python application. To run a Glade application this needs: from gi.repository import Gtk gi.repository is not available to import.

Why does isoformat() optionally not print the fractional seconds?

2014-04-22 Thread Travis Griggs
Python(3) let me down today. Better to be explicit, and all that, didn’t pan out for me. I have time series data being recorded in a mongo database (I love pymongo). I have an iOS app that consumes the data. Since JSON doesn’t have a time format, I have to stringify the times when transmitting

Re: Strange syntax error, occurs only when script is executed directly

2014-04-22 Thread Andrew Cooper
On 22/04/2014 13:52, Chris Angelico wrote: On Tue, Apr 22, 2014 at 10:36 PM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: These are the 15 first lines of the script: #! /opt/local/bin/python This being Solaris, what happens if you remove the space between the hash- bang and

Re: Strange syntax error, occurs only when script is executed directly [solved]

2014-04-22 Thread Andrew Cooper
On 22/04/2q014 13:26, Chris Angelico wrote: On Tue, Apr 22, 2014 at 10:21 PM, Antoon Pardon antoon.par...@rece.vub.ac.be wrote: Yes that was it. I changed the first line of my script to: #!/opt/local/bin/python2.7 and it now works. Excellent! Shebangs are *extremely* specific, so you may

Re: Strange syntax error, occurs only when script is executed directly [solved]

2014-04-22 Thread Andrew Cooper
On 22/04/2q014 13:26, Chris Angelico wrote: On Tue, Apr 22, 2014 at 10:21 PM, Antoon Pardon antoon.par...@rece.vub.ac.be wrote: Yes that was it. I changed the first line of my script to: #!/opt/local/bin/python2.7 and it now works. Excellent! Shebangs are *extremely* specific, so you may

Re: Why does isoformat() optionally not print the fractional seconds?

2014-04-22 Thread MRAB
On 2014-04-23 01:05, Travis Griggs wrote: Python(3) let me down today. Better to be explicit, and all that, didn’t pan out for me. I have time series data being recorded in a mongo database (I love pymongo). I have an iOS app that consumes the data. Since JSON doesn’t have a time format, I

Unicode in Python

2014-04-22 Thread Rustom Mody
Chris Angelico wrote: it's impossible for most people to type (and programming with a palette of arbitrary syntactic tokens isn't my idea of fun)... Where's the suggestion to use a palette of arbitrary tokens ? I just tried a greek keyboard; ie do $ setxkbmap -option

object().__dict__

2014-04-22 Thread Pavel Volkov
There are some basics about Python objects I don't understand. Consider this snippet: class X: pass ... x = X() dir(x) ['__class__', '__delattr__', '__dict__', '__dir__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', '__gt__', '__hash__', '__init__', '__le__', '__lt__',

Re: Unicode in Python

2014-04-22 Thread Chris Angelico
On Wed, Apr 23, 2014 at 3:31 PM, Rustom Mody rustompm...@gmail.com wrote: Chris Angelico wrote: it's impossible for most people to type (and programming with a palette of arbitrary syntactic tokens isn't my idea of fun)... Where's the suggestion to use a palette of arbitrary tokens ? I just

Re: Unicode in Python

2014-04-22 Thread Steven D'Aprano
On Tue, 22 Apr 2014 22:31:41 -0700, Rustom Mody wrote: Chris Angelico wrote: it's impossible for most people to type (and programming with a palette of arbitrary syntactic tokens isn't my idea of fun)... Where's the suggestion to use a palette of arbitrary tokens ? I just tried a greek

[issue9338] argparse optionals with nargs='?', '*' or '+' can't be followed by positionals

2014-04-22 Thread paul j3
paul j3 added the comment: http://bugs.python.org/issue15112 breaks one test that I added to issue +class TestPositionalsAfterOptionalsPlus(ParserTestCase): +Tests specifying a positional that follows an arg with nargs=+ +http://bugs.python.org/issue9338#msg111270 +

[issue6305] islice doesn't accept large stop values

2014-04-22 Thread Raymond Hettinger
Raymond Hettinger added the comment: The first patch was cleaner. I don't think it is necessary to start-fast and switch-to-slow in the case where not all of the arguments are in the normal range. -- ___ Python tracker rep...@bugs.python.org

[issue21321] itertools.islice() doesn't release reference to the source iterator when the slice is exhausted

2014-04-22 Thread Raymond Hettinger
Raymond Hettinger added the comment: The ref-counts in the islice_reduce code don't look to be correct at first glance. -- assignee: - rhettinger ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21321

[issue21320] dict() allows keyword expansion with integer keys, e.g. dict(**{5:'v'})

2014-04-22 Thread Raymond Hettinger
Raymond Hettinger added the comment: IIRC, we've only created -3 warnings for things that would be incorrectly accepted by Python 3 (such as floor division using /). I don't think that applies here and isn't worth monkeying with Py2.7. It goes in the harmless nuisance category, something

[issue21326] asyncio: request clearer error message when event loop closed

2014-04-22 Thread Mark Dickinson
New submission from Mark Dickinson: In the new asyncio library, it's easy for newbies (like me) to accidentally try to run a coroutine on a closed event loop. Doing so leads to a rather inscrutable exception and traceback: loop.run_until_complete(compute()) Traceback (most recent call

[issue21322] Pathlib .owner() and .group() methods fail on broken links

2014-04-22 Thread Iñigo Serna
Iñigo Serna added the comment: Mainly, 2 reasons: - It can make programs crash *unexpectedly* - Pathlib should provide a complete and uniform API for dealing with all types of files. If not, users would need to use Pathlib for some kind of files and go to os and os.path for others, then why

[issue21322] Pathlib .owner() and .group() methods fail on broken links

2014-04-22 Thread Antoine Pitrou
Antoine Pitrou added the comment: - It can make programs crash *unexpectedly* A broken link is an error, so it's normal to have an exception raised here. An exception can always be caught if you were expecting the error. - Pathlib should provide a complete and uniform API for dealing with

[issue18967] Find a less conflict prone approach to Misc/NEWS

2014-04-22 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: FWIW: I don't think we need to manage the news entries in the NEWS file. Instead, we could simply add a field to the bug tracker called news entry and populate that as necessary. During release, this information can then be used to create a NEWS file per

[issue21256] Sort keyword arguments in mock _format_call_signature

2014-04-22 Thread Michael Foord
Michael Foord added the comment: I agree with Antoine's review comments. With those changes in place, ok to commit. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21256 ___

[issue21327] socket.type value changes after using settimeout()

2014-04-22 Thread Giampaolo Rodola'
New submission from Giampaolo Rodola': s = socket.socket() s.type SocketType.SOCK_STREAM: 1 s.settimeout(2) s.type 2049 I can reproduce this with Python 3.5, 3.4 and 3.3. 2.7 is not affected. -- messages: 216999 nosy: giampaolo.rodola priority: normal severity: normal status:

[issue21327] socket.type value changes after using settimeout()

2014-04-22 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: It seems this was introduced in issue 7523 / revision 12442ac3f7dd. -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21327 ___

[issue21327] socket.type value changes after using settimeout()

2014-04-22 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' g.rod...@gmail.com: -- Removed message: http://bugs.python.org/msg217001 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21327 ___

[issue21327] socket.type value changes after using settimeout()

2014-04-22 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: Generally speaking I think it's fine to have this behavior only if the socket object is instantiated like this: s = socket.socket(type=socket.SOCK_STREAM | socket.SOCK_NONBLOCK) s.type 2049 ...but when it comes to using setblocking() I would not expect

[issue21327] socket.type value changes after using settimeout()

2014-04-22 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: Generally speaking I think it's fine to have this behavior only if the socket object is instantiated like this: s = socket.socket(type=socket.SOCK_STREAM | socket.SOCK_NONBLOCK) s.type 2049 ...but when it comes to using settimeout() I would not expect

[issue6305] islice doesn't accept large stop values

2014-04-22 Thread Alok Singhal
Alok Singhal added the comment: OK. Here is the first patch with a couple of bug fixes for slow mode. -- Added file: http://bugs.python.org/file34999/islice_large_values-3.patch ___ Python tracker rep...@bugs.python.org

[issue20147] multiprocessing.Queue.get() raises queue.Empty exception if even if an item is available

2014-04-22 Thread Alexei Mozhaev
Alexei Mozhaev added the comment: We have a similar bug with Queue.get(). Queue.get(False) raises an exception Queue.Empty in the case when the queue is actually not empty! An example of the code is attached and is listed below just in case: -- import multiprocessing

[issue21328] Resize doesn't change reported length on create_string_buffer()

2014-04-22 Thread Dustin Oprea
New submission from Dustin Oprea: The memory is resized, but the value returned by len() doesn't change: b = ctypes.create_string_buffer(23) len(b) 23 b.raw = '0' * 23 b.raw = '0' * 24 Traceback (most recent call last): File stdin, line 1, in module ValueError: string too long

[issue21255] Attaching a PropertyMock records calls

2014-04-22 Thread Michael Foord
Michael Foord added the comment: Not sure, but I guess it would be easy to find out. It will need some digging into to find out where the actual bug is. It shouldn't be hard to find though. -- ___ Python tracker rep...@bugs.python.org

[issue21326] asyncio: request clearer error message when event loop closed

2014-04-22 Thread Guido van Rossum
Guido van Rossum added the comment: Hm, I've never hear from someone who did this before. It might be easy to fix, but it would be ugly too (every EventLoop method would have to check this), and not very useful (you'll only make this mistake once in your life). How much time did you waste

[issue21326] asyncio: request clearer error message when event loop closed

2014-04-22 Thread Mark Dickinson
Mark Dickinson added the comment: Maybe we can just change repr(loop) to make it clear that it's closed? That sounds good to me. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21326 ___

[issue21326] asyncio: request clearer error message when event loop closed

2014-04-22 Thread Mark Dickinson
Mark Dickinson added the comment: How much time did you waste debugging this? Not much: less than 5 minutes. While I *probably* won't make this mistake again (though I'm not going to make any promises on that front), it would be nice to prevent other people from doing so. More info: I got

[issue21138] mimetypes.MimeType UnicodeDecodeError

2014-04-22 Thread Tim Golden
Tim Golden added the comment: This looks like a duplicate of issue9291; could you test the latest patch over there, please? -- assignee: - tim.golden nosy: +tim.golden ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21138

[issue21325] Missing Generic EXIF library for images in the standard library

2014-04-22 Thread Brett Cannon
Brett Cannon added the comment: A guide on how to get a module added to the stdlib can be found at https://docs.python.org/devguide/stdlibchanges.html#adding-a-new-module , although I think an EXIF module is going to be too niche to ever be accepted. -- nosy: +brett.cannon

[issue21329] configparser can't parse MySQL style config

2014-04-22 Thread Daniël van Eeden
New submission from Daniël van Eeden: With Python 2.7 the ConfigParser was enriched with the allow_no_value option which resulted in a much more usable configparser for MySQL configs. It can now parse configs like this: [mysqld] log_bin innodb_file_per_table innodb_io_capacity=800 However it

[issue21303] Python 2.7 Spinbox Format Behaves Differently On Windows Versus Linux

2014-04-22 Thread Zachary Ware
Zachary Ware added the comment: 8.5.15 sounds good to me; here's the patch to 2.7 once the 8.5.15 sources are on svn.python.org as tcl-8.5.15.0 and tk-8.5.15.0, no modifications necessary. -- keywords: +patch Added file: http://bugs.python.org/file35002/issue21303-2.7-tcl-upgrade.diff

[issue21328] Resize doesn't change reported length on create_string_buffer()

2014-04-22 Thread Berker Peksag
Changes by Berker Peksag berker.pek...@gmail.com: -- nosy: +meador.inge ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21328 ___ ___

[issue21321] itertools.islice() doesn't release reference to the source iterator when the slice is exhausted

2014-04-22 Thread Anton Afanasyev
Anton Afanasyev added the comment: Hi Raymond, do you mean allocation exceptions handling should be more accurate? Attaching fixed version for 3.4 branch. -- Added file: http://bugs.python.org/file35003/issue21321_3.4_8c8315bac6a8_2.diff ___ Python

[issue20147] multiprocessing.Queue.get() raises queue.Empty exception if even if an item is available

2014-04-22 Thread Ned Deily
Changes by Ned Deily n...@acm.org: -- nosy: +sbt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20147 ___ ___ Python-bugs-list mailing list

[issue17552] socket.sendfile()

2014-04-22 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: Yet another patch fixing some problems on Windows. Hopefully this should be the last one as for what concerns the POSIX systems. As such I would kindly ask for a review and/or further suggestions. -- Added file:

[issue21329] configparser can't parse MySQL style config

2014-04-22 Thread Ned Deily
Changes by Ned Deily n...@acm.org: -- nosy: +lukasz.langa ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21329 ___ ___ Python-bugs-list mailing

[issue21330] Typo in Unicode HOWTO documentation

2014-04-22 Thread Jayanth Raman
New submission from Jayanth Raman: It should be 128 such characters in the following sentence: For example, you can’t fit both the accented characters used in Western Europe and the Cyrillic alphabet used for Russian into the 128-255 range because there are more than 127 such characters.

[issue7511] msvc9compiler.py: ValueError when trying to compile with VC Express

2014-04-22 Thread Mike Mazurek
Mike Mazurek added the comment: In building pycrypto for python 3.4 I applied patch msvccompiler9_33.diff. After applying the patch there is an unassigned variable: KEY_BASE on line 67 of the patched file. After setting KEY_BASE = Software\\Wow6432Node\\Microsoft\\ before its first use I was

[issue6721] Locks in python standard library should be sanitized on fork

2014-04-22 Thread Forest Bond
Changes by Forest Bond for...@alittletooquiet.net: -- nosy: +forest_atq ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6721 ___ ___

[issue20565] Update Tcl/Tk version for buildbots

2014-04-22 Thread Roundup Robot
Roundup Robot added the comment: New changeset 2b8d9276ad5b by Zachary Ware in branch '2.7': Issue #21303, #20565: Updated the version of Tcl/Tk used on Windows http://hg.python.org/cpython/rev/2b8d9276ad5b -- nosy: +python-dev ___ Python tracker

[issue21303] Python 2.7 Spinbox Format Behaves Differently On Windows Versus Linux

2014-04-22 Thread Roundup Robot
Roundup Robot added the comment: New changeset 2b8d9276ad5b by Zachary Ware in branch '2.7': Issue #21303, #20565: Updated the version of Tcl/Tk used on Windows http://hg.python.org/cpython/rev/2b8d9276ad5b -- nosy: +python-dev ___ Python tracker

[issue21327] socket.type value changes after using settimeout()

2014-04-22 Thread Antoine Pitrou
Antoine Pitrou added the comment: I think distinguishing between the two situations would make the code yet more complicated (and fragile). It's a bit unfortunate that the `type` attribute has become a kitchen sink for disparate pieces of configuration. The fact that you are the first to

[issue21331] Reversing an encoding with unicode-escape returns a different result

2014-04-22 Thread Sworddragon
New submission from Sworddragon: I have made some tests with encoding/decoding in conjunction with unicode-escape and got some strange results: print('ä') ä print('ä'.encode('utf-8')) b'\xc3\xa4' print('ä'.encode('utf-8').decode('unicode-escape')) ä

[issue21303] Python 2.7 Spinbox Format Behaves Differently On Windows Versus Linux

2014-04-22 Thread Zachary Ware
Zachary Ware added the comment: Done. Michael, thanks for the report! -- assignee: - zach.ware resolution: - fixed stage: - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21303

[issue20565] Update Tcl/Tk version for buildbots

2014-04-22 Thread Zachary Ware
Zachary Ware added the comment: 2.7 is now updated to 8.5.15, 3.3 is in security mode, and 3.4+ are on 8.6.1. -- nosy: +zach.ware resolution: - fixed stage: - resolved status: open - closed versions: +Python 3.5 -Python 3.3 ___ Python tracker

[issue21331] Reversing an encoding with unicode-escape returns a different result

2014-04-22 Thread R. David Murray
R. David Murray added the comment: No. x.encode('unicode-escape').decode('unicode-escape') should return the same result, and it does. The bug, I think, is that bytes.decode('unicode-escape') is not objecting to the non-ascii characters. It appears to be treating them as latin1, and that

[issue20560] tkFileFilter.c: ostypeCount not initialized?

2014-04-22 Thread Zachary Ware
Zachary Ware added the comment: Terry, could you try this again with a fresh build of Tcl/Tk 8.5.15? Update your 2.7 to 2b8d9276ad5b or beyond and run Tools/buildbot/external.bat again, it should take care of it. -- nosy: +zach.ware ___ Python

[issue21306] PEP 466: backport hmac.compare_digest

2014-04-22 Thread Alex Gaynor
Alex Gaynor added the comment: Design question here: compare_digest on Python 3 supports comparing str (text) objects, if they're both ascii-only. This feature is provided, primarily, so you can compare hexdigests or similar. Should the Python 2 version support comparing unicodes? Arguments

[issue21306] PEP 466: backport hmac.compare_digest

2014-04-22 Thread Donald Stufft
Donald Stufft added the comment: try: data = data.encode(ascii) except UnicodeEncodeError: raise TypeError(comparing unicode with non-ASCII characters is not supported) ? -- ___ Python tracker rep...@bugs.python.org

[issue21306] PEP 466: backport hmac.compare_digest

2014-04-22 Thread Nick Coghlan
Nick Coghlan added the comment: 8-bit str only makes more sense to me. The wishy-washiness of some APIs in Py3 is mostly to work around porting issues where stuff that should have become bytes was left as str. -- ___ Python tracker

[issue21306] PEP 466: backport hmac.compare_digest

2014-04-22 Thread Alex Gaynor
Alex Gaynor added the comment: encode(ascii) has data dependent branches, so it's to be avoided. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21306 ___

[issue21306] PEP 466: backport hmac.compare_digest

2014-04-22 Thread Alex Gaynor
Alex Gaynor added the comment: Thanks Nick. I'll get a patch up for str (bytes) only this afternoon. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21306 ___

[issue21306] PEP 466: backport hmac.compare_digest

2014-04-22 Thread Donald Stufft
Donald Stufft added the comment: I'm not sure that the timing leakage in an encode is actually something to be worried about. I'm not sure what secret information would be getting leaked in a way that you could determine it by examining the timing. However I think the bigger thing is if I'm

[issue21327] socket.type value changes after using settimeout()

2014-04-22 Thread STINNER Victor
STINNER Victor added the comment: I would prefer to add something to get the type without SOCK_NONBLOCK nor SOCK_CLOEXEC. So new feature can only be added to Python 3.5. For older Python versions, you can to filter manually, which is difficult because you have yo check if SOCK_NONBLOCK and/or

[issue21331] Reversing an encoding with unicode-escape returns a different result

2014-04-22 Thread STINNER Victor
STINNER Victor added the comment: unicode_escape codec is deprecated since Python 3.3. Please use UTF-8 or something else. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21331 ___

[issue4913] wave.py: add writesamples() and readsamples()

2014-04-22 Thread Joe Button
Joe Button added the comment: Forgive my unfamiliarity with python's development process, but, what is happening with this? Is there any chance of this enhancement making it into the python libs? What would need to happen? Thanks. -- nosy: +Joeboy

[issue21306] PEP 466: backport hmac.compare_digest

2014-04-22 Thread Alex Gaynor
Alex Gaynor added the comment: Attached patch implements compare_digest. Code is mostly a 1-1 from 3.x, except the Unicode paths are changed, and the tests are a tiny bit different. * Still needs to backport the docs. * Compares all unicode objects, not just ascii ones. If the patch looks

[issue4913] wave.py: add writesamples() and readsamples()

2014-04-22 Thread R. David Murray
R. David Murray added the comment: Someone has to find the time to do a commit review on the patch. As Guilherme said, there's no specific maintainer for wave, so I'm afraid it just got forgotten about. On the other hand, as a new feature it would now go in 3.5, and we're at the start of

[issue21207] urandom persistent fd - not re-openned after fd close

2014-04-22 Thread Antoine Pitrou
Antoine Pitrou added the comment: Updated patch using an anonymous struct. -- Added file: http://bugs.python.org/file35006/urandom_fd_reopen2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21207

[issue21127] Path objects cannot be constructed from str subclasses

2014-04-22 Thread Roundup Robot
Roundup Robot added the comment: New changeset c24cbd9bd63b by Antoine Pitrou in branch '3.4': Issue #21127: Path objects can now be instantiated from str subclass instances (such as numpy.str_). http://hg.python.org/cpython/rev/c24cbd9bd63b New changeset aad6d6b819ed by Antoine Pitrou in

  1   2   >