[issue22412] Towards an asyncio-enabled command line

2014-09-16 Thread Martin Teichmann
Martin Teichmann added the comment: well, I beg to differ. Again, to your points: to a) You claim that my flag would have to be supported by every python platform. Well, the very same built-in function has another flag, PyCF_ONLY_AST, whose precise meaning, according to the docs, might change

[issue22422] IDLE closes all when in dropdown menu

2014-09-16 Thread Brunel
New submission from Brunel: While python shell is running if the user puts a period after a statement and waits for the dropdown list to pop up, then closes python shell the following will happen: IDLE will close all active windows immediately, regardless of any unsaved progress (which is

[issue22379] Empty exception message of str.join

2014-09-16 Thread Yongzhi Pan
Yongzhi Pan added the comment: I tested it and find str of an exception does not contain the exception type: a = TypeError() str(a) '' a = TypeError('b', 3) a.args ('b', 3) str(a) ('b', 3) Am I missing some other circumstances? -- ___ Python

[issue22423] Errors in printing exceptions raised in a thread

2014-09-16 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: Proposed patch fixes some bugs in printing exceptions in the threading module. 1. Fixed names of private variables in initialization. This caused unhandled AttributeError. The regression was introduced in changeset e71c3223810f. This part of the patch

[issue14285] Traceback wrong on ImportError while executing a package

2014-09-16 Thread Rob Agar
Changes by Rob Agar r...@engineeredarts.co.uk: -- nosy: +robagar ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14285 ___ ___ Python-bugs-list

[issue14285] Traceback wrong on ImportError while executing a package

2014-09-16 Thread Rob Agar
Rob Agar added the comment: The message also needs to include the file and line number of the ImportError. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14285 ___

[issue17120] Mishandled _POSIX_C_SOURCE and _XOPEN_SOURCE in pyconfig.h

2014-09-16 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +loewis ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17120 ___ ___ Python-bugs-list mailing

[issue22231] httplib: unicode url will cause an ascii codec error when combined with a utf-8 string header

2014-09-16 Thread Bob Chen
Bob Chen added the comment: up... -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22231 ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue22421] securing pydoc server

2014-09-16 Thread Senthil Kumaran
Senthil Kumaran added the comment: The localhost breaking on your linux system might be due to improper /etc/hosts or is localhost pointing to an ipv6 address? That said, I think it is okay to rely on 127.0.0.1 as host for running pydoc server. I am unsure why the initial check was done only

[issue22407] re.LOCALE is nonsensical for Unicode

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

[issue22407] re.LOCALE is nonsensical for Unicode

2014-09-16 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@gmail.com: -- components: +Unicode ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22407 ___ ___

[issue22400] Stable API broken on Windows for PyUnicode_*

2014-09-16 Thread STINNER Victor
STINNER Victor added the comment: I think this issue was already fixed by this change: changeset: 88287:ea0aa3e32ab5 branch: 3.3 parent: 88263:203ca77ea819 user:Martin v. Löwis mar...@v.loewis.de date:Sat Jan 04 10:01:42 2014 +0100 files: Misc/NEWS

[issue22407] re.LOCALE is nonsensical for Unicode

2014-09-16 Thread Antoine Pitrou
Antoine Pitrou added the comment: I don't think we should fix this in 2.x: some people may rely on the old behaviour, and it will be difficult for them to debug. In 3.x, I simply propose we deprecate re.LOCALE for unicode strings and make it a no-op. --

[issue22421] securing pydoc server

2014-09-16 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- stage: - patch review versions: +Python 2.7, Python 3.4, Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22421 ___

[issue21270] unittest.mock.call object has inherited count method

2014-09-16 Thread Kushal Das
Kushal Das added the comment: Uploading the second version of the patch. -- Added file: http://bugs.python.org/file36630/issue21270_v2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21270

[issue21270] unittest.mock.call object has inherited count method

2014-09-16 Thread Roundup Robot
Roundup Robot added the comment: New changeset 5660c1bdc2b6 by Kushal Das in branch 'default': Closes #21270 : We now override tuple methods in mock.call objects. https://hg.python.org/cpython/rev/5660c1bdc2b6 -- nosy: +python-dev resolution: - fixed stage: needs patch - resolved

[issue22424] make: *** [Objects/unicodeobject.o] Error 1

2014-09-16 Thread bono wang
New submission from bono wang: when i was upgrade from py 2.6 to py 3.3 the error is show up # make make install gcc -pthread -c -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes-I. -I./Include-DPy_BUILD_CORE -o Modules/python.o ./Modules/python.c gcc -pthread -c -DNDEBUG -g

[issue22424] make: *** [Objects/unicodeobject.o] Error 1

2014-09-16 Thread STINNER Victor
STINNER Victor added the comment: i really dont know how to fix it It's a GCC bug, not a Python bug: gcc: Internal error: What is your OS? What is your GCC version? How much memory do you have? Do you get the same error if you run make again? Try to run gcc -pthread -c -DNDEBUG -g

[issue22421] securing pydoc server

2014-09-16 Thread Senthil Kumaran
Senthil Kumaran added the comment: sys.platform is darwin since OS X 10.5. I am not sure when it's value was 'mac', So effectively the host was localhost on mac systems. Directly setting the host value to localhost on all platforms may be right thing to do. Here is a patch with tests.

[issue22418] ipaddress.py new IPv6 Method for Solicited Multicast Address

2014-09-16 Thread Eric V. Smith
Eric V. Smith added the comment: Changing to 3.5 only, as this is an API addition so it can only be added there. I think that raising an exception instead of retuning None for a multicast address would be a better API. Any chance you can write some tests? Thanks! -- nosy:

[issue22400] Stable API broken on Windows for PyUnicode_*

2014-09-16 Thread Jeremy Kloth
Jeremy Kloth added the comment: Ah, yes indeeed. Sorry for the noise as it was that my local repos were having some syncing issues so I had out of date sources. Marking as closed (fixed) and duplicate of issue17432. -- resolution: - duplicate status: open - closed

[issue22400] Stable API broken on Windows for PyUnicode_*

2014-09-16 Thread R. David Murray
Changes by R. David Murray rdmur...@bitdance.com: -- stage: - resolved ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22400 ___ ___

[issue22424] make: *** [Objects/unicodeobject.o] Error 1

2014-09-16 Thread bono wang
bono wang added the comment: Usually, you can workaround GCC bugs by disabling optimizations. You can try to modify Makefile to replace -O3 with -O2 or even -O0 (disable all optimizations), and then try to run make again. donethanks a lot -- nosy: +165559672 resolution: -

[issue21472] Fix wsgiref handling of absolute HTTP Request-URI

2014-09-16 Thread mouad
mouad added the comment: Hi Guido, If I understand this correctly, the HOST header was added only in HTTP1.1 and setting the absolute URI was the right behavior client should follow if they are behind a proxy for HTTP1.0, but the same behavior was kept in HTTP1.1 for backward compatibility.

[issue22424] make: *** [Objects/unicodeobject.o] Error 1

2014-09-16 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@gmail.com: -- nosy: -165559672 resolution: fixed - not a bug status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22424 ___

[issue22407] re.LOCALE is nonsensical for Unicode

2014-09-16 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Yes, one of solution is to deprecate re.LOCALE for unicode strings and then make it incompatible with unicode strings. But I think it would be good to implement locale-aware matching. Example. for a in 'Ii\u0130\u0131': ... for b in 'Ii\u0130\u0131':

[issue22407] re.LOCALE is nonsensical for Unicode

2014-09-16 Thread Antoine Pitrou
Antoine Pitrou added the comment: Ha, I always forget about the Turkish locale case... -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22407 ___

[issue22412] Towards an asyncio-enabled command line

2014-09-16 Thread Guido van Rossum
Guido van Rossum added the comment: There's a sage piece of advice somewhere in the developer docs. Know when to give up. I think you need to write a PEP trying to argue that supporting yield from in the REPL is essential to a large category of users, so you can lobby for support. In the

[issue22379] Empty exception message of str.join

2014-09-16 Thread R. David Murray
R. David Murray added the comment: No, you are right and I am wrong. I should have checked myself :) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22379 ___

[issue22412] Towards an asyncio-enabled command line

2014-09-16 Thread Martin Teichmann
Martin Teichmann added the comment: Well, so I am giving up, apparenty my work is not wanted here. But not before submitting at least the last version of my patch. I seperated out my _input function into two, start_input and continue_input, which are supposed to work in a loop as in

[issue22412] Towards an asyncio-enabled command line

2014-09-16 Thread Martin Teichmann
Martin Teichmann added the comment: And as a last comment, just for completeness, a complete async console. With it you can do cool things like from asyncio import sleep, async def f(): ...yield from sleep(3) ...print(done) yield from f() [after 3 seconds] done async(f()) [wait

[issue22425] 2to3 import fixer writes dotted_as_names into import_as_names

2014-09-16 Thread Simon Weber
New submission from Simon Weber: When dealing with implicit relative imports of the form import dotted_as_names as..., the 2to3 import fixer will rewrite them as from . import dotted_as_names as This is invalid syntax. Here's an example: $ tree package/ package/ ├── __init__.py ├──

[issue22426] strptime accepts the wrong '2010-06-01 MSK' string but rejects the right '2010-06-01 MSD'

2014-09-16 Thread Akira Li
New submission from Akira Li: import os import time os.environ['TZ'] = 'Europe/Moscow' time.tzset() time.strptime('2010-06-01 MSK', '%Y-%m-%d %Z') time.struct_time(tm_year=2010, tm_mon=6, tm_mday=1, tm_hour=0, tm_min=0, tm_sec=0, tm_wday=1, tm_yday=152, tm_isdst=0)

[issue22426] strptime accepts the wrong '2010-06-01 MSK' string but rejects the right '2010-06-01 MSD'

2014-09-16 Thread Akira Li
Akira Li added the comment: Correction: The correct offset is +0400: dt = datetime(2010, 5, 31, 20, tzinfo=timezone.utc).astimezone() And _timezones dict is defined in Lib/email/_parseaddr.py -- ___ Python tracker rep...@bugs.python.org

[issue22412] Towards an asyncio-enabled command line

2014-09-16 Thread Guido van Rossum
Guido van Rossum added the comment: I'm sorry you feel that way. I hope one day you will understand the other side of this kind of issue. -- resolution: - rejected status: open - closed ___ Python tracker rep...@bugs.python.org

[issue22425] 2to3 import fixer writes dotted_as_names into import_as_names

2014-09-16 Thread Ned Deily
Changes by Ned Deily n...@acm.org: -- nosy: +benjamin.peterson ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22425 ___ ___ Python-bugs-list

[issue22426] strptime accepts the wrong '2010-06-01 MSK' string but rejects the right '2010-06-01 MSD'

2014-09-16 Thread Ned Deily
Changes by Ned Deily n...@acm.org: -- nosy: +belopolsky, lemburg ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22426 ___ ___ Python-bugs-list

[issue22426] strptime accepts the wrong '2010-06-01 MSK' string but rejects the right '2010-06-01 MSD'

2014-09-16 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: There is no daylight savings time in Moscow and python detects this correctly: $ TZ=Europe/Moscow python3 import time time.daylight 0 Note that historically, there was DST, but time module cannot handle historical TZ changes. (Russian government

[issue22426] strptime accepts the wrong '2010-06-01 MSK' string but rejects the right '2010-06-01 MSD'

2014-09-16 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: I don't think there is anything we can do here. Without a TZ database, Python has to rely on time.tzname which in case of TZ=Europe/Moscow returns time.tzname ('MSK', 'MSK') Hardcoding a timezones dictionary as done in email module may work for a

[issue22377] %Z in strptime doesn't match EST and others

2014-09-16 Thread Berker Peksag
Berker Peksag added the comment: if PEP 431 is implemented (or anything that gives access to zoneinfo) then strptime could extend the list of timezones it accepts (utc + local timezone names) to include names from the tz database: FTR, I have a WIP(and probably a bit outdated) branch to

[issue22426] strptime accepts the wrong '2010-06-01 MSK' string but rejects the right '2010-06-01 MSD'

2014-09-16 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On the second thought, we can probably make the same guesswork as in PyInit_timezone (see Modules/timemodule.c) in time.strptime, but not for the current time, but for the time parsed. -- ___ Python tracker

[issue22426] strptime accepts the wrong '2010-06-01 MSK' string but rejects the right '2010-06-01 MSD'

2014-09-16 Thread Alexander Belopolsky
Changes by Alexander Belopolsky alexander.belopol...@gmail.com: -- assignee: - belopolsky ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22426 ___

[issue22426] strptime accepts the wrong '2010-06-01 MSK' string but rejects the right '2010-06-01 MSD'

2014-09-16 Thread Alexander Belopolsky
Changes by Alexander Belopolsky alexander.belopol...@gmail.com: -- stage: - needs patch type: behavior - enhancement versions: -Python 2.7, Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22426

[issue22339] Incorrect behavior when subclassing enum.Enum

2014-09-16 Thread Ethan Furman
Ethan Furman added the comment: http://hg.python.org/cpython/rev/4135f3929b35 http://hg.python.org/cpython/rev/cdd412347827 -- resolution: - fixed stage: patch review - resolved status: open - closed ___ Python tracker rep...@bugs.python.org

[issue21738] Enum docs claim replacing __new__ is not possible

2014-09-16 Thread Roundup Robot
Roundup Robot added the comment: New changeset 28c21f09719e by Ethan Furman in branch '3.4': Issue21738: clarify usage of __new__ in Enum subclasses https://hg.python.org/cpython/rev/28c21f09719e New changeset 91ec34801232 by Ethan Furman in branch 'default': Issue21738: clarify usage of

[issue21738] Enum docs claim replacing __new__ is not possible

2014-09-16 Thread Ethan Furman
Changes by Ethan Furman et...@stoneleaf.us: -- assignee: ethan.furman - docs@python nosy: +docs@python resolution: - fixed stage: - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21738

[issue21706] Add base for enumerations (Functional API)

2014-09-16 Thread Roundup Robot
Roundup Robot added the comment: New changeset ec016ba862ba by Ethan Furman in branch 'default': Close issue21706: add 'start' parameter to functional API https://hg.python.org/cpython/rev/ec016ba862ba -- nosy: +python-dev resolution: - fixed stage: - resolved status: open - closed

[issue22377] %Z in strptime doesn't match EST and others

2014-09-16 Thread Akira Li
Akira Li added the comment: If the current implementation is considered correct (%Z not recognizing EST) then indeed extending the list of recognized timezones is another issue. And the docs should be changed to match the implementation. The current behavior is broken, see also issue22426 If

[issue22426] strptime accepts the wrong '2010-06-01 MSK' string but rejects the right '2010-06-01 MSD'

2014-09-16 Thread Akira Li
Akira Li added the comment: My patch for issue22377 also fixes this bug. With the patch applied. Both MSK and MSD are accepted if the new timezones parameter is false (default for Python 3.5, will be changed to True in Python 3.6 If timezones is True then MSD return a correct aware datetime

[issue22426] strptime accepts the wrong '2010-06-01 MSK' string but rejects the right '2010-06-01 MSD'

2014-09-16 Thread Akira Li
Akira Li added the comment: MSD variant works on my machine because C library uses the historical timezone database there. I'm not sure whether it works on old Windows versions. -- ___ Python tracker rep...@bugs.python.org

[issue22427] TemporaryDirectory attempts to clean up twice

2014-09-16 Thread Jack O'Connor
New submission from Jack O'Connor: The following little script prints (but ignores) a FileNotFoundError. import tempfile def generator(): with tempfile.TemporaryDirectory(): yield g = generator() next(g) Exception ignored in: generator object generator at 0x7fb319fe2c60 Traceback

[issue22421] securing pydoc server

2014-09-16 Thread Roundup Robot
Roundup Robot added the comment: New changeset c438f6aaafa9 by Senthil Kumaran in branch '3.3': Issue #22421 - Secure pydoc server run. Bind it to localhost instead of all interfaces. https://hg.python.org/cpython/rev/c438f6aaafa9 New changeset d36c0f2ab821 by Senthil Kumaran in branch '3.4':

[issue22421] securing pydoc server

2014-09-16 Thread Senthil Kumaran
Senthil Kumaran added the comment: 2.7 was not affected and it was binding to localhost properly. Since it is security related issue, I have fixed it in 3.3 as well. Fix is now present in 3.4 and 3.5 -- resolution: - fixed stage: patch review - resolved status: open - closed versions: