Re: Dictionary

2014-01-09 Thread wxjmfauth
Le mercredi 8 janvier 2014 20:00:02 UTC+1, Bischoop a écrit : Walter Hurry wrote: On Mon, 30 Dec 2013 18:38:20 +, Bischoop wrote: I have a txt file with some words, and need simply program that will print me words containing provided letters. For example:

Re: the Gravity of Python 2

2014-01-09 Thread Kushal Kumaran
Roy Smith r...@panix.com writes: In article mailman.5231.1389240235.18130.python-l...@python.org, Chris Angelico ros...@gmail.com wrote: On Thu, Jan 9, 2014 at 2:35 PM, Roy Smith r...@panix.com wrote: Yes, it *is* simple. It *is* easy. I've been working with pure-UTC times (either called

Re: the Gravity of Python 2

2014-01-09 Thread Mark Lawrence
On 09/01/2014 01:27, Roy Smith wrote: In article laknps$umv$1...@dont-email.me, Kevin Walzer k...@codebykevin.com wrote: I haven't updated my Python apps to 3.x because there's nothing in 3.x that offers benefits to my users. I almost found a reason to move to Python 3 today. Then I got

Re: the Gravity of Python 2

2014-01-09 Thread Mark Lawrence
On 09/01/2014 06:06, Kushal Kumaran wrote: My local copy of the python 3.2.3 docs says: classmethod datetime.utcnow() Return the current UTC date and time, with tzinfo None. This is like now(), but returns the current UTC date and time, as a naive datetime object. An aware

Re: the Gravity of Python 2

2014-01-09 Thread Ben Finney
Kushal Kumaran kushal.kuma...@gmail.com writes: Roy Smith r...@panix.com writes: How, in Python, do you get an aware UTC datetime object? My local copy of the python 3.2.3 docs says: classmethod datetime.utcnow() Return the current UTC date and time, with tzinfo None. This is

Re: the Gravity of Python 2

2014-01-09 Thread Kushal Kumaran
Ben Finney ben+pyt...@benfinney.id.au writes: Kushal Kumaran kushal.kuma...@gmail.com writes: Roy Smith r...@panix.com writes: How, in Python, do you get an aware UTC datetime object? My local copy of the python 3.2.3 docs says: classmethod datetime.utcnow() Return the current UTC

Re: the Gravity of Python 2

2014-01-09 Thread Mark Lawrence
On 09/01/2014 09:03, Ben Finney wrote: Kushal Kumaran kushal.kuma...@gmail.com writes: Roy Smith r...@panix.com writes: How, in Python, do you get an aware UTC datetime object? My local copy of the python 3.2.3 docs says: classmethod datetime.utcnow() Return the current UTC date and

Re: Constructive Criticism

2014-01-09 Thread Peter Otten
jeremiahvalerio...@gmail.com wrote: Hi, hows it going I've been self teaching myself python, and i typed up this small script now i know its not the best the coding is not the best but i would like to know of ways to make a small script like this better so all constructive critisim is

Re: nested dictionaries and functions in data structures.

2014-01-09 Thread Sean Murphy
Thanks for that. I will have a play and see how I can apply your example. On 07/01/2014, at 11:19 PM, Jean-Michel Pichavant jeanmic...@sequans.com wrote: - Original Message - Thanks for that. It resolved the issue and it was so simple compared to everything else I saw on the net.

AW: WebSocket for Python 2 and 3 on Twisted and asyncio

2014-01-09 Thread Tobias Oberstein
Autobahn now also supports asyncio on Python 2! https://github.com/tavendo/AutobahnPython#python-support This is made possible by Trollius, an awesome backport of asyncio: https://pypi.python.org/pypi/trollius/0.1.2 -Ursprüngliche Nachricht- Von: Python-list [mailto:python-list-

Re: the Gravity of Python 2

2014-01-09 Thread Piet van Oostrum
Kushal Kumaran kushal.kuma...@gmail.com writes: Yes, but the documentation for utcnow explicitly tells you how to get an aware object. An aware current UTC datetime can be obtained by calling datetime.now(timezone.utc). And in Python 2.7 you can just copy the definition of utc from the

Re: Learning python networking

2014-01-09 Thread Alister
On Wed, 08 Jan 2014 19:49:40 -0800, Dan Stromberg wrote: The third quote, from Brian Kernighan, seems to underestimate the complexity of asynchronous programming in the large - it's probably not just twice as hard. Perhaps it should be rephrased as at least twice as hard It really does pay

Re : Python GTK GUI struck when process is going on.

2014-01-09 Thread Prapulla Kumar
Hi all, I'm using python gtk to upload file to S3 service by boto API , GUI struck when uploading file and releases the GUI after completed download I'm using thread to show progress of upload in GUI but it struck. Can you some suggestion how to show progress of upload in GUI or any spinner until

Re: Time zones and why they change so damned often

2014-01-09 Thread Alister
On Thu, 09 Jan 2014 07:17:25 +, Mark Lawrence wrote: On 09/01/2014 04:14, Chris Angelico wrote: On Thu, Jan 9, 2014 at 2:54 PM, Ben Finney ben+pyt...@benfinney.id.au wrote: I'm approaching it with the goal of knowing better what I'm talking about when I advocate scrapping the whole DST

Re: the Gravity of Python 2

2014-01-09 Thread Ben Finney
Kushal Kumaran kushal.kuma...@gmail.com writes: Ben Finney ben+pyt...@benfinney.id.au writes: Kushal Kumaran kushal.kuma...@gmail.com writes: Roy Smith r...@panix.com writes: How, in Python, do you get an aware UTC datetime object? classmethod datetime.utcnow() Return the

Re: the Gravity of Python 2

2014-01-09 Thread Piet van Oostrum
Chris Angelico ros...@gmail.com writes: On Thu, Jan 9, 2014 at 2:34 PM, Ben Finney ben+pyt...@benfinney.id.au wrote: [ a bunch of stuff that I totally agree with ] No response needed here :) So I was wrong on the specific example of .today(), but asking the question the other way is at

Re: the Gravity of Python 2

2014-01-09 Thread Roy Smith
In article mailman.5244.1389254198.18130.python-l...@python.org, Chris Angelico ros...@gmail.com wrote: What can you (Roy), with your use-case, achieve with datetime that you can't achieve (at least reasonably easily) with a timestamp? As I'm mentioned several times, when you print a

Re: the Gravity of Python 2

2014-01-09 Thread Chris Angelico
On Fri, Jan 10, 2014 at 1:06 AM, Piet van Oostrum p...@vanoostrum.org wrote: Chris Angelico ros...@gmail.com writes: On Thu, Jan 9, 2014 at 2:34 PM, Ben Finney ben+pyt...@benfinney.id.au wrote: With time zones, as with text encodings, there is a single technically elegant solution (for

Re: the Gravity of Python 2

2014-01-09 Thread Roy Smith
In article mailman.5259.1389278063.18130.python-l...@python.org, Chris Angelico ros...@gmail.com wrote: Actually, the nearest parallel to Unicode is probably use UTC everywhere, which makes for a superb internal representation and transmission format, but bugs most human beings :) It is, by

Re: the Gravity of Python 2

2014-01-09 Thread Roy Smith
In article mailman.5257.1389274514.18130.python-l...@python.org, Ben Finney ben+pyt...@benfinney.id.au wrote: Kushal Kumaran kushal.kuma...@gmail.com writes: Ben Finney ben+pyt...@benfinney.id.au writes: Kushal Kumaran kushal.kuma...@gmail.com writes: Roy Smith r...@panix.com

Re: the Gravity of Python 2

2014-01-09 Thread Chris Angelico
On Fri, Jan 10, 2014 at 1:14 AM, Roy Smith r...@panix.com wrote: In article mailman.5244.1389254198.18130.python-l...@python.org, Chris Angelico ros...@gmail.com wrote: What can you (Roy), with your use-case, achieve with datetime that you can't achieve (at least reasonably easily) with a

Re: the Gravity of Python 2

2014-01-09 Thread Dan Sommers
On Thu, 09 Jan 2014 09:14:22 -0500, Roy Smith wrote: Oh, and another thing I can do with a datetime that I can't do with a unix timestamp. I can represent the day I was born. At the risk of dating myself, the day I was born is -231094800. Dan --

Re: Re : Python GTK GUI struck when process is going on.

2014-01-09 Thread MRAB
On 2014-01-09 11:53, Prapulla Kumar wrote: Hi all, I'm using python gtk to upload file to S3 service by boto API , GUI struck when uploading file and releases the GUI after completed download I'm using thread to show progress of upload in GUI but it struck. Can you some suggestion how to show

Re: the Gravity of Python 2

2014-01-09 Thread Chris Angelico
On Fri, Jan 10, 2014 at 2:01 AM, Dan Sommers d...@tombstonezero.net wrote: On Thu, 09 Jan 2014 09:14:22 -0500, Roy Smith wrote: Oh, and another thing I can do with a datetime that I can't do with a unix timestamp. I can represent the day I was born. At the risk of dating myself, the day I

Re: argparse action on default values

2014-01-09 Thread Chris Angelico
On Thu, Jan 9, 2014 at 5:20 AM, Florian Lindner mailingli...@xgm.de wrote: def norm_path(*parts): Returns the normalized, absolute, expanded and joined path, assembled of all parts. parts = [ str(p) for p in parts ] return

Re: Editor for Python

2014-01-09 Thread TP
On Friday, 23 November 2001 04:13:40 UTC+5:30, MANUEL FERNANDEZ PEREZ wrote: Hello, I'm looking for an editor for Python.I' m interested it works on Windows.Can anybody help me? It's an IDE rather than just an editor but how about PyCharm 3 Community Edition? [1] [1]

Re: Time zones and why they change so damned often (was: the Gravity of Python 2)

2014-01-09 Thread Dave Angel
On Thu, 9 Jan 2014 15:14:55 +1100, Chris Angelico ros...@gmail.com wrote: [1] For those who aren't right up on timezone trivia, AZ has no DST. Similarly the Australian state of Queensland does not shift its clocks. And Indiana. -- DaveA -- https://mail.python.org/mailman/listinfo/python-list

Re: Editor for Python

2014-01-09 Thread Jean-Michel Pichavant
- Original Message - On Jan 8, 2014, at 10:53 AM, Jean-Michel Pichavant jeanmic...@sequans.com wrote: -- IMPORTANT NOTICE: too late you have sent this to a public forum No pb with that, the python list is the intended recipient :) I tried to negotiate this with my

Is email.parser a good replacement for formail?

2014-01-09 Thread Matěj Cepl
Hi, I have a script (https://github.com/mcepl/gg_scraper) where I need to read possibly malformed mbox messages. I use subprocess.Popen() and /usr/bin/formail to clean up them to be correct mbox messages (with correct leading From line etc.). Now I try to run tests for my script on Travis-CI,

Re: the Gravity of Python 2

2014-01-09 Thread Roy Smith
On Thursday, January 9, 2014 9:57:57 AM UTC-5, Chris Angelico wrote: And months are more complicated still, so it's probably easiest to use strftime: time.strftime(%Y%m,time.gmtime(ts)) '201401' strftime is a non-starter at far as easy goes. I don't know about you, but I certainly

Re: the Gravity of Python 2

2014-01-09 Thread Mark Lawrence
On 09/01/2014 16:21, Roy Smith wrote: No, it would be solved by a built-in method. Recipes are a cop-out. If something is complicated enough to require a recipe, and used frequently enough to be worth writing that recipe up and documenting it, you might as well have gone the one additional

Re: the Gravity of Python 2

2014-01-09 Thread Tim Golden
On 09/01/2014 16:30, Mark Lawrence wrote: On 09/01/2014 16:21, Roy Smith wrote: No, it would be solved by a built-in method. Recipes are a cop-out. If something is complicated enough to require a recipe, and used frequently enough to be worth writing that recipe up and documenting it, you

RE: the Gravity of Python 2

2014-01-09 Thread Nick Cash
and %s (which is incredibly useful) is not even documented (I suspect it's also not available on all platforms). The format specifiers available to Python are just whatever is available to the underlying c time.h. The manpage for strftime indicates that %s isn't part of the C standard, but

Re: the Gravity of Python 2

2014-01-09 Thread Mark Lawrence
On 09/01/2014 16:42, Nick Cash wrote: and %s (which is incredibly useful) is not even documented (I suspect it's also not available on all platforms). The format specifiers available to Python are just whatever is available to the underlying c time.h. The manpage for strftime indicates that

Re: the Gravity of Python 2

2014-01-09 Thread Ethan Furman
On 01/09/2014 12:42 AM, Mark Lawrence wrote: On 09/01/2014 01:27, Roy Smith wrote: Naive datetimes are what everybody uses. It's what utcnow() gives you. So why make life difficult for everybody? Python 3 didn't win a convert today. Yep, dates and times are easy. That's why there are 17

Re: the Gravity of Python 2

2014-01-09 Thread Piet van Oostrum
Chris Angelico ros...@gmail.com writes: On Fri, Jan 10, 2014 at 1:06 AM, Piet van Oostrum p...@vanoostrum.org wrote: Chris Angelico ros...@gmail.com writes: On Thu, Jan 9, 2014 at 2:34 PM, Ben Finney ben+pyt...@benfinney.id.au wrote: With time zones, as with text encodings, there is a

Re: the Gravity of Python 2

2014-01-09 Thread Ethan Furman
On 01/09/2014 06:57 AM, Chris Angelico wrote: On Fri, Jan 10, 2014 at 1:14 AM, Roy Smith r...@panix.com wrote: Thanks for this collection! Now we can discuss. [snip] Datetimes are self-describing. If I have a datetime or a timedelta, I know what I've got. I've written more than one bug

Re: the Gravity of Python 2

2014-01-09 Thread Roy Smith
I wrote: Recipes are a cop-out On Thursday, January 9, 2014 11:30:31 AM UTC-5, Mark Lawrence wrote: So all of the itertools recipes should be part of the Python module and not in more-itertools on pypi? Certainly, the recipes that are documented on the official itertools page, yes. --

Re: Bytes indexing returns an int

2014-01-09 Thread Piet van Oostrum
Ned Batchelder n...@nedbatchelder.com writes: On 1/8/14 11:08 AM, wxjmfa...@gmail.com wrote: Byte strings (encoded code points) or native unicode is one thing. But on the other side, the problem is elsewhere. These very talented ascii narrow minded, unicode illiterate devs only succeded to

Re: Bytes indexing returns an int

2014-01-09 Thread Ethan Furman
On 01/09/2014 09:05 AM, Piet van Oostrum wrote: Ned Batchelder n...@nedbatchelder.com writes: On 1/8/14 11:08 AM, wxjmfa...@gmail.com wrote: Byte strings (encoded code points) or native unicode is one thing. But on the other side, the problem is elsewhere. These very talented ascii narrow

Re: the Gravity of Python 2

2014-01-09 Thread Mark Lawrence
On 09/01/2014 16:01, Ethan Furman wrote: On 01/09/2014 12:42 AM, Mark Lawrence wrote: On 09/01/2014 01:27, Roy Smith wrote: Naive datetimes are what everybody uses. It's what utcnow() gives you. So why make life difficult for everybody? Python 3 didn't win a convert today. Yep, dates and

Re: the Gravity of Python 2

2014-01-09 Thread Mark Lawrence
On 09/01/2014 17:07, Roy Smith wrote: I wrote: Recipes are a cop-out On Thursday, January 9, 2014 11:30:31 AM UTC-5, Mark Lawrence wrote: So all of the itertools recipes should be part of the Python module and not in more-itertools on pypi? Certainly, the recipes that are documented on the

Re: the Gravity of Python 2

2014-01-09 Thread Ethan Furman
On 01/09/2014 10:18 AM, Mark Lawrence wrote: On 09/01/2014 16:01, Ethan Furman wrote: On 01/09/2014 12:42 AM, Mark Lawrence wrote: On 09/01/2014 01:27, Roy Smith wrote: Naive datetimes are what everybody uses. It's what utcnow() gives you. So why make life difficult for everybody? Python 3

Re: the Gravity of Python 2

2014-01-09 Thread Ethan Furman
On 01/09/2014 10:20 AM, Mark Lawrence wrote: On Thursday, January 9, 2014 11:30:31 AM UTC-5, Mark Lawrence wrote: So all of the itertools recipes should be part of the Python module and not in more-itertools on pypi? Certainly, the recipes that are documented on the official itertools page,

Re: Bytes indexing returns an int

2014-01-09 Thread Serhiy Storchaka
09.01.14 19:28, Ethan Furman написав(ла): On 01/09/2014 09:05 AM, Piet van Oostrum wrote: Please ignore jmf's repeated nonsense. Or ban him. His one, minor, contribution has been completely swamped by the rest of his belligerent, unfounded, refuted posts. Please not. I have a fun from

unicode troubles and postgres

2014-01-09 Thread Ethan Furman
So I'm working with postgres, and I get a datadump which I try to restore to my test system, and I get this: ERROR: value too long for type character varying(4) CONTEXT: COPY res_currency, line 32, column symbol: руб py6 sure looks like it should fit, but it don't. Further investigation

Re: unicode troubles and postgres

2014-01-09 Thread Peter Otten
Ethan Furman wrote: So I'm working with postgres, and I get a datadump which I try to restore to my test system, and I get this: ERROR: value too long for type character varying(4) CONTEXT: COPY res_currency, line 32, column symbol: руб py6 sure looks like it should fit, but it don't.

Re: Constructive Criticism

2014-01-09 Thread jeremiah valerio
On Thursday, January 9, 2014 3:56:37 AM UTC-6, Peter Otten wrote: jeremiahvalerio...@gmail.com wrote: Hi, hows it going I've been self teaching myself python, and i typed up this small script now i know its not the best the coding is not the best but i would like to know of ways

Re: the Gravity of Python 2

2014-01-09 Thread Chris Angelico
On Fri, Jan 10, 2014 at 3:21 AM, Roy Smith r...@panix.com wrote: On Thursday, January 9, 2014 9:57:57 AM UTC-5, Chris Angelico wrote: And months are more complicated still, so it's probably easiest to use strftime: time.strftime(%Y%m,time.gmtime(ts)) '201401' strftime is a non-starter at

Re: unicode troubles and postgres [SOLVED]

2014-01-09 Thread Ethan Furman
On 01/09/2014 10:49 AM, Ethan Furman wrote: So I'm working with postgres, and I get a datadump which I try to restore to my test system, and I get this: ERROR: value too long for type character varying(4) CONTEXT: COPY res_currency, line 32, column symbol: руб py6 sure looks like it should

Re: the Gravity of Python 2

2014-01-09 Thread Chris Angelico
On Fri, Jan 10, 2014 at 3:51 AM, Piet van Oostrum p...@vanoostrum.org wrote: I don't know how other countries do it, but here, when the clock goes back, it goes from 03:00 to 02:00. So I wonder how they communicate when your plane leaves at 02:30 in that night. Which 02:30? In that case using

Re: Constructive Criticism

2014-01-09 Thread Christopher Welborn
On 01/08/2014 11:56 PM, jeremiahvalerio...@gmail.com wrote: Hi, hows it going I've been self teaching myself python, and i typed up this small script now i know its not the best the coding is not the best but i would like to know of ways to make a small script like this better so all

Re: unicode troubles and postgres [SOLVED]

2014-01-09 Thread Chris Angelico
On Fri, Jan 10, 2014 at 6:51 AM, Ethan Furman et...@stoneleaf.us wrote: The problem was I had created the database from template0 instead of template1, and 0 is SQL-ASCII while 1 is UTF8. Ah, this is one of the traps with Postgres. This is one of the reasons I prefer not to touch template[01]

Re: the Gravity of Python 2

2014-01-09 Thread Roy Smith
On Thursday, January 9, 2014 3:35:05 PM UTC-5, Chris Angelico wrote: In fact, I've given end users the ability to enter strftime strings (eg to construct a filename), and it's worked just fine. I assume you realize that ../../../../../../../../../../../../../../../../etc/passwd is a valid

Re: Constructive Criticism

2014-01-09 Thread jeremiah valerio
On Thursday, January 9, 2014 2:54:44 PM UTC-6, Christopher Welborn wrote: On 01/08/2014 11:56 PM, jeremiahvalerio...@gmail.com wrote: Hi, hows it going I've been self teaching myself python, and i typed up this small script now i know its not the best the coding is not the best but i

Re: the Gravity of Python 2

2014-01-09 Thread Chris Angelico
On Fri, Jan 10, 2014 at 7:54 AM, Roy Smith r...@panix.com wrote: On Thursday, January 9, 2014 3:35:05 PM UTC-5, Chris Angelico wrote: In fact, I've given end users the ability to enter strftime strings (eg to construct a filename), and it's worked just fine. I assume you realize that

Re: Editor for Python

2014-01-09 Thread David Robinow
On Thu, Jan 9, 2014 at 10:50 AM, Jean-Michel Pichavant jeanmic...@sequans.com wrote: - Original Message - On Jan 8, 2014, at 10:53 AM, Jean-Michel Pichavant jeanmic...@sequans.com wrote: I tried to negotiate this with my IT guys, but it looks like it's now mandatory, something

Monkeypatching a staticmethod?

2014-01-09 Thread Roy Smith
This is kind of surprising. I'm running Python 2.7.1. I've got a class with a staticmethod that I want to monkeypatch with a lambda: -- class Foo: @staticmethod def x(): return 1 Foo.x = lambda: 2 print Foo.x() --

Re: Re : Python GTK GUI struck when process is going on.

2014-01-09 Thread Michael Torrie
On 01/09/2014 08:15 AM, MRAB wrote: On 2014-01-09 11:53, Prapulla Kumar wrote: Hi all, I'm using python gtk to upload file to S3 service by boto API , GUI struck when uploading file and releases the GUI after completed download I'm using thread to show progress of upload in GUI but it struck.

Re: Monkeypatching a staticmethod?

2014-01-09 Thread Ian Kelly
On Thu, Jan 9, 2014 at 10:23 PM, Roy Smith r...@panix.com wrote: This is kind of surprising. I'm running Python 2.7.1. I've got a class with a staticmethod that I want to monkeypatch with a lambda: -- class Foo: @staticmethod def x():

Re: Time zones and why they change so damned often

2014-01-09 Thread Bob Martin
in 714232 20140109 120741 Alister alister.w...@ntlworld.com wrote: On Thu, 09 Jan 2014 07:17:25 +, Mark Lawrence wrote: On 09/01/2014 04:14, Chris Angelico wrote: On Thu, Jan 9, 2014 at 2:54 PM, Ben Finney ben+pyt...@benfinney.id.au wrote: I'm approaching it with the goal of knowing

[issue20203] ArgumentClinic: support middle optional argument

2014-01-09 Thread Ryan Smith-Roberts
New submission from Ryan Smith-Roberts: socket.sendto is apparently even weirder than addch or range: the optional argument is in the *middle*. Attempting this configuration gets me: Function sendto has an unsupported group configuration. (Unexpected state 5) An expected unexpected

[issue20173] Derby #4: Convert 53 sites to Argument Clinic across 5 files

2014-01-09 Thread Vajrasky Kok
Vajrasky Kok added the comment: Okay, this is my second attempt. I want to get METH_VARGS but I always get METH_O for positional parameters. Is there any way to circumvent this? The documentation does not cover this. -- Added file:

[issue20159] Derby #7: Convert 51 sites to Argument Clinic across 3 files - Derby: Convert the ElementTree module to use Argument Clinic

2014-01-09 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- assignee: - eli.bendersky dependencies: +Add docstrings for ElementTree module stage: needs patch - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20159

[issue20204] pydocs fails for some C implemented classes

2014-01-09 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: In 3.4 pydoc fails for the TkappType and TkttType names in the _tkinter module. $ ./python -m pydoc _tkinter.TkappType Traceback (most recent call last): File /home/serhiy/py/cpython/Lib/runpy.py, line 189, in _run_module_as_main __main__, mod_spec)

[issue20204] pydocs fails for some C implemented classes

2014-01-09 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +brett.cannon, eric.snow, ncoghlan priority: normal - high ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20204 ___

[issue20165] unittest TestResult wasSuccessful returns True when there are unexpected successes

2014-01-09 Thread Stefano Lattarini
Stefano Lattarini added the comment: Since I too was bitten by this issue, I'd like to support Gregory's request, and report my rationale for changing the current behaviour. With the current behaviour, we could see (and I *have* seen) scenarios like this: 1. A test exposing a known

[issue20078] zipfile - ZipExtFile.read goes into 100% CPU infinite loop on maliciously binary edited zips

2014-01-09 Thread Roundup Robot
Roundup Robot added the comment: New changeset 0cf1defd5ac4 by Serhiy Storchaka in branch '3.3': Issue #20078: Reading malformed zipfiles no longer hangs with 100% CPU http://hg.python.org/cpython/rev/0cf1defd5ac4 New changeset 79ea4ce431b1 by Serhiy Storchaka in branch 'default': Issue #20078:

[issue20205] inspect.getsource(), P302 loader and '..' filenames

2014-01-09 Thread Stefan Müller
New submission from Stefan Müller: Following situation * python 2.7.6 * module loaded via a PEP302 loader. * the loader has get_source(fullname) * assigns a dummy string as a file: module.__file__ == mymodule Then inspect.getsource(module) throws IOError: could not get source code I

[issue20206] email quoted-printable encoding issue

2014-01-09 Thread Andras Timar
New submission from Andras Timar: Try this sample script: # coding=utf-8 import email import email.charset import email.message c = email.charset.Charset('utf-8') c.body_encoding = email.charset.QP m = email.message.Message() m.set_payload(This is a Greek letter upsilon: υ, c)

[issue20206] email quoted-printable encoding issue

2014-01-09 Thread Milap Bhojak
Milap Bhojak added the comment: hope it will fix that issue -- nosy: +milap.py versions: +Python 2.7 -Python 3.3 Added file: http://bugs.python.org/file33376/email.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20206

[issue20190] dict() in dict(foo='bar').keys() raises

2014-01-09 Thread Martin Häcker
Martin Häcker added the comment: Sorry, I got the title wrong on the first try. (Already corrected). I think the problem is that the API of dict.keys() is surprising. One gets back something that behaves like a list, the name 'keys' suggests that it is a list and for lists there is no

[issue20178] Derby #9: Convert 52 sites to Argument Clinic across 11 files

2014-01-09 Thread Meador Inge
Meador Inge added the comment: I will pick this one up. -- assignee: - meador.inge nosy: +meador.inge ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20178 ___

[issue19346] Build fails when there are no shared extensions to be built

2014-01-09 Thread Alan Hourihane
Alan Hourihane added the comment: Anyone ? -- resolution: - remind ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19346 ___ ___ Python-bugs-list

[issue19036] setlocale fails due to locale.h being wrapped up in LANGINFO check.

2014-01-09 Thread Alan Hourihane
Changes by Alan Hourihane al...@fairlite.co.uk: -- resolution: - remind ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19036 ___ ___

[issue19348] Building _testcapimodule as a builtin results in compile error

2014-01-09 Thread Alan Hourihane
Alan Hourihane added the comment: Anyone ? -- resolution: - remind ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19348 ___ ___ Python-bugs-list

[issue20205] inspect.getsource(), P302 loader and '..' filenames

2014-01-09 Thread R. David Murray
Changes by R. David Murray rdmur...@bitdance.com: -- nosy: +r.david.murray ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20205 ___ ___

[issue20206] email quoted-printable encoding issue

2014-01-09 Thread R. David Murray
R. David Murray added the comment: This is a bug in quoprimime.body_encode. If you put a newline on the end of your string, it will work as expected. The patch in issue 5803 does not have the bug, so I'll probably just apply that to both 3.3 and 3.4. -- components: +email

[issue20189] inspect.Signature doesn't recognize all builtin types

2014-01-09 Thread Stefan Krah
Stefan Krah added the comment: Thanks, this is working here for the parameters. Is there a way to specify the return annotation manually in the docstring? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20189

[issue19036] setlocale fails due to locale.h being wrapped up in LANGINFO check.

2014-01-09 Thread Stefan Krah
Stefan Krah added the comment: The patch looks correct to me. locale.h is at least C99 (I don't have the earlier standards). -- nosy: +skrah ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19036

[issue20190] dict() in dict(foo='bar').keys() raises

2014-01-09 Thread STINNER Victor
STINNER Victor added the comment: dict.keys() has been changed 5 years ago, when Python 3 was created. dict.keys() is now a nice read-only view of dictionary keys. When the dictionary is updated, the view is also updated. See the documentation:

[issue18960] First line can be executed twice

2014-01-09 Thread Roundup Robot
Roundup Robot added the comment: New changeset 1bdcaf6c0eb5 by Serhiy Storchaka in branch '3.3': Issue #18960: Fix bugs with Python source code encoding in the second line. http://hg.python.org/cpython/rev/1bdcaf6c0eb5 New changeset 04c05e408cbd by Serhiy Storchaka in branch 'default': Issue

[issue20207] Disable SSLv2 in Python 2.x

2014-01-09 Thread Alex Gaynor
New submission from Alex Gaynor: SSLv2 has numerous security issues, and thus is in limited use on the web. Continuing to allow SSLv2 handshakes only serves to limit security. -- components: Library (Lib) messages: 207748 nosy: alex priority: normal severity: normal status: open title:

[issue20207] Disable SSLv2 in Python 2.x

2014-01-09 Thread Donald Stufft
Donald Stufft added the comment: +1 -- nosy: +dstufft ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20207 ___ ___ Python-bugs-list mailing list

[issue20207] Disable SSLv2 in Python 2.x

2014-01-09 Thread Christian Heimes
Changes by Christian Heimes li...@cheimes.de: -- nosy: +christian.heimes ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20207 ___ ___

[issue20207] Disable SSLv2 in Python 2.x

2014-01-09 Thread Antoine Pitrou
Antoine Pitrou added the comment: Here is a patch. Can someone try it with a non-patched OpenSSL? (e.g. OS X) -- keywords: +patch Added file: http://bugs.python.org/file33377/no_sslv2.patch ___ Python tracker rep...@bugs.python.org

[issue20207] Disable SSLv2 in Python 2.x

2014-01-09 Thread Antoine Pitrou
Antoine Pitrou added the comment: Note that this probably would have to be applied to 3.x too, for consistency. -- versions: +Python 3.3, Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20207

[issue20207] Disable SSLv2 in Python 2.x

2014-01-09 Thread Alex Gaynor
Alex Gaynor added the comment: Yes, OP_NO_SSLv2 should be used by default. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20207 ___ ___

[issue20207] Disable SSLv2 in Python 2.x

2014-01-09 Thread Antoine Pitrou
Antoine Pitrou added the comment: (by trying, I mean at least ./python -m test.regrtest -unetwork -v test_ssl) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20207 ___

[issue20207] Disable SSLv2 in Python 2.x

2014-01-09 Thread Alex Gaynor
Alex Gaynor added the comment: I can confirm the tests pass on OS X and it's possible to open a connection to howsmyssl.com -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20207 ___

[issue20208] Clarify some things in porting HOWTO

2014-01-09 Thread Brett Cannon
New submission from Brett Cannon: Reported on my G+ share of the latest reworking: The only part I found confusing is when you first introduce from _future_ import unicode_literals --- it looks like you forgot to explain what it does. It turns out that you explain it somewhat two paragraphs

[issue18960] First line can be executed twice

2014-01-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Now traceback test is failed. http://buildbot.python.org/all/builders/AMD64%20Ubuntu%20LTS%203.3/builds/1358/steps/test/logs/stdio == FAIL: test_encoded_file

[issue20175] Derby #6: Convert 50 sites to Argument Clinic across 8 files

2014-01-09 Thread Brian Morrow
Changes by Brian Morrow bmorro...@gmail.com: -- nosy: +bmorrow92 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20175 ___ ___ Python-bugs-list

[issue20208] Clarify some things in porting HOWTO

2014-01-09 Thread Dmitry Shachnev
Changes by Dmitry Shachnev mity...@gmail.com: -- nosy: +mitya57 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20208 ___ ___ Python-bugs-list

[issue20189] inspect.Signature doesn't recognize all builtin types

2014-01-09 Thread Larry Hastings
Larry Hastings added the comment: Yes, it's just Python syntax, so you'd use -. However, you are not permitted to according to PEP 8: The Python standard library will not use function annotations as that would result in a premature commitment to a particular annotation style. --

[issue20207] Disable SSLv2 in Python 2.x

2014-01-09 Thread Alex Gaynor
Alex Gaynor added the comment: I'm not sure this is needed on Python 3, it already has: http://hg.python.org/cpython/file/default/Lib/ssl.py#l388 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20207

[issue20207] Disable SSLv2 in Python 2.x

2014-01-09 Thread Antoine Pitrou
Antoine Pitrou added the comment: I'm not sure this is needed on Python 3, it already has: http://hg.python.org/cpython/file/default/Lib/ssl.py#l388 It doesn't get executed when you create a SSLContext directly, though. -- ___ Python tracker

[issue20209] Deprecate PROTOCOL_SSLv2

2014-01-09 Thread Antoine Pitrou
New submission from Antoine Pitrou: It sounds like we may deprecate PROTOCOL_SSLv2 in 3.5. -- components: Library (Lib) messages: 207762 nosy: christian.heimes, giampaolo.rodola, janssen, pitrou priority: low severity: normal status: open title: Deprecate PROTOCOL_SSLv2 type: behavior

[issue20207] Disable SSLv2 in Python 2.x

2014-01-09 Thread Hynek Schlawack
Hynek Schlawack added the comment: I’m +1 too since supporting it serves no other purpose then enabling downgrade attacks. Shipping a client with SSL 2 on is nothing short a security bug. -- nosy: +hynek ___ Python tracker rep...@bugs.python.org

[issue20207] Disable SSLv2 in Python 2.x

2014-01-09 Thread Antoine Pitrou
Antoine Pitrou added the comment: Please qualify the request a bit: do you mean something should be done in the ssl module? One solution is to add OP_NO_SSLv2 when the user asks for a PROTOCOL_SSLv23 socket. Is it what you mean? -- nosy: +pitrou type: - behavior

  1   2   3   >