ANN: dateutil 2.3 is released

2014-12-02 Thread Yaron de Leeuw
dateutil 2.3 is released What is dateutil? - The dateutil package provides powerful extensions tothe standard datetime module available in Python. It ships with its own timezone database, and contains utilities to deal with date parsing, timezones, time deltas, recurrence-rules,

ANN: eGenix mxODBC Connect 2.1.2 - Python Database Interface

2014-12-02 Thread eGenix Team: M.-A. Lemburg
ANNOUNCING eGenix.com mxODBC Connect Python Database Interface Version 2.1.2 mxODBC Connect is our commercially supported client-server product for

Re: PyEval_GetLocals and unreferenced variables

2014-12-02 Thread Kasper Peeters
def fun(): cfun_that_creates_q_in_local_scope() def fun2(): cfun_that_wants_to_see_if_q_is_available() So the Python side actually doesn't see 'q' directly at all. I think you will need to elaborate. Ok, here goes (and thanks for listening). The

ANN: eGenix mxODBC Connect 2.1.2 - Python Database Interface

2014-12-02 Thread eGenix Team: M.-A. Lemburg
ANNOUNCING eGenix.com mxODBC Connect Python Database Interface Version 2.1.2 mxODBC Connect is our commercially supported client-server product for

Re: How about some syntactic sugar for __name__ == '__main__' ?

2014-12-02 Thread Ethan Furman
On 12/01/2014 05:15 PM, Chris Angelico wrote: On Tue, Dec 2, 2014 at 11:45 AM, Ethan Furman wrote: Put the above somewhere in your path (e.g. /usr/local/bin), make it executable, and then instead of shebanging your scripts with `/usr/local/bin/python` you can use `/usr/local/bin/py_main`,

2nd call for notes about Eric IDE

2014-12-02 Thread Pietro Moras
In view of next edition of the Eric IDE Technical Report (forecast: 3rd quarter '15) and notably with reference to the innovative Eric ver. no. 6, we'll welcome your testimony of experiences and use of specific Eric IDE's features; such as: – Special features of your choice, as: SQL

Re: PyEval_GetLocals and unreferenced variables

2014-12-02 Thread Ned Batchelder
On 12/2/14 4:35 AM, Kasper Peeters wrote: def fun(): cfun_that_creates_q_in_local_scope() def fun2(): cfun_that_wants_to_see_if_q_is_available() So the Python side actually doesn't see 'q' directly at all. I think you will need to elaborate. Ok, here goes

Re: Cherrypy - prevent browser prefetch?

2014-12-02 Thread random832
On Mon, Dec 1, 2014, at 15:28, Israel Brewster wrote: For example, I have a URL on my Cherrypy app that updates some local caches. It is accessed at http://server/admin/updatecaches So if I start typing http://server/a, for example, safari may auto-fill the dmin/updatecaches, and trigger a

Re: Cherrypy - prevent browser prefetch?

2014-12-02 Thread Israel Brewster
On Dec 2, 2014, at 4:33 AM, random...@fastmail.us wrote: On Mon, Dec 1, 2014, at 15:28, Israel Brewster wrote: For example, I have a URL on my Cherrypy app that updates some local caches. It is accessed at http://server/admin/updatecaches So if I start typing http://server/a, for example,

Proposed new conditional operator: or else

2014-12-02 Thread Roy Smith
In the process of refactoring some code, I serendipitously created what I think is an essential new bit of Python syntax. The “or else” statement. I ended up with: sites_string = args.sites or else self.config['sites'] which, of course, is a syntax error today, but it got me thinking

Re: Proposed new conditional operator: or else

2014-12-02 Thread Zachary Ware
On Tue, Dec 2, 2014 at 11:18 AM, Roy Smith r...@panix.com wrote: Wouldn’t it be neat to write: foo == 42 or else and have that be an synonym for: assert foo == 42 :-) Never going to happen, but I like it! Perhaps raise IntimidationError instead of AssertionError when it fails?

Re: Proposed new conditional operator: or else

2014-12-02 Thread Ethan Furman
On 12/02/2014 09:41 AM, Zachary Ware wrote: On Tue, Dec 2, 2014 at 11:18 AM, Roy Smith wrote: Wouldn’t it be neat to write: foo == 42 or else and have that be an synonym for: assert foo == 42 Never going to happen, but I like it! Perhaps raise IntimidationError instead of

Re: Proposed new conditional operator: or else

2014-12-02 Thread Chris Angelico
On Wed, Dec 3, 2014 at 4:41 AM, Zachary Ware zachary.ware+pyl...@gmail.com wrote: On Tue, Dec 2, 2014 at 11:18 AM, Roy Smith r...@panix.com wrote: Wouldn’t it be neat to write: foo == 42 or else and have that be an synonym for: assert foo == 42 :-) Never going to happen, but I

Re: Proposed new conditional operator: or else

2014-12-02 Thread Tim Chase
On 2014-12-02 11:41, Zachary Ware wrote: On Tue, Dec 2, 2014 at 11:18 AM, Roy Smith r...@panix.com wrote: Wouldn’t it be neat to write: foo == 42 or else and have that be an synonym for: assert foo == 42 :-) Never going to happen, but I like it! Perhaps raise

Re: Proposed new conditional operator: or else

2014-12-02 Thread Marko Rauhamaa
Tim Chase python.l...@tim.thechases.com: foo == 42 or else In light of the parallel thread discussing the assert statement and the perils of trusting it to be present even though it can be optimized away, this or else could be (in the altered words of Don Corleone), I'm gonna make an

Re: i have to create this patch in python but wasnt having any luck i was wondering if anyone had a solution?

2014-12-02 Thread Joel Goldstick
On Mon, Dec 1, 2014 at 2:28 PM, python help required 19aada...@gmail.com wrote: def penultimatePatch(): win = GraphWin(Patch1,(100), 100) amountOfCircles = 5 #Filled Red Circles fillCircle = Circle(Point(20,20)+100/amountOfCircles) fillCircle.draw(win)

Re: Cherrypy - prevent browser prefetch?

2014-12-02 Thread Nobody
On Mon, 01 Dec 2014 11:28:42 -0900, Israel Brewster wrote: I'm running to a problem, specifically from Safari on the Mac, where I start to type a URL, and Safari auto-fills the rest of a random URL matching what I started to type, and simultaneously sends a request for that URL to my server,

Re: How about some syntactic sugar for __name__ == '__main__' ?

2014-12-02 Thread Cameron Simpson
On 02Dec2014 02:17, Ethan Furman et...@stoneleaf.us wrote: On 12/01/2014 05:15 PM, Chris Angelico wrote: On Tue, Dec 2, 2014 at 11:45 AM, Ethan Furman wrote: Put the above somewhere in your path (e.g. /usr/local/bin), make it executable, and then instead of shebanging your scripts with

Re: Proposed new conditional operator: or else

2014-12-02 Thread Andrea D'Amore
On 2014-12-02 17:41:06 +, Zachary Ware said: foo == 42 or else Never going to happen, but I like it! Perhaps raise IntimidationError instead of AssertionError when it fails? That should probably be a DONTPANICError in large, friendly terminal font letters. -- Andrea --

Re: Cherrypy - prevent browser prefetch?

2014-12-02 Thread John Gordon
In pan.2014.12.02.21.05.18.838000@nowhere.invalid Nobody nobody@nowhere.invalid writes: On Mon, 01 Dec 2014 11:28:42 -0900, Israel Brewster wrote: I'm running to a problem, specifically from Safari on the Mac, where I start to type a URL, and Safari auto-fills the rest of a random URL

Parsing XML Using XPATH for Python

2014-12-02 Thread Uzoma Ojemeni
I am new to Python - a few days old - and I would appreciate some help. I want write a python code to parse the below XML as below:- ServingCell--NeighbourCell L41_NBR3347_1--L41_NBR3347_2 L41_NBR3347_1--L41_NBR3347_3 L41_NBR3347_1--L41_NBR3349_1

Re: Cherrypy - prevent browser prefetch?

2014-12-02 Thread random832
On Tue, Dec 2, 2014, at 10:59, Israel Brewster wrote: Primary because they aren’t forms, they are links. And links are, by definition, GET’s. That said, as I mentioned in earlier replies, if using a form for a simple link is the Right Way to do things like this, then I can change it. As I

UK Python Training Day

2014-12-02 Thread Steve Holden
Are you interested in Python training for yourself or others? Can you get to London on 9 December, 2014? If so I would very much like to meet you, and have reserved a venue in Westminster with refreshments and lunch. Starting in 2015 I plan to do more training in Europe (initially in the UK)

Re: python 2.7 and unicode (one more time)

2014-12-02 Thread Simon Evans
Hi Peter Otten re: There is no assignment soup_atag = whatever but there is one to atag. The whole session should when you omit the offending line atag = soup_atag.a or insert soup_atag = soup before it.

Re: Parsing XML Using XPATH for Python

2014-12-02 Thread John Gordon
In a1a70942-6740-4de5-b41e-57a71fb36...@googlegroups.com Uzoma Ojemeni uojem...@gmail.com writes: I am new to Python - a few days old - and I would appreciate some help. I want write a python code to parse the below XML as below:- ServingCell--NeighbourCell

Python 2.x vs 3.x survey - new owner?

2014-12-02 Thread Dan Stromberg
Last year in late December, I did a brief, 9 question survey of 2.x vs 3.x usage. I like the think the results were interesting, but I don't have the spare cash to do it again this year. I probably shouldn't have done it last year. ^_^ Is anyone interested in taking over the survey? It's on

Re: Proposed new conditional operator: or else

2014-12-02 Thread Sturla Molden
Zachary Ware zachary.ware+pyl...@gmail.com wrote: On Tue, Dec 2, 2014 at 11:18 AM, Roy Smith r...@panix.com wrote: Wouldn’t it be neat to write: foo == 42 or else and have that be an synonym for: assert foo == 42 :-) Never going to happen, but I like it! Perhaps raise

Re: Proposed new conditional operator: or else

2014-12-02 Thread Roy Smith
In article mailman.16498.1417544472.18130.python-l...@python.org, Chris Angelico ros...@gmail.com wrote: On Wed, Dec 3, 2014 at 4:41 AM, Zachary Ware zachary.ware+pyl...@gmail.com wrote: On Tue, Dec 2, 2014 at 11:18 AM, Roy Smith r...@panix.com wrote: Wouldn’t it be neat to write:

Re: Proposed new conditional operator: or else

2014-12-02 Thread Michael Torrie
On 12/02/2014 10:18 AM, Roy Smith wrote: In the process of refactoring some code, I serendipitously created what I think is an essential new bit of Python syntax. The “or else” statement. I ended up with: sites_string = args.sites or else self.config['sites'] But isn't that

Python handles globals badly.

2014-12-02 Thread Skybuck Flying
Excuse is: bad programming style. I don't need snot telling me how to program after 20 years of programming experience. This is so far the only thing pissing me off in python. Now I have to declare global in front of these variables every where I want to use em:

Re: Python handles globals badly.

2014-12-02 Thread Chris Angelico
On Wed, Dec 3, 2014 at 1:27 PM, Skybuck Flying skybuck2...@hotmail.com wrote: I don't need snot telling me how to program after 20 years of programming experience. This is so far the only thing pissing me off in python. Now I have to declare global in front of these variables every where I

RE: Python handles globals badly.

2014-12-02 Thread Clayton Kirkwood
You're still young, enjoy your youth while you can. -Original Message- From: Python-list [mailto:python-list- bounces+crk=godblessthe...@python.org] On Behalf Of Skybuck Flying Sent: Tuesday, December 02, 2014 6:28 PM To: python-list@python.org Subject: Python handles globals badly.

Re: Python handles globals badly.

2014-12-02 Thread Michael Torrie
On 12/02/2014 07:27 PM, Skybuck Flying wrote: Excuse is: bad programming style. I don't need snot telling me how to program after 20 years of programming experience. This is so far the only thing pissing me off in python. Now I have to declare global in front of these variables every

Re: Python handles globals badly.

2014-12-02 Thread Ben Finney
Skybuck Flying skybuck2...@hotmail.com writes: I don't need snot telling me how to program after 20 years of programming experience. If you've already determined what advice you do or do not need, then you're welcome to solve your problems by yourself. We'll be here when you decide it's time

Re: Python handles globals badly.

2014-12-02 Thread Skybuck Flying
Meanwhile... I modified my code, and added these globals in front of it. It didn't take too long to do. But it did add something like 300 unnecessary lines of code, which is what kinda annoys me. I'd like to keep my code compact. Anyway I double checked to make sure other routines had

Re: Python handles globals badly.

2014-12-02 Thread Skybuck Flying
Some issues I'd like to address to you: 1. Structured programming requires more programming time. 2. Structured programming implies structure which might be less flexible. 3. Python objects require self keyword to be used everywhere, and other akwardness wich leads to more

Re: Python handles globals badly.

2014-12-02 Thread Chris Angelico
On Wed, Dec 3, 2014 at 3:17 PM, Skybuck Flying skybuck2...@hotmail.com wrote: I hope python one day gets rid of it; 1. To stop the confusion. 2. To stop the doubt. 3. To stop the wasted lines. 4. To program with more confidence. 5. To stop to have to inspect what's going on if one wants to

Re: Python handles globals badly.

2014-12-02 Thread Chris Angelico
On Wed, Dec 3, 2014 at 3:32 PM, Skybuck Flying skybuck2...@hotmail.com wrote: Though I do hope to see a programming language some day, that is aimed at more mature programmers that know what they are doing. Instead of a language aimed at noobs :) a noob language which forbids certain styles

Re: Python handles globals badly.

2014-12-02 Thread Dave Angel
On 12/02/2014 11:32 PM, Skybuck Flying wrote: Some issues I'd like to address to you: 1. Structured programming requires more programming time. 2. Structured programming implies structure which might be less flexible. 3. Python objects require self keyword to be used everywhere, and other

Re: html page mail link to webmail program

2014-12-02 Thread Cameron Simpson
On 11Nov2014 17:35, Ethan Furman et...@stoneleaf.us wrote: Okay, the explicit Python question: Clicking on a mail link in a web browser can start an external program. I would like that external program to be a Python script that: opens a new tab in the currently running browser (or a new

Re: Python handles globals badly.

2014-12-02 Thread Michael Torrie
On 12/02/2014 09:32 PM, Skybuck Flying wrote: Some issues I'd like to address to you: 1. Structured programming requires more programming time. 2. Structured programming implies structure which might be less flexible. 3. Python objects require self keyword to be used everywhere, and other

Re: PyEval_GetLocals and unreferenced variables

2014-12-02 Thread Gregory Ewing
Kasper Peeters wrote: I could in principle decide to make these settings a proper Python object, and ask the user to create one and pass it along at every C-function call. I would make the C functions methods of the object holding the settings. Your nested function example would then look

Re: PyEval_GetLocals and unreferenced variables

2014-12-02 Thread Gregory Ewing
Ned Batchelder wrote: I would use thread locals for this: https://docs.python.org/2/library/threading.html#threading.local You could get dynamic scoping that way, but the OP seems to want lexical scoping. -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: Need Help

2014-12-02 Thread Miki Tebeka
Greetings, I'm a beginner of python, I just want your help. We'll gladly do it, however you need to invest some time and write better questions :) See http://www.catb.org/esr/faqs/smart-questions.html How can I get the Failure values from the Console in to a txt or a csv file? We need more

Re: Cherrypy - prevent browser prefetch?

2014-12-02 Thread Gregory Ewing
Israel Brewster wrote: Primary because they aren’t forms, they are links. And links are, by definition, GET’s. That said, as I mentioned in earlier replies, if using a form for a simple link is the Right Way to do things like this, then I can change it. I'd look at it another way and say that

Re: Python handles globals badly.

2014-12-02 Thread Marko Rauhamaa
On 12/02/2014 09:32 PM, Skybuck Flying wrote: Some issues I'd like to address to you: 1. Structured programming requires more programming time. 2. Structured programming implies structure which might be less flexible. 3. Python objects require self keyword to be used everywhere, and other

Re: Parsing XML Using XPATH for Python

2014-12-02 Thread dieter
Uzoma Ojemeni uojem...@gmail.com writes: ... One easy option would be to use the XPath support in the lxml package -- provided you have not problem with the installation of external libraries (libxml2 and libxslt) and C-extensions (lxml). -- https://mail.python.org/mailman/listinfo/python-list

Re: Python handles globals badly.

2014-12-02 Thread Joel Goldstick
troll On Wed, Dec 3, 2014 at 1:52 AM, Marko Rauhamaa ma...@pacujo.net wrote: On 12/02/2014 09:32 PM, Skybuck Flying wrote: Some issues I'd like to address to you: 1. Structured programming requires more programming time. 2. Structured programming implies structure which might be less

Re: Proposed new conditional operator: or else

2014-12-02 Thread Sturla Molden
Dennis Lee Bieber wlfr...@ix.netcom.com wrote: foo == 42 or else Has a PERL stink to it... like: foo == 42 or die I think this statement needs to take ellipsis as well foo == 42 or else ... Sturls -- https://mail.python.org/mailman/listinfo/python-list

[issue22356] mention explicitly that stdlib assumes gmtime(0) epoch is 1970

2014-12-02 Thread Akira Li
Akira Li added the comment: Alexander Belopolsky added the comment: I've provide the direct quote from *C* standard ... I understand that C standard uses the word encoding, but it does so for a reason that is completely unrelated to the choice of epoch. Encoding is how the bytes in memory

[issue22968] types._calculate_meta nit: isinstance != PyType_IsSubtype

2014-12-02 Thread Greg Turner
Greg Turner added the comment: Also: In types.prepare_class, here is what currently happens: we let x be, in order of preference: (a) the explicitly given type if, one is given, else (b) type(bases[0]), if it exists, else (c) type and then, if isinstance(x, type), we run

[issue20192] pprint chokes on set containing frozenset

2014-12-02 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: For now sets and frozensets are comparable with other types in Python 2. frozenset(xrange(10)) 1 False set(xrange(10)) 1 False The only known to me uncomparable types in Python 2 are naive and aware datetime. -- nosy: +serhiy.storchaka

[issue22931] cookies with square brackets in value

2014-12-02 Thread Waldemar Parzonka
Waldemar Parzonka added the comment: Thanks for taking a look into that. And yes the behaviour when invalid value is encountered is bit weird as the rest of the cookie is being silently ignored which is probably less than ideal in most cases. Just wonder if there is any easy way of making

[issue12657] Cannot override JSON encoding of basic type subclasses

2014-12-02 Thread Stefan Champailler
Stefan Champailler added the comment: I'm adding a scenario for this problem, a real life one, so it gives a bit more substance. I use SQLALchemy. I do queries with it which returns KeyedTuples (an SQLALchemy type). KeyedTuples inherits from tuple. KeyedTuples are, in principle, like

[issue22976] multiprocessing Queue empty() is broken on Windows

2014-12-02 Thread Radosław Szkodziński
New submission from Radosław Szkodziński: multiprocessing.Queue.empty() uses pipe polling on Windows. Unfortunately, pipe semantics on windows are different from POSIX. The result is either: - Hang when one process tries to get() and another checks for empty() - Falsely returning empty() ==

[issue12657] Cannot override JSON encoding of basic type subclasses

2014-12-02 Thread Stefan Champailler
Stefan Champailler added the comment: Reading bugs a bit, I see this is quite related to : http://bugs.python.org/issue14886 stF -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12657 ___

[issue12987] Demo/scripts/newslist.py has non-free licensing terms

2014-12-02 Thread Matthias Klose
Matthias Klose added the comment: thanks for bringing this up. I don't agree that the non-availability in the windows build should be used to close the issue. Linux distros distribute the source, and are still affected? If it's already removed in Python3, why not remove it here as well?

[issue22977] Unformatted “Windows Error 0x%X” exception message

2014-12-02 Thread Martin Panter
New submission from Martin Panter: The following code generates a connection reset error on Wine (Windows emulator, because I don’t have actual Windows to test on). Probably only a minor issue, but the error message isn’t quite right: s = create_connection((localhost, 8181)) # Server end

[issue22977] Unformatted “Windows Error 0x%X” exception message

2014-12-02 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@gmail.com: -- keywords: +easy nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22977 ___ ___

[issue16041] poplib: unlimited readline() from connection

2014-12-02 Thread Matthias Klose
Matthias Klose added the comment: this looks ok to me, can we apply this for 2.7.9? -- nosy: +doko ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16041 ___

[issue16042] smtplib: unlimited readline() from connection

2014-12-02 Thread Matthias Klose
Changes by Matthias Klose d...@debian.org: -- nosy: +doko ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16042 ___ ___ Python-bugs-list mailing

[issue16043] xmlrpc: gzip_decode has unlimited read()

2014-12-02 Thread Matthias Klose
Matthias Klose added the comment: updated patch to use an optional parameter max_decode. -- nosy: +doko Added file: http://bugs.python.org/file37343/xmlrpc_gzip_27_parameter.patch ___ Python tracker rep...@bugs.python.org

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

2014-12-02 Thread Nick Coghlan
Nick Coghlan added the comment: As an interim step, should we add Ezio's newsmerge.py to Tools/scripts and instructions for enabling it to the devguide? That seems straightforward enough, and doesn't require any global workflow changes. -- ___

[issue12987] Demo/scripts/newslist.py has non-free licensing terms

2014-12-02 Thread Nick Coghlan
Nick Coghlan added the comment: Given that it's only the demo directory (and a relatively obscure demo as well these days), I'm inclined to just fix it upstream rather than making the distros patch it. There's also the fact that we distribute the source tarballs from python.org as well, and

[issue16043] xmlrpc: gzip_decode has unlimited read()

2014-12-02 Thread Matthias Klose
Matthias Klose added the comment: document the new exception -- Added file: http://bugs.python.org/file37344/xmlrpc_gzip_27_parameter.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16043

[issue20453] json.load() error message changed in 3.4

2014-12-02 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: In issue19361 I suggest to change error messages even more and drop end position from Extra data error message. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20453

[issue22701] Write unescaped unicode characters (Japanese, Chinese, etc) in JSON module when ensure_ascii=False

2014-12-02 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Looks either you have opened a file with the backslashreplace error handler or ran Python with PYTHONIOENCODING which sets the backslashreplace error handler. -- nosy: +serhiy.storchaka status: open - pending ___

[issue13027] python 2.6.6 interpreter core dumps on modules command from help prompt

2014-12-02 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I suggest to close this issue as caused by a bug in third party extension. -- nosy: +serhiy.storchaka resolution: - third party status: open - pending ___ Python tracker rep...@bugs.python.org

[issue7567] Messed up terminal after calling curses.initscr() twice.

2014-12-02 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- nosy: +serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7567 ___ ___

[issue22978] Logical Negation of NotImplemented

2014-12-02 Thread Maytag Metalark
New submission from Maytag Metalark: Performing a logical negation (`not`) on `NotImplemented` should return `NotImplemented`. Currently, it returns `False`. A common pattern for implementing __eq__ and __ne__ is to implement the comparison in __eq__, and simply delegate to it in __ne__ with

[issue9647] os.confstr() does not handle value changing length between calls

2014-12-02 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I agree with Victor that two calls to confstr() should be enough. An example in confstr manpage uses two calls and I think there is no many software (if any) in the world which does more. -- keywords: +easy nosy: +serhiy.storchaka stage: - needs

[issue22979] Use of None in min and max

2014-12-02 Thread Maytag Metalark
New submission from Maytag Metalark: `None` should never be the result of the built-in `min` and `max` functions. When `None` is supplied as one of the values to check, it should never be chosen as the result. This would make it much easier to find a minimum and/or maximum while iterating

[issue18290] json encoder does not support JSONP/JavaScript safe escaping

2014-12-02 Thread Tom Christie
Tom Christie added the comment: I believe the status of this should be reassessed and that python should default to escaping '\u2028' and '\u2029'. *Strictly* speaking this isn't a bug and is per the JSON spec. *However* this *is* a bug in the JSON spec - which *should* be a strict subset of

[issue22980] C extension naming doesn't take bitness into account

2014-12-02 Thread Antoine Pitrou
New submission from Antoine Pitrou: Currently, C extensions are named something like _helperlib.cpython-34dm.so. This doesn't take into account the bitness of the interpreter (32- vs. 64-bit), which makes it awkward to use the same working copy with two different interpreters (you have to

[issue22980] C extension naming doesn't take bitness into account

2014-12-02 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@gmail.com: -- nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22980 ___ ___ Python-bugs-list

[issue22980] C extension naming doesn't take bitness into account

2014-12-02 Thread STINNER Victor
STINNER Victor added the comment: See also the PEP 3149. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22980 ___ ___ Python-bugs-list mailing

[issue22980] C extension naming doesn't take bitness into account

2014-12-02 Thread Antoine Pitrou
Antoine Pitrou added the comment: PEP 3149 says It is not currently clear that the facilities in this PEP are even useful for Windows. Well, it seems I have found a use for it :-) -- ___ Python tracker rep...@bugs.python.org

[issue22980] C extension naming doesn't take bitness into account

2014-12-02 Thread Antoine Pitrou
Antoine Pitrou added the comment: Ideally, we would use distutils.util.get_platform(). However, there are two cases where it relies on other modules: - the re module under CygWin - the sysconfig and _osx_support under OS X Of course, ideally we should be able to hardcode this into the compiled

[issue18290] json encoder does not support JSONP/JavaScript safe escaping

2014-12-02 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: There is explicit note in the documentation about incompatibility with JavaScript. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18290 ___

[issue21161] list comprehensions don't see local variables in pdb in python3

2014-12-02 Thread Florent Xicluna
Changes by Florent Xicluna florent.xicl...@gmail.com: -- nosy: +flox ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21161 ___ ___ Python-bugs-list

[issue22979] Use of None in min and max

2014-12-02 Thread Simeon Visser
Simeon Visser added the comment: This doesn't happen in Python 3 as None can't be compared to other elements: min([1,2,3,None]) Traceback (most recent call last): File stdin, line 1, in module TypeError: unorderable types: NoneType() int() I can also imagine people now using min with the

[issue18290] json encoder does not support JSONP/JavaScript safe escaping

2014-12-02 Thread Tom Christie
Tom Christie added the comment: There is explicit note in the documentation about incompatibility with JavaScript. That may be, but we're still unnecessarily making for a poorer user experience. There's no good reason why we shouldn't just treat \u2028 and \u2029 as control characters -

[issue22980] C extension naming doesn't take bitness into account

2014-12-02 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +ned.deily ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22980 ___ ___ Python-bugs-list mailing

[issue22976] multiprocessing Queue empty() is broken on Windows

2014-12-02 Thread R. David Murray
Changes by R. David Murray rdmur...@bitdance.com: -- nosy: +sbt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22976 ___ ___ Python-bugs-list

[issue22979] Use of None in min and max

2014-12-02 Thread Simeon Visser
Simeon Visser added the comment: So, to clarify, as the problem no longer occurs in Python 3 (as it requires the caller to provide only orderable objects) I'm not sure a meaningful change can be made here. It would require changing the behaviour of min/max in Python 2.7.x in a way that could

[issue22980] C extension naming doesn't take bitness into account

2014-12-02 Thread Antoine Pitrou
Antoine Pitrou added the comment: As a side-note, it is interesting to note that Python currently wrongly identifies 32-bit builds under 64-bit Linux: Python 3.5.0a0 (default:64a54f0c87d7, Nov 2 2014, 17:18:13) [GCC 4.9.1] on linux Type help, copyright, credits or license for more

[issue22978] Logical Negation of NotImplemented

2014-12-02 Thread R. David Murray
R. David Murray added the comment: This would break Python's consistency. 'not' of a value returns its boolean inverse, and the boolean value of NotImplemented is True, just like the boolean value of any object that does not have methods that set its boolean value is True. Having anything

[issue22979] Use of None in min and max

2014-12-02 Thread R. David Murray
R. David Murray added the comment: Just select your initial value as something that works with the sequence you are iterating. If necessary, you can define custom 'always maximum' and 'always minimum' objects. (You could try proposing builtin objects with that feature on the python-ideas

[issue22981] Use CFLAGS when extracting multiarch

2014-12-02 Thread Antoine Pitrou
New submission from Antoine Pitrou: This patch fixes MULTIARCH computation when using CFLAGS=-m32: diff --git a/configure b/configure --- a/configure +++ b/configure @@ -5402,7 +5402,7 @@ hp*|HP*) esac;; esac -MULTIARCH=$($CC --print-multiarch 2/dev/null) +MULTIARCH=$($CC $CFLAGS

[issue18053] Add checks for Misc/NEWS in make patchcheck

2014-12-02 Thread Brett Cannon
Brett Cannon added the comment: If it's bugging you, Terry, feel free to delete that part of the check as it's of more use to core devs and we won't forget. -- assignee: - terry.reedy ___ Python tracker rep...@bugs.python.org

[issue22980] C extension naming doesn't take bitness into account

2014-12-02 Thread Antoine Pitrou
Antoine Pitrou added the comment: The MULTIARCH variable can help at least under Linux: import sysconfig sysconfig.get_platform() 'linux-x86_64' sysconfig.get_config_var('MULTIARCH') 'i386-linux-gnu' -- ___ Python tracker rep...@bugs.python.org

[issue9584] Allow curly brace expansion

2014-12-02 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: -- nosy: +Arfrever versions: +Python 3.5 -Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9584 ___

[issue22982] BOM incorrectly inserted before writing, after seeking in text file

2014-12-02 Thread MarkIngramUK
New submission from MarkIngramUK: If you open a text file for append, but then perform any form of seeking, before attempting to write to the file, it will cause the BOM to be written before you text. See the attached file for an example. If you run the test, take a look at the output file,

[issue22966] py_compile: foo.bar.py → __pycache__/foo.cpython-34.pyc

2014-12-02 Thread Brett Cannon
Brett Cannon added the comment: Apparently this broke under Windows: http://buildbot.python.org/all/builders/x86%20Windows7%203.x/builds/8999/steps/test/logs/stdio -- status: closed - open ___ Python tracker rep...@bugs.python.org

[issue22980] C extension naming doesn't take bitness into account

2014-12-02 Thread STINNER Victor
STINNER Victor added the comment: There is also platform.architecture(). I don't like its implementation, it relies on the external file program :-( -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22980

[issue22685] memory leak: no transport for pipes by create_subprocess_exec/shell

2014-12-02 Thread STINNER Victor
STINNER Victor added the comment: Buildbot failures observed on koobs-freebsd9 and koobs-freebsd10 for 3.x and 3.4, respectively. It looks like test_asyncio pass on the last 5 builds of the following buildbots, and so I consider the issue as closed.

[issue22473] The gloss on asyncio future with run_forever example is confusing

2014-12-02 Thread Roundup Robot
Roundup Robot added the comment: New changeset a4b58e779a16 by Victor Stinner in branch '3.4': Close #22473: asyncio doc: rephrase Future with run_forever() example https://hg.python.org/cpython/rev/a4b58e779a16 -- nosy: +python-dev resolution: - fixed stage: - resolved status: open -

[issue22473] The gloss on asyncio future with run_forever example is confusing

2014-12-02 Thread STINNER Victor
STINNER Victor added the comment: I rephrase the explanation of the example and I removed the useless note. Thanks for your feedback David. Don't hesitate to propose other enhancements to the documentation! -- ___ Python tracker

[issue22966] py_compile: foo.bar.py → __pycache__/foo.cpython-34.pyc

2014-12-02 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/issue22966 ___

[issue22983] Cookie parsing should be more permissive

2014-12-02 Thread Demian Brecht
New submission from Demian Brecht: As found in #22931, if an invalid cookie value is found while parsing, the rest of the cookie is silently ignored. The expected behavior is undefined in RFC 6265, but does state that if unexpected values are encountered that user agents MAY ignore an entire

  1   2   >