[RELEASE] six 1.7.0

2014-06-11 Thread Benjamin Peterson
I'm pleased to announce the immediate availability of six 1.7.0. six is a small Python 2/3 compatibility library. The most interesting change in this release is yet another implementation by Anselm Kruis of six.moves using a sys.meta_path hook. Hopefully, this will cause less issues with the

Fwd: ANN: Intro+Intermediate Python, San Francisco, Jul 30-31, Aug 1

2014-06-11 Thread wesley chun
Greetings! I'll be offering another hardcore Python course this summer near the San Francisco airport. If you're somewhat new to or have some Python experience under your belt already but want to fill-in the holes, this course is for you. Why take a real course when you can learn Python online or

Course: HPC with Python, Leipzig, Germany, June 16 - 20, 2014

2014-06-11 Thread Mike Müller
High-Performance Computing with Python == Date: June 16 - 20, 2014 Location: Leipzig, Germany Language: English Link: http://www.python-academy.com/courses/python_hpc.html Instructor: Dr. Mike Müller and Dr. Stefan Behnel Python programs can be fast, if done

mimedecode.py version 2.6.0

2014-06-11 Thread Oleg Broytman
Hello! mimedecode.py WHAT IS IT Mail users, especially in non-English countries, often find that mail messages arrived in different formats, with different content types, in different encodings and charsets. Usually this is good because it allows us to use

ANN: eGenix pyOpenSSL Distribution 0.13.3.1.0.1.8

2014-06-11 Thread eGenix Team: M.-A. Lemburg
ANNOUNCING eGenix.com pyOpenSSL Distribution Version 0.13.3.1.0.1.8 An easy-to-install and easy-to-use distribution of the pyOpenSSL Python interface

ANN: SIMPLE 1.1

2014-06-11 Thread Mok-Kong Shen
SIMPLE is a versatile dynamic modern variation of classical encryption scheme with authentication. http://s13.zetaboards.com/Crypto/topic/7201673/1/ As its name implies, it is fairly simple in program logic (and fairly small in code size as well), albeit without compromising any high security

Re: How do I get zlib installed on a python2.7 alt install?

2014-06-11 Thread dieter
Nzyme11 akcorr...@gmail.com writes: Installed python 2.7.7 on SLES from source to /opt/python2.7. Usually, an extension module is build automatically during the Python generation (from source) when its preconditions are met. This usually means, that the relevant development packages are

Re: OT: This Swift thing

2014-06-11 Thread Gregory Ewing
Rustom Mody wrote: JFTR: Information processing and (physics) energy are about as convertible as say: Is a kilogram smaller/greater than a mile? Actually, that's not true. There is a fundamental thermodynamic limit on the minimum energy needed to flip a bit from one state to the other, so in

asyncio - how to stop loop?

2014-06-11 Thread Frank Millman
Hi all I have a 'start.py' script that kicks off my program by starting a number of services. For now, I stop it by allowing the user to press enter, after which I close down the services and stop the program. (For production I imagine it would be better to run it in the background and send

Re: OT: This Swift thing

2014-06-11 Thread Gregory Ewing
Steven D'Aprano wrote: Everything *eventually* gets converted to heat, but not immediately. There's a big difference between a car that gets 100 miles to the gallon, and one that gets 1 mile to the gallon. With a car, the engine converts some of its energy to kinetic energy, which is

Re: OT: This Swift thing

2014-06-11 Thread Gregory Ewing
Chris Angelico wrote: So, let me get this straight. A CPU has to have a fan, but a car engine doesn't, because the car's moving at a hundred kays an hour. I have a suspicion the CPU fan moves air a bit slower than that. If the car were *always* moving at 100km/h, it probably wouldn't need a

Re: Micro Python -- a lean and efficient implementation of Python 3

2014-06-11 Thread alister
On Wed, 11 Jun 2014 08:29:06 +1000, Tim Delaney wrote: On 11 June 2014 05:43, alister alister.nospam.w...@ntlworld.com wrote: Your error reports always seem to resolve around benchmarks despite speed not being one of Pythons prime objectives By his own admission, jmf doesn't use Python

Re: First time I looked at Python was(...)

2014-06-11 Thread alister
On Tue, 10 Jun 2014 22:15:29 +0100, Carlos Anselmo Dias wrote: Hi... I don't understand the 'problem' of several people ... I created one post because I've several projects, I'm looking for one team of experienced experts in Python to work in my projects ... asap ... I provided one

Re: try/except/finally

2014-06-11 Thread alister
On Wed, 11 Jun 2014 00:00:49 +, Steven D'Aprano wrote: On Wed, 11 Jun 2014 06:37:01 +1000, Chris Angelico wrote: I don't know a single piece of programming advice which, if taken as an inviolate rule, doesn't at some point cause suboptimal code. Don't try to program while your cat is

Re: First time I looked at Python was(...)

2014-06-11 Thread Carlos Anselmo Dias
On 06/11/2014 09:34 AM, alister wrote: On Tue, 10 Jun 2014 22:15:29 +0100, Carlos Anselmo Dias wrote: Hi... I don't understand the 'problem' of several people ... I created one post because I've several projects, I'm looking for one team of experienced experts in Python to work in my

Re: First time I looked at Python was(...)

2014-06-11 Thread Carlos Anselmo Dias
On 06/11/2014 05:42 AM, Michael Torrie wrote: On 06/10/2014 03:15 PM, Carlos Anselmo Dias wrote: Hi... I don't understand the 'problem' of several people ... I created one post because I've several projects, I'm looking for one team of experienced experts in Python to work in my projects ...

基于cython的即时编译器cyjit,欢迎大家提建议

2014-06-11 Thread 1989lzhh
我正在写一个使用cython code作为后端的即时编译器名为cyjit,将python code 转换为cython code再编译为c extension导入.设计上主要参考numba.jit的思路,使用decorate来指定要编译的function,例如: from cyjit import jit @jit('int(int,int)') def add(a,b): return a+b add(1,2)#compiled @jit('int(int,int)', locals=''' int c ''') def add1(a,b):

Re: Micro Python -- a lean and efficient implementation of Python 3

2014-06-11 Thread Ben Finney
alister alister.nospam.w...@ntlworld.com writes: On Wed, 11 Jun 2014 08:29:06 +1000, Tim Delaney wrote: By his own admission, jmf doesn't use Python anymore. His only reason to remain on this emailing/newsgroup is to troll about the FSR. Please don't reply to him (and preferably add him to

Python's re module and genealogy problem

2014-06-11 Thread BrJohan
For some genealogical purposes I consider using Python's re module. Rather many names can be spelled in a number of similar ways, and in order to match names even if they are spelled differently, I will build regular expressions, each of which is supposed to match a number of similar names.

Re: OT: This Swift thing

2014-06-11 Thread Steven D'Aprano
On Wed, 11 Jun 2014 19:50:20 +1200, Gregory Ewing wrote: Chris Angelico wrote: So, let me get this straight. A CPU has to have a fan, but a car engine doesn't, because the car's moving at a hundred kays an hour. I have a suspicion the CPU fan moves air a bit slower than that. I'm not sure

Re: OT: This Swift thing

2014-06-11 Thread Roy Smith
In article 53984cd2$0$29988$c3e8da3$54964...@news.astraweb.com, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: Yes, technically water-cooled engines are cooled by air too. The engine heats a coolant (despite the name, usually not water these days) which then heats the air. Not

Re: try/except/finally

2014-06-11 Thread Roy Smith
In article NxUlv.352165$uI3.258913@fx18.am4, alister alister.nospam.w...@ntlworld.com wrote: On Wed, 11 Jun 2014 00:00:49 +, Steven D'Aprano wrote: On Wed, 11 Jun 2014 06:37:01 +1000, Chris Angelico wrote: I don't know a single piece of programming advice which, if taken as an

Re: Python's re module and genealogy problem

2014-06-11 Thread Robert Kern
On 2014-06-11 13:23, BrJohan wrote: For some genealogical purposes I consider using Python's re module. Rather many names can be spelled in a number of similar ways, and in order to match names even if they are spelled differently, I will build regular expressions, each of which is supposed to

My last message(...)

2014-06-11 Thread Carlos Anselmo Dias
Hi ... So I'm not receiving more emails from Python mailing list or posting/sending more messages ... I'm keeping your emails that I received to contact all of you when it will be time to step forward ... If you want you can send me your cv or one small text to j...@premium-sponsor.com

Re: OT: This Swift thing

2014-06-11 Thread Steven D'Aprano
On Wed, 11 Jun 2014 19:41:12 +1200, Gregory Ewing wrote: Steven D'Aprano wrote: Everything *eventually* gets converted to heat, but not immediately. There's a big difference between a car that gets 100 miles to the gallon, and one that gets 1 mile to the gallon. With a car, the engine

Re: asyncio - how to stop loop?

2014-06-11 Thread Ian Kelly
On Wed, Jun 11, 2014 at 1:19 AM, Frank Millman fr...@chagford.com wrote: First attempt - same as before loop = asyncio.get_event_loop() threading.Thread(target=loop.run_forever).start() input('Press enter to stop') loop.stop() loop.close() Each event loop is hosted by a

Re: Python's re module and genealogy problem

2014-06-11 Thread Thomas Rachel
Am 11.06.2014 14:23 schrieb BrJohan: Can it, for a pair of regular expressions be decided whether at least one string matching both of those regular expressions, can be constructed? If it is possible to make such a decision, then how? Anyone aware of an algorithm for this? Just a

Re: Python's re module and genealogy problem

2014-06-11 Thread Mark H Harris
On 6/11/14 8:26 AM, Robert Kern wrote: Anyways, to your new problem, yes it's possible. Search for regular expression intersection for possible approaches. I agree, I would not use a decision (decision tree) but would consider a set of filters from most specific to least specific. marcus

Re: OT: This Swift thing

2014-06-11 Thread Rustom Mody
On Wednesday, June 11, 2014 1:11:12 PM UTC+5:30, Gregory Ewing wrote: Steven D'Aprano wrote: Everything *eventually* gets converted to heat, but not immediately. There's a big difference between a car that gets 100 miles to the gallon, and one that gets 1 mile to the gallon. With a car,

Re: Python's re module and genealogy problem

2014-06-11 Thread Michael Torrie
On 06/11/2014 06:23 AM, BrJohan wrote: For some genealogical purposes I consider using Python's re module. Rather many names can be spelled in a number of similar ways, and in order to match names even if they are spelled differently, I will build regular expressions, each of which is

Re: Micro Python -- a lean and efficient implementation of Python 3

2014-06-11 Thread Michael Torrie
On 06/10/2014 01:43 PM, alister wrote: On Tue, 10 Jun 2014 12:27:26 -0700, wxjmfauth wrote: BTW, very easy to explain. Yeah he keeps saying that, but he never does explain--just flails around and mumbles unicode.org. Guess everyone has to have his or her windmill to tilt at. --

Re: 基于cython的即时编译器cyjit,欢迎大家提建议

2014-06-11 Thread mm0fmf
On 11/06/2014 10:37, 1989lzhh wrote: 我正在写一个使用cython code作为后端的即时编译器名为cyjit,将python code 转换为cython code再编译为c extension导入.设计上主要参考numba.jit的思路, 使用decorate来指定要编译的function,例如: from cyjit import jit @jit('int(int,int)') def add(a,b): return a+b add(1,2)#compiled @jit('int(int,int)',

Re: Python's re module and genealogy problem

2014-06-11 Thread Nick Cash
On 06/11/2014 10:35 AM, Michael Torrie wrote: On 06/11/2014 06:23 AM, BrJohan wrote: For some genealogical purposes I consider using Python's re module. Rather many names can be spelled in a number of similar ways, and in order to match names even if they are spelled differently, I will

Re: 基于cython的即时编译器cyjit,欢迎大家提建议

2014-06-11 Thread Skip Montanaro
You might say that but I couldn't possibly comment. You could run the message through Google Translate. It's not publication quality translation, but serves the needs in this instance. (Gmail offers to translate the OP's message for me.) Here's what GT produced (successfully translates the

Re: 基于cython的即时编译器cyjit,欢迎大家提建议

2014-06-11 Thread 1989lzhh
sorry,wrong version post 发自我的 iPhone 在 Jun 12, 2014,0:16,mm0fmf n...@mailinator.com 写道: On 11/06/2014 10:37, 1989lzhh wrote: 我正在写一个使用cython code作为后端的即时编译器名为cyjit,将python code 转换为cython code再编译为c extension导入.设计上主要参考numba.jit的思路, 使用decorate来指定要编译的function,例如: from cyjit import jit

Re: Python's re module and genealogy problem

2014-06-11 Thread Simon Ward
On 11 June 2014 13:23:14 BST, BrJohan brjo...@gmail.com wrote: For some genealogical purposes I consider using Python's re module. Rather many names can be spelled in a number of similar ways, and in order to match names even if they are spelled differently, I will build regular expressions,

Re: Python's re module and genealogy problem

2014-06-11 Thread Vlastimil Brom
2014-06-11 14:23 GMT+02:00 BrJohan brjo...@gmail.com: For some genealogical purposes I consider using Python's re module. ... Now, my problem: Is there a way to decide whether any two - or more - of those regular expressions will match the same string? Or, stated a little differently: Can

Re: Thoughts on SQL vs ORM

2014-06-11 Thread suamere
I'm afraid I don't understand what all that means. But I invariably go for SQL over any abstraction paradigm. When presented with options, these are the possible stances: 1. (Lead) Become educated on the options and decide on one. 2. (Follow) Become educated on the options and remain

Re: Thoughts on SQL vs ORM

2014-06-11 Thread Chris Angelico
On Thu, Jun 12, 2014 at 5:39 AM, suam...@gmail.com wrote: When presented with options, these are the possible stances: 1. (Lead) Become educated on the options and decide on one. 2. (Follow) Become educated on the options and remain impartial. 3. Remain ignorant of the

Re: Is MVC Design Pattern good enough?

2014-06-11 Thread Terry Reedy
On 6/11/2014 2:27 PM, Stefan Ram wrote: Mark Lawrence breamore...@yahoo.co.uk writes: IDLE is available on all platforms and is written in tkinter. But personally I'd rather use the command line :) In the meantime, I have learned that tkinter in fact has become part of a standard

Re: 基于cython的即时编译器cyjit,欢迎大家提建议

2014-06-11 Thread 1989lzhh
在 Jun 12, 2014,1:16,Skip Montanaro s...@pobox.com 写道: You might say that but I couldn't possibly comment. You could run the message through Google Translate. It's not publication quality translation, but serves the needs in this instance. (Gmail offers to translate the OP's message for

A JIT compiler 'cyjit' using cython code as a backend

2014-06-11 Thread 1989lzhh
I'm writing a JIT compiler named cyjit using cython code as a backend. It designed primarily reference numba.jit. the jitted python function will be converted to cython code then compiled to c extension. Use decorate to specify compiled function. for example: from cyjit import jit @ jit

Re: OT: This Swift thing

2014-06-11 Thread Steven D'Aprano
On Wed, 11 Jun 2014 08:48:36 -0400, Roy Smith wrote: In article 53984cd2$0$29988$c3e8da3$54964...@news.astraweb.com, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: Yes, technically water-cooled engines are cooled by air too. The engine heats a coolant (despite the name,

Re: OT: This Swift thing

2014-06-11 Thread Steven D'Aprano
On Wed, 11 Jun 2014 08:28:43 -0700, Rustom Mody wrote: Steven D'Aprano wrote: Not the point. There's a minimum amount of energy required to flip a bit. Everything beyond that is, in a sense, just wasted. You mentioned this yourself in your previous post. It's a *really* tiny amount of

Re: OT: This Swift thing

2014-06-11 Thread Gregory Ewing
Steven D'Aprano wrote: Automotive cooling fluid in modern sealed radiators is typically a mixture of 50% anti-freeze and 50% water. Sometimes it's even more than 50%, at which point you really have an antifreeze-cooled engine. :-) -- Greg --

About python while statement and pop()

2014-06-11 Thread hito koto
Hello,all I'm first time, I want to make a while statement which can function the same x.pop () and without the use of pop、how can i to do? i want to change this is code: def foo(x): y = [] while x !=[]: y.append(x.pop()) return y --

Re:About python while statement and pop()

2014-06-11 Thread Dave Angel
hito koto hitokoto2...@gmail.com Wrote in message: Hello,all I'm first time, I want to make a while statement which can function the same x.pop () and without the use of pop、how can i to do? No idea what the question means. Are you just trying to rewrite the loop in a python

Re: About python while statement and pop()

2014-06-11 Thread Vincent Vande Vyvre
Le 12/06/2014 05:12, hito koto a écrit : Hello,all I'm first time, I want to make a while statement which can function the same x.pop () and without the use of pop、how can i to do? i want to change this is code: def foo(x): y = [] while x !=[]: y.append(x.pop())

Re: About python while statement and pop()

2014-06-11 Thread Chris Angelico
On Thu, Jun 12, 2014 at 1:40 PM, Vincent Vande Vyvre vincent.vandevy...@swing.be wrote: Le 12/06/2014 05:12, hito koto a écrit : Hello,all I'm first time, I want to make a while statement which can function the same x.pop () and without the use of pop、how can i to do? i want to change

Lines on a tkinter.Canvas

2014-06-11 Thread Pedro Izecksohn
  The code available from: http://izecksohn.com/pedro/python/canvas/testing.py   draws 2 horizontal lines on a Canvas. Why the 2 lines differ on thickness and length?   The Canvas' method create_line turns on at least 2 pixels. But I want to turn on many single pixels on a Canvas. How should I

Re: OT: This Swift thing

2014-06-11 Thread Chris Angelico
On Thu, Jun 12, 2014 at 12:08 PM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: I'm just pointing out that our computational technology uses over a million times more energy than the theoretical minimum, and therefore there is a lot of room for efficiency gains without sacrificing

Re: OT: This Swift thing

2014-06-11 Thread Gene Heskett
On Wednesday 11 June 2014 22:11:53 Gregory Ewing did opine And Gene did reply: Steven D'Aprano wrote: Automotive cooling fluid in modern sealed radiators is typically a mixture of 50% anti-freeze and 50% water. Sometimes it's even more than 50%, at which point you really have an

Re: About python while statement and pop()

2014-06-11 Thread hito koto
2014年6月12日木曜日 12時58分27秒 UTC+9 Chris Angelico: On Thu, Jun 12, 2014 at 1:40 PM, Vincent Vande Vyvre vincent.vandevy...@swing.be wrote: Le 12/06/2014 05:12, hito koto a écrit : Hello,all I'm first time, I want to make a while statement which can function the same x.pop ()

Re: About python while statement and pop()

2014-06-11 Thread Chris Angelico
On Thu, Jun 12, 2014 at 2:56 PM, hito koto hitokoto2...@gmail.com wrote: I want to use while statement, This sounds like homework. Go back to your teacher/tutor for assistance, rather than asking us to do the work for you; or at very least, word your question in such a way that we can help you

Re: About python while statement and pop()

2014-06-11 Thread Steven D'Aprano
On Wed, 11 Jun 2014 21:56:06 -0700, hito koto wrote: I want to use while statement, for example: def foo(x): ... y = [] ... while x !=[]: ... y.append(x.pop()) ... return y ... print foo(a) [[10], [5, 6, 7, 8, 9], [1, 2, 3, 4]] a [] but this is empty so,I want

[issue21715] Chaining exceptions at C level

2014-06-11 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: The proposed patch introduces new private function which chains previously fetched and current exceptions. This will help in correct implementing at C level an equivalent of following Python idioms: try: ... finally: ... and

[issue21706] Add base for enumerations (Functional API)

2014-06-11 Thread Dmitry Korchemny
Dmitry Korchemny added the comment: I think that the situation when you want start numbering from 0 is rather common, especially when you need to define bit fields as enumeration or when you need to implement an interface with other languages (e.g., C). --

[issue21624] Idle: polish htests

2014-06-11 Thread Terry J. Reedy
Terry J. Reedy added the comment: Refinement 1: in doing coverage for UndoDelegator, I noticed that the htest function is counted as missing (uncovered). Both of the following in .coveragerc work to ignore the block: name prefix; comment suffix. def htest_.*: .*# htest # The

[issue19561] request to reopen Issue837046 - pyport.h redeclares gethostname() if SOLARIS is defined

2014-06-11 Thread Thomas Klausner
Changes by Thomas Klausner t...@giga.or.at: -- nosy: +wiz ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19561 ___ ___ Python-bugs-list mailing

[issue21703] IDLE: Test UndoDelegator

2014-06-11 Thread Terry J. Reedy
Terry J. Reedy added the comment: cls.percolator.close() cut leaks in half. test_idle leaked [237, 237, 237, 237] references, sum=948 test_idle leaked [95, 97, 97, 97] memory blocks, sum=386 test_idle leaked [130, 130, 130, 130] references, sum=520 test_idle leaked [60, 62, 62, 62] memory

[issue11783] email parseaddr and formataddr should be IDNA aware

2014-06-11 Thread Milan Oberkirch
Milan Oberkirch added the comment: Ping :) -- nosy: +zvyn ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11783 ___ ___ Python-bugs-list mailing

[issue21709] logging.__init__ assumes that __file__ is always set

2014-06-11 Thread Roundup Robot
Roundup Robot added the comment: New changeset 11a920a26f13 by Vinay Sajip in branch '3.4': Issue #21709: Remove references to __file__ when part of a frozen application. http://hg.python.org/cpython/rev/11a920a26f13 New changeset 149cc6364180 by Vinay Sajip in branch 'default': Closes #21709:

[issue12989] Consistently handle path separator in Py_GetPath on Windows

2014-06-11 Thread STINNER Victor
STINNER Victor added the comment: Hum, it would be nice to have a unit test for this change. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12989 ___

[issue21703] IDLE: Test UndoDelegator

2014-06-11 Thread Saimadhav Heblikar
Saimadhav Heblikar added the comment: It was WidgetRedirector which was leaking. cls.percolator.redir.close() added in tearDownClass fixes the leak. saimadhav@debian:~/dev/34-cpython$ ./python -m test -R :: -uall test_idle [1/1] test_idle beginning 9 repetitions 123456789 . 1 test OK.

[issue21716] 3.4.1 download page link for OpenPGP signatures has no sigs

2014-06-11 Thread grossdm
Changes by grossdm m...@douglasmgross.com: -- components: Windows nosy: grossdm priority: normal severity: normal status: open title: 3.4.1 download page link for OpenPGP signatures has no sigs type: enhancement versions: Python 3.4 ___ Python

[issue21703] IDLE: Test UndoDelegator

2014-06-11 Thread Terry J. Reedy
Terry J. Reedy added the comment: Great. I will review the next patch (with the change in the comment) tomorrow. The ttk theme changed message comes up often. I believe it is specific to debug builds. Perhaps you could keep track of when it occurs so we can make a guess at the cause. I

[issue20577] IDLE: Remove FormatParagraph's width setting from config dialog

2014-06-11 Thread Tal Einat
Tal Einat added the comment: What do you mean with the comment regarding pep8? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20577 ___ ___

[issue21709] logging.__init__ assumes that __file__ is always set

2014-06-11 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Hi Vinaj, thanks for the patch, but it doesn't really help outside of py2exe. The sys.frozen flag is not an official Python API and it's unlikely to become one, since you can freeze the whole application or just parts of it, which sys.frozen would not be

[issue11783] email parseaddr and formataddr should be IDNA aware

2014-06-11 Thread Milan Oberkirch
Changes by Milan Oberkirch milan...@oberkirch.org: -- nosy: +jesstess Added file: http://bugs.python.org/file35565/issue11783.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11783 ___

[issue21709] logging.__init__ assumes that __file__ is always set

2014-06-11 Thread Vinay Sajip
Vinay Sajip added the comment: Could you please use a fix that works for Python tools in general? I suggested an alternative implementation altogether in Issue #16778, but it was suggested that we wait for frame annotations. I'm not sure what the schedule for that is. The sys.frozen flag

[issue21709] logging.__init__ assumes that __file__ is always set

2014-06-11 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: On 11.06.2014 11:25, Vinay Sajip wrote: Vinay Sajip added the comment: Could you please use a fix that works for Python tools in general? I suggested an alternative implementation altogether in Issue #16778, but it was suggested that we wait for

[issue21717] Exclusive mode for ZipFile and TarFile

2014-06-11 Thread Antony Lee
New submission from Antony Lee: I noticed that while lzma and bz2 already support the x (create a new file, raise if it already exists) flag, zipfile and tarfile don't know about it yet. It would be an useful addition, just as it is useful for regular open. A quick look at both modules show

[issue21709] logging.__init__ assumes that __file__ is always set

2014-06-11 Thread Vinay Sajip
Vinay Sajip added the comment: _srcfile is only used to identify the caller's stack frame Not quite. It's also used to indicate whether findCaller() should be called at all: setting it to None avoids calling findCaller(), which might be desirable in some performance-sensitive scenarios. So

[issue21629] clinic.py --converters fails

2014-06-11 Thread Larry Hastings
Larry Hastings added the comment: Confirmed. -- assignee: - larry stage: - needs patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21629 ___

[issue21709] logging.__init__ assumes that __file__ is always set

2014-06-11 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: On 11.06.2014 12:32, Vinay Sajip wrote: Vinay Sajip added the comment: _srcfile is only used to identify the caller's stack frame Not quite. It's also used to indicate whether findCaller() should be called at all: setting it to None avoids calling

[issue11783] email parseaddr and formataddr should be IDNA aware

2014-06-11 Thread Milan Oberkirch
Milan Oberkirch added the comment: Here comes an updated patch based on 'email_address_idna.patch' without breaking smtplib (as the previous patches did). -- Added file: http://bugs.python.org/file35566/issue11783-rdm-fixed.patch ___ Python tracker

[issue21709] logging.__init__ assumes that __file__ is always set

2014-06-11 Thread Vinay Sajip
Vinay Sajip added the comment: Please also add some comment explaining why this is done in this way. Natürlich :-) it may be worthwhile introducing some generic helper to the stdlib Wouldn't you have to pass in a function (or code object) from a specific module, though? It seems more

[issue21629] clinic.py --converters fails

2014-06-11 Thread Roundup Robot
Roundup Robot added the comment: New changeset 6b2db7fc17f7 by Larry Hastings in branch '3.4': Issue #21629: Fix Argument Clinic's --converters feature. http://hg.python.org/cpython/rev/6b2db7fc17f7 -- nosy: +python-dev ___ Python tracker

[issue21709] logging.__init__ assumes that __file__ is always set

2014-06-11 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: On 11.06.2014 13:22, Vinay Sajip wrote: Vinay Sajip added the comment: Please also add some comment explaining why this is done in this way. Natürlich :-) Prima :-) it may be worthwhile introducing some generic helper to the stdlib Wouldn't

[issue21629] clinic.py --converters fails

2014-06-11 Thread Roundup Robot
Roundup Robot added the comment: New changeset 8b4b8f5d7321 by Larry Hastings in branch 'default': Issue #21629: Merge from 3.4. http://hg.python.org/cpython/rev/8b4b8f5d7321 -- ___ Python tracker rep...@bugs.python.org

[issue21629] clinic.py --converters fails

2014-06-11 Thread Larry Hastings
Changes by Larry Hastings la...@hastings.org: -- resolution: - fixed stage: needs patch - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21629 ___

[issue21520] Erroneous zipfile test failure if the string 'bad' appears in pwd

2014-06-11 Thread Larry Hastings
Larry Hastings added the comment: With this patch applied the test passes. (Patch is against 3.4 branch.) Look good? -- keywords: +patch Added file: http://bugs.python.org/file35567/larry.bad.zipfile.1.diff ___ Python tracker

[issue3068] IDLE - Add an extension configuration dialog

2014-06-11 Thread Tal Einat
Tal Einat added the comment: Ned, many thanks for the review and detailed feedback! Here are responses to your comments 1. Thanks for the code suggestion regarding the menudefs! That's a good catch. I have an OSX box for such testing. 2. I'll check this out. Could you perhaps explain or

[issue21712] fractions.gcd failure

2014-06-11 Thread Mark Dickinson
Mark Dickinson added the comment: Agreed with Tim. Oddly enough[1], remembering that with binary floating-point numbers, what you see is not what you get[2], it turns out that 8.881784197001252e-16 (= Fraction(1, 1125899906842624)) is in fact *exactly* the right answer, in that it's a

[issue13564] ftplib and sendfile()

2014-06-11 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' g.rod...@gmail.com: Added file: http://bugs.python.org/file35568/ftplib-sendfile5.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13564 ___

[issue13564] ftplib and sendfile()

2014-06-11 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: Updated patch which uses the newly added socket.sendfile() method (issue 17552). -- assignee: - giampaolo.rodola type: enhancement - performance versions: +Python 3.5 -Python 3.4 ___ Python tracker

[issue13559] Use sendfile where possible in httplib

2014-06-11 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: Patch in attachment uses the newly added socket.sendfile() method (issue 17552). -- keywords: +patch type: enhancement - performance Added file: http://bugs.python.org/file35569/httplib-sendfile.patch ___ Python

[issue21718] sqlite3 cursor.description seems to rely on incomplete statement parsing for detection

2014-06-11 Thread mike bayer
New submission from mike bayer: Per DBAPI and pysqlite docs, .description must be available for any SELECT statement regardless of whether or not rows are returned. However, this fails for SELECT statements that aren't simple SELECTs, such as those that use CTEs and therefore start out with

[issue21693] Broken link to Pylons in the HOWTO TurboGears documentation

2014-06-11 Thread Roundup Robot
Roundup Robot added the comment: New changeset 9438a8aa3622 by Senthil Kumaran in branch '2.7': #21693 - Fix the broken link for pylons project. http://hg.python.org/cpython/rev/9438a8aa3622 New changeset 08fa17130fb3 by Senthil Kumaran in branch '3.4': #21693 - Fix the broken link for pylons

[issue21693] Broken link to Pylons in the HOWTO TurboGears documentation

2014-06-11 Thread Senthil Kumaran
Senthil Kumaran added the comment: Fixed these. Thanks for the report. -- nosy: +orsenthil resolution: - fixed stage: - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21693

[issue21719] Returning Windows file attribute information via os.stat()

2014-06-11 Thread Ben Hoyt
New submission from Ben Hoyt: I asked recently on python-dev [1] about adding a st_winattrs attribute to stat result objects on Windows, to return the full set of Windows file attribute bits, such as hidden or compressed status. Copying from that thread for a bit more context here: Python's

[issue21720] TypeError: Item in ``from list'' not a string message

2014-06-11 Thread David Szotten
New submission from David Szotten: ``` __import__('fabric.', fromlist=[u'api']) Traceback (most recent call last): File stdin, line 1, in module ``` accidentally ended up with something like this via some module that was using `unicode_literals`. stumped me for a second until i realised

[issue21718] sqlite3 cursor.description seems to rely on incomplete statement parsing for detection

2014-06-11 Thread R. David Murray
R. David Murray added the comment: It is true that the sqlite interface does not support WITH currently. It is an interesting question whether or not we could change this as a bug fix or not...I suppose it depends on whether or not it changes any behavior other than making .description work.

[issue21714] Path.with_name can construct invalid paths

2014-06-11 Thread Antoine Pitrou
Antoine Pitrou added the comment: I think raising ValueError is the way to go. Would you like to try writing a patch for it? -- nosy: +pitrou stage: - needs patch type: - behavior ___ Python tracker rep...@bugs.python.org

[issue21721] socket.sendfile() should use TransmitFile on Windows

2014-06-11 Thread Giampaolo Rodola'
New submission from Giampaolo Rodola': This is a follow up of issue 17552 which adds a new socket.sendfile() method taking advantage of high-performance os.sendfile() on UNIX. The same thing could be done for Windows by using TransmitFile:

[issue21696] Idle: test syntax of configuration files

2014-06-11 Thread Saimadhav Heblikar
Saimadhav Heblikar added the comment: Attaching a patch to test the default configuration files. config-keys.def will be added once the issues related to it[1] are resolved. In this patch, test that the configHandler module can successfully extract the values. For places where numeric values

[issue21719] Returning Windows file attribute information via os.stat()

2014-06-11 Thread Martin v . Löwis
Martin v. Löwis added the comment: Instead of the somewhat cryptic name winattrs, I suggest to call it st_file_attributes, as it is called in the Windows API (actually, GetFileAttributesEx calls it dwFileAttributes, but st_file_attributes could be considered a Pythonic spelling of that).

[issue21205] Add a name to Python generators

2014-06-11 Thread STINNER Victor
STINNER Victor added the comment: gen_qualname.patch: add a new __qualname__ attribute to generators and change how the name is set: use the name of the function, instead of using the name of the code. Incompatible changes of this patch: - repr(generator) now shows the qualified name instead

[issue21719] Returning Windows file attribute information via os.stat()

2014-06-11 Thread Ben Hoyt
Ben Hoyt added the comment: Fair call -- st_file_attributes sounds good to me, and matches the prefix of the FILE_ATTRIBUTES_* constants better too. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21719

[issue21719] Returning Windows file attribute information via os.stat()

2014-06-11 Thread STINNER Victor
STINNER Victor added the comment: Instead of the somewhat cryptic name winattrs, I suggest to call it st_file_attributes (...) On Windows, os.stat() calls GetFileInformationByHandle() which fills a BY_HANDLE_FILE_INFORMATION structure, and this structure has a dwFileAttributes attribute.

  1   2   >