[issue20939] test_geturl of test_urllibnet fails with 'https://www.python.org/' != 'http://www.python.org/'

2014-03-27 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 426a7046cdb0 by Ned Deily in branch '2.7':
Issue #20939: Use www.example.com instead of www.python.org to avoid test
http://hg.python.org/cpython/rev/426a7046cdb0

New changeset 31e42208eb99 by Ned Deily in branch '3.4':
Issue #20939: Backout test_urllib2.test_issue16464 disables:
http://hg.python.org/cpython/rev/31e42208eb99

New changeset 6134684ba222 by Ned Deily in branch '3.4':
Issue #20939: Use www.example.com instead of www.python.org to avoid test
http://hg.python.org/cpython/rev/6134684ba222

New changeset 67dcb2d19dc4 by Ned Deily in branch 'default':
Issue #20939: merge from 3.4
http://hg.python.org/cpython/rev/67dcb2d19dc4

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20939
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20939] test_geturl of test_urllibnet fails with 'https://www.python.org/' != 'http://www.python.org/'

2014-03-27 Thread Roundup Robot

Roundup Robot added the comment:

New changeset b533cc11d114 by Ned Deily in branch '3.4':
Issue #20939: remove stray character from comment
http://hg.python.org/cpython/rev/b533cc11d114

New changeset ff27cb871b16 by Ned Deily in branch 'default':
Issue #20939: merge from 3.4
http://hg.python.org/cpython/rev/ff27cb871b16

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20939
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21069] urllib unit tests failing without ssl module

2014-03-27 Thread Ned Deily

Changes by Ned Deily n...@acm.org:


--
assignee:  - ned.deily
nosy: +ned.deily
stage:  - needs patch
versions: +Python 3.5

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21069
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16047] Tools/freeze no longer works in Python 3

2014-03-27 Thread Christian Bachmaier

Christian Bachmaier added the comment:

Sorry guys, library loading of a freezed binary is different to interpreter 
mode. This is a bug in freeze, or at least an undocumented missing feature of 
freeze. This is no side discussion.

And, in Python 3.2 this was working! As described above, just creating a subdir 
psycopg2 in the working direktory of the frozen binary containing a link 
_psycopg.so to the library. This is a fact. I have two working production 
systems using this mechanism under Ubuntu 12.04 LTS.

Ok, psycopg2 seems to load the so file indirectly over __init__.py, however, 
the interpreter and older versions of freeze support that. The psycopg2 guys do 
not see any problem in that, see the closed entry linked above in their bug 
database.

A workaround/hack I am using successfully now is to replace any 'import 
psycopg2._psycopg' by 'import _psycopg' in all 
/usr/lib/python3/dist-packages/psycopg2/*.py files and to set 
PYTHONPATH=//usr/lib/python3/dist-packages/psycopg2 prior execution of the 
frozen binary. I found this only by playing around several days, there is NO 
documentation about that. The advices statically linking etc. given here are 
too superficial. Any more helful/concrete advices (outside of this thread) seem 
to cost money.

I wanted and still want help to fix this by giving detailed reports.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16047
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16047] Tools/freeze no longer works in Python 3

2014-03-27 Thread Martin v . Löwis

Martin v. Löwis added the comment:

Christian: Please understand that it was not helpful to post into this issue. 
The issue discussed here is separate from the issue you are having. We prefer a 
strict one issue at a time policy in this tracker.

So when this issue gets closed because Marc-Andre's original problem is solved, 
feel free to report your issue again.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16047
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21074] Too aggressive constant folding

2014-03-27 Thread STINNER Victor

STINNER Victor added the comment:

Hi, I have a project called astoptimizer which does the same job than the 
CPython peephole optimizer, but it is implemented in Python.

To avoid this issue (create an huge object and then discard it because it is 
too large), I have a check_binop_cst function which checks if the result will 
fit into the configuration constraints:

https://bitbucket.org/haypo/astoptimizer/src/024c05ae410458813c20fafe8fe5b8d3cf980f52/astoptimizer/optimizer.py?at=default#cl-598

Check for a * b :
-
if isinstance(op, ast.Mult):
if isinstance(right, INT_TYPES):
# str * int
if isinstance(left, STR_TYPES):
return (len(left) * right = self.config.max_string_length)
# tuple * int
if isinstance(left, tuple):
return (len(left) * right = self.config.max_tuple_length)

if isinstance(left, INT_TYPES):
# int * str
if isinstance(right, STR_TYPES):
return (left * len(right) = self.config.max_string_length)
# int * tuple
if isinstance(right, tuple):
return (left * len(right) = self.config.max_tuple_length)
-

Constraints in the config:

https://bitbucket.org/haypo/astoptimizer/src/024c05ae410458813c20fafe8fe5b8d3cf980f52/astoptimizer/config.py?at=default#cl-187

Astoptimizer supports the following constant types: int, float, complex, 
bytes, str, tuple, name constant (True, False, None). The frozenset type is 
also supported if the builtins are declared as cosntant too.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21074
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21069] urllib unit tests failing without ssl module

2014-03-27 Thread Roundup Robot

Roundup Robot added the comment:

New changeset adf1e04478b4 by Ned Deily in branch '3.4':
Issue #21069: Temporarily use www.google.com while investigating
http://hg.python.org/cpython/rev/adf1e04478b4

New changeset 8d4cace71113 by Ned Deily in branch 'default':
Issue 21069: merge from 3.4
http://hg.python.org/cpython/rev/8d4cace71113

--
nosy: +python-dev

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21069
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20344] subprocess.check_output() docs misrepresent what shell=True does

2014-03-27 Thread Tobias Klausmann

Tobias Klausmann added the comment:

Hi! 

On Tue, 25 Mar 2014, Tuomas Savolainen wrote:
 Created a patch that adds notice of using shell=True and iterable to the 
 documentation. Please do comment if the formatting is wrong (this my first 
 documentation patch).

I'd use articles, i.e. and a list and does not raise an error 

Also, s/except/expect/

Regards,
Tobias

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20344
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16047] Tools/freeze no longer works in Python 3

2014-03-27 Thread Marc-Andre Lemburg

Marc-Andre Lemburg added the comment:

Christian, please open a separate ticket for your problem.

This ticket is about getting freeze, the tool itself, working,
not any other issue you may find with the resulting frozen binary.

Thanks,
-- 
Marc-Andre Lemburg
eGenix.com

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16047
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21069] test_fileno of test_urllibnet intermittently fails when using www.example.com

2014-03-27 Thread Ned Deily

Ned Deily added the comment:

After pushing the changes for Issue20939, many of the buildbots started 
experiencing the test_fileno failure using www.example.com.  The interesting 
thing is that not all of them do, including my primary development system (OS X 
10.9) which is why I didn't see a problem during the initial testing.  On 
another dev system (Debian Linux on a VM), the test fails intermittently. So, 
yes, something funky *is* going on.  One obvious difference is that the read 
from www.python.org returns 44000+ byes while www.example.com returns only 162 
bytes.  There could be a race condition with the TCP connection close.  I've 
temporarily changed the test to use www.google.com pending resolution. Thanks 
for the report and investigation, Daniel.

--
priority: normal - high
stage: needs patch - test needed
title: urllib unit tests failing without ssl module - test_fileno of 
test_urllibnet intermittently fails when using www.example.com

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21069
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20939] test_geturl of test_urllibnet fails with 'https://www.python.org/' != 'http://www.python.org/'

2014-03-27 Thread Ned Deily

Ned Deily added the comment:

I've pushed the changes to 2.7, 3.4, and default.  That has exposed a new 
intermittent failure of test_fileno in test.test_urllibnet (see Issue21069).  
I'll leave this issue open until that is resolved.  And I'll leave it up to the 
respective release managers to decide whether they want to backport to their 
security-fix-only branches.

--
stage: patch review - commit review

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20939
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21069] test_fileno of test_urllibnet intermittently fails when using www.example.com

2014-03-27 Thread Ned Deily

Ned Deily added the comment:

After looking at why the 2.7 version of the test does not fail, the problem 
became apparent.  In 2.7, test_errno tests urlopen() of the original deprecated 
urllib module.  In 3.x, the test was ported over but now uses urlopen() of 
urllib.request which is based on urllib2() of 2.x.

2.7:
 x = urllib.urlopen(http://www.example.com;)
[79234 refs]
 x
addinfourl at 3068742324L whose fp = socket._fileobject object at 0xb6e7eea4
[79234 refs]
 os.fdopen(x.fileno()).read()
'!doctype html\nhtml\nhead\ntitleExample Domain/title\n\n
meta charset=utf-8 /\nmeta http-equiv=Content-type 
content=text/html; charset=utf-8 /\nmeta name=viewport 
content=width=device-width, initial-scale=1 /\nstyle type=text/css\n 
   body {\nbackground-color: #f0f0f2;\nmargin: 0;\n
padding: 0;\nfont-family: Open Sans, Helvetica Neue, Helvetica, 
Arial, sans-serif;\n\n}\ndiv {\nwidth: 600px;\n
margin: 5em auto;\npadding: 50px;\nbackground-color: #fff;\n
border-radius: 1em;\n}\na:link, a:visited {\ncolor: 
#38488f;\ntext-decoration: none;\n}\n@media (max-width: 700px) 
{\nbody {\nbackground-color: #fff;\n}\ndiv 
{\nwidth: auto;\nmargin: 0 auto;\n
border-radius: 0;\npadding: 1em;\n}\n}\n/style
\n/head\n\nbody\ndiv
 \nh1Example Domain/h1\npThis domain is established to be used 
for illustrative examples in documents. You may use this\ndomain in 
examples without prior coordination or asking for permission./p\npa 
href=http://www.iana.org/domains/example;More 
information.../a/p\n/div\n/body\n/html\n'
[79234 refs]

3.4 (when the read doesn't fail):
 x = urllib.request.urlopen(http://www.example.com;)
 x
http.client.HTTPResponse object at 0xb6bc7114
 os.fdopen(x.fileno()).read()
__main__:1: ResourceWarning: unclosed file _io.TextIOWrapper name=4 mode='r' 
encoding='UTF-8'
' without prior coordination or asking for permission./p\npa 
href=http://www.iana.org/domains/example;More 
information.../a/p\n/div\n/body\n/html\n'

In the 3.x case (and the 2.7 urllib2 case), the read from the file descriptor 
starts at mid-response or at the end (returning an empty byte string).  In the 
past, the test passed because of the amount of data returned by the previous 
test URL.  Now, with the short response from www.example.com, it's clear that 
the file descriptor read is not returning the whole response.  I don't know 
whether the file descriptor read is expected to be meaningful for 
urllib2/urllib.request.

Senthil, what do you think?

--
nosy: +orsenthil

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21069
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21069] test_fileno of test_urllibnet intermittently fails when using www.example.com

2014-03-27 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/issue21069
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4963] mimetypes.guess_extension result changes after mimetypes.init()

2014-03-27 Thread Wichert Akkerman

Wichert Akkerman added the comment:

I can reproduce this on Both OSX 10.9 and Ubuntu 12.04:

 import mimetypes
 mimetypes.guess_extension('image/jpeg')
'.jpe'
 mimetypes.init()
 mimetypes.guess_extension('image/jpeg')
'.jpeg'

The same thing happens for Python 3.4:

Python 3.4.0rc3 (default, Mar 13 2014, 10:48:59) 
[GCC 4.2.1 Compatible Apple LLVM 5.1 (clang-503.0.38)] on darwin
Type help, copyright, credits or license for more information.
 import mimetypes
 mimetypes.guess_all_extensions('image/jpeg')
['.jpg', '.jpeg', '.jpe']
 mimetypes.init()
 mimetypes.guess_all_extensions('image/jpeg')
['.jpeg', '.jpe', '.jpg']

This also looks related to Issue1043134

--
nosy: +wichert

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4963
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20344] subprocess.check_output() docs misrepresent what shell=True does

2014-03-27 Thread R. David Murray

R. David Murray added the comment:

Also, the see below sentence is missing.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20344
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1043134] Add preferred extensions for MIME types

2014-03-27 Thread Wichert Akkerman

Wichert Akkerman added the comment:

Here is a related question on SO: 
http://stackoverflow.com/questions/352837/how-to-add-file-extensions-based-on-file-type-on-linux-unix

--
nosy: +wichert

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1043134
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20344] subprocess.check_output() docs misrepresent what shell=True does

2014-03-27 Thread Tuomas Savolainen

Tuomas Savolainen added the comment:

Corrected the spelling of the patch.

--
Added file: http://bugs.python.org/file34635/20344_3.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20344
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21075] fileinput should use stdin.buffer for rb mode

2014-03-27 Thread Brandon Rhodes

New submission from Brandon Rhodes:

In Python 3, fileinput.input() returns str lines whether the data is
coming from stdin or from a list of files on the command line. But if
input(mode='rb') is specified, then its behavior becomes inconsistent:
lines from stdin are delivered as already-decoded strings, but data
from files is delivered (correctly) as bytes.

The solution may be that, if a b is anywhere in the mode, then input()
should read from the bytes stdin.buffer data source instead of from
stdin.

Otherwise the rb mode is rather useless since you can wind
up getting text from it anyway depending on how you are invoked.

--
components: Library (Lib)
messages: 214952
nosy: brandon-rhodes
priority: normal
severity: normal
status: open
title: fileinput should use stdin.buffer for rb mode
type: behavior
versions: Python 3.4

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21075
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21074] Too aggressive constant folding

2014-03-27 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Not only is a lot of memory allocated but it also eats quite a bit of CPU time.

--
nosy: +pitrou
stage:  - needs patch
versions: +Python 3.5

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21074
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17621] Create a lazy import loader mixin

2014-03-27 Thread Brett Cannon

Brett Cannon added the comment:

So as-is, this won't help with startup as we already make sure that no 
unnecessary modules are loaded during startup. But one way we do that is 
through local imports in key modules, e.g. os.get_exec_path(). So what we could 
consider is instead of doing a local import we use lazy imports. We could 
introduce importlib._lazy_import() which could be (roughly):

  def _lazy_import(fullname):
try:
  return sys.modules[fullname]
except KeyError:
  spec = find_spec(fullname)
  loader = LazyLoader(spec.loader)
  # Make module with proper locking and get it inserted into sys.modules.
  loader.exec_module(module)
  return module

I don't know if that simplifies things, though, compared to a local import. It 
might help once a module is identified as on the critical path of startup since 
all global imports in that module could be lazy, but we would still need to 
identify those critical modules.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17621
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20739] PEP 463 (except expression) implementation

2014-03-27 Thread Yury Selivanov

Changes by Yury Selivanov yselivanov...@gmail.com:


--
nosy:  -yselivanov

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20739
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20726] inspect: Make Signature instances picklable

2014-03-27 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 0a8e3c910c0a by Yury Selivanov in branch 'default':
inspect.signature: Make Signature and Parameter picklable. Closes #20726
http://hg.python.org/cpython/rev/0a8e3c910c0a

--
nosy: +python-dev
resolution:  - fixed
stage:  - committed/rejected
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20726
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19573] Fix the docstring of inspect.Parameter and the implementation of _ParameterKind

2014-03-27 Thread Roundup Robot

Roundup Robot added the comment:

New changeset c2b94f891c88 by Yury Selivanov in branch 'default':
inspect.signature: Use enum for parameter kind constants. Closes #19573
http://hg.python.org/cpython/rev/c2b94f891c88

--
nosy: +python-dev
resolution:  - fixed
stage: patch review - committed/rejected
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19573
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20726] inspect: Make Signature instances picklable

2014-03-27 Thread STINNER Victor

STINNER Victor added the comment:

Why not backporting this change to Python 3.4? Would it break something?

--
nosy: +haypo

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20726
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20726] inspect: Make Signature instances picklable

2014-03-27 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Picklability is more of a new feature than a bugfix.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20726
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21076] Turn signal.SIG* constants into enums

2014-03-27 Thread Giampaolo Rodola'

New submission from Giampaolo Rodola':

Relevant discussion + BDFL approval:
https://mail.python.org/pipermail/python-ideas/2014-March/027286.html
Patch (not tested on Windows) is in attachment.

--
components: Library (Lib)
files: signals.patch
keywords: patch
messages: 214959
nosy: giampaolo.rodola, gvanrossum
priority: normal
severity: normal
status: open
title: Turn signal.SIG* constants into enums
versions: Python 3.5
Added file: http://bugs.python.org/file34636/signals.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21076
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21076] Turn signal.SIG* constants into enums

2014-03-27 Thread Giampaolo Rodola'

Changes by Giampaolo Rodola' g.rod...@gmail.com:


Added file: http://bugs.python.org/file34637/signals.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21076
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21076] Turn signal.SIG* constants into enums

2014-03-27 Thread Giampaolo Rodola'

Changes by Giampaolo Rodola' g.rod...@gmail.com:


Removed file: http://bugs.python.org/file34637/signals.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21076
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21076] Turn signal.SIG* constants into enums

2014-03-27 Thread Guido van Rossum

Guido van Rossum added the comment:

OK, somebody please review this (not me).

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21076
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21076] Turn signal.SIG* constants into enums

2014-03-27 Thread Guido van Rossum

Changes by Guido van Rossum gu...@python.org:


--
stage:  - patch review

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21076
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17373] Add inspect.Signature.from_callable()

2014-03-27 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 8a4e44473fdd by Yury Selivanov in branch 'default':
inspect.Signature: Add 'Signature.from_callable' classmethod. Closes #17373
http://hg.python.org/cpython/rev/8a4e44473fdd

--
nosy: +python-dev
resolution:  - fixed
stage: patch review - committed/rejected
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17373
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21076] Turn signal.SIG* constants into enums

2014-03-27 Thread Ethan Furman

Changes by Ethan Furman et...@stoneleaf.us:


--
nosy: +ethan.furman

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21076
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20334] make inspect Signature hashable

2014-03-27 Thread Yury Selivanov

Yury Selivanov added the comment:

If nobody has any objections on this, I'm going to commit this in 3.5 soon.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20334
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21077] Turtle Circle Speed 0

2014-03-27 Thread Garrett Grimsley

New submission from Garrett Grimsley:

A circle is supposed to draw upon a click event, but if speed is set to 0 it 
appears that the circle fails to draw and all existing lines are erased.

A screenshot of the behavior with radius = 20 can be seen here: 
http://i.imgur.com/y7z87AN.png This state can be replicated by completing an 
entire game worth of clicks.



Someone replying to my StackOverflow question noted that if the radius of the 
circle is increased (radius = 200 for example) it becomes apparent that the 
circle  is actually drawing, but the existing lines are still erased. 

A screenshot of the behavior with radius = 200 can be seen here: 
http://i.imgur.com/gYeOlnT.png This state can be replicated by clicking bottom 
middle, middle middle, then bottom right, in that order.


You will note that only lines on the clickable Tic-Tac-Toe board are erased, 
and lines outside of it remain intact.


Load my code and click the Tic-Tac-Toe board to reproduce the bug. Please use 
my exact code, as you WILL fail to reproduce the bug by simply importing turtle 
and drawing a circle. To change the circle radius in my code locate the radius 
variable assignment in the draw_circle() function. It is located on line 77 of 
the code.


Source code in file is also available here: http://bpaste.net/show/189364/
Relevant StackExchange overflow link: 
http://stackoverflow.com/questions/22432679/turtle-circle-makes-lines-disappear/22445757

--
components: Library (Lib)
files: aoeu.py
messages: 214963
nosy: Garrett.Grimsley, gregorlingl
priority: normal
severity: normal
status: open
title: Turtle Circle Speed 0
versions: Python 3.3
Added file: http://bugs.python.org/file34638/aoeu.py

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21077
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20668] Remove dependency on tests.txt when running test_asyncio suite

2014-03-27 Thread Roundup Robot

Roundup Robot added the comment:

New changeset bcc77493249c by Yury Selivanov in branch 'default':
asyncio.tests: Autodiscover asyncio tests. Patch by Vajrasky Kok. Closes #20668
http://hg.python.org/cpython/rev/bcc77493249c

--
nosy: +python-dev
resolution:  - fixed
stage:  - committed/rejected
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20668
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17373] Add inspect.Signature.from_callable()

2014-03-27 Thread Eric Snow

Eric Snow added the comment:

Thanks, Yury!

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17373
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20378] Implement `Signature.__repr__`

2014-03-27 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 3f9a81297b39 by Yury Selivanov in branch 'default':
inspect.signature: Improve repr of Signature and Parameter. Closes #20378
http://hg.python.org/cpython/rev/3f9a81297b39

--
nosy: +python-dev
resolution:  - fixed
stage: test needed - committed/rejected
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20378
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21078] multiprocessing.managers.BaseManager.__init__'s serializer argument is not documented

2014-03-27 Thread Yuriy Taraday

New submission from Yuriy Taraday:

We're going to use BaseManager for simple secure local RPC and for the secure 
part we can't use pickle, so we have to use serializer argument to switch to 
xmlrpclib.

We need to be sure that argument won't go away so we need it to be documented 
and supported on future versions.

--
assignee: docs@python
components: Documentation
messages: 214967
nosy: docs@python, yorik.sar
priority: normal
severity: normal
status: open
title: multiprocessing.managers.BaseManager.__init__'s serializer argument is 
not documented
versions: Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4, Python 3.5

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21078
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21078] multiprocessing.managers.BaseManager.__init__'s serializer argument is not documented

2014-03-27 Thread Brett Cannon

Brett Cannon added the comment:

Is there any reason it isn't documented, Richard? And are there proper tests?

--
nosy: +brett.cannon, sbt

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21078
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21079] EmailMessage.is_attachment == False if filename is present

2014-03-27 Thread Brandon Rhodes

New submission from Brandon Rhodes:

Most attachments (in my inbox, at least) specify a filename, and thus
have a Content-Disposition header that looks like:

Content-Disposition: attachment; filename=attachment.gz

In fact, this sample header was generated by the new add_attachment()
method in Python itself. Unfortunately, the is_attachment property
currently does this test:

c_d.lower() == 'attachment'

Which means that it returns False for almost all attachments in my
email archive. I believe that the test should instead be:

c_d.split(';', 1)[0].lower() == 'attachment'

--
components: email
messages: 214969
nosy: barry, brandon-rhodes, r.david.murray
priority: normal
severity: normal
status: open
title: EmailMessage.is_attachment == False if filename is present
versions: Python 3.4

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21079
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20668] Remove dependency on tests.txt when running test_asyncio suite

2014-03-27 Thread Guido van Rossum

Guido van Rossum added the comment:

I think this is reasonable to also commit to the 3.4 branch so it will appear 
in 3.4.1.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20668
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21079] EmailMessage.is_attachment == False if filename is present

2014-03-27 Thread Brandon Rhodes

Brandon Rhodes added the comment:

Oh - this also, happily, explains why iter_attachments() is ignoring
all of the attachments on my email: because it internally relies upon
is_attachment to make the decision. So this fix will also make
iter_attachments() usable!

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21079
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21079] EmailMessage.is_attachment == False if filename is present

2014-03-27 Thread Brandon Rhodes

Brandon Rhodes added the comment:

Okay, having looked at the source a bit more it would probably make
more sense to use _splitparam() instead of doing the split manually.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21079
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18709] SSL module fails to handle NULL bytes inside subjectAltNames general names (CVE-2013-4238)

2014-03-27 Thread Éric Araujo

Éric Araujo added the comment:

Not sure if 3.2 is still open to security fixes.

--
nosy: +eric.araujo

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18709
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21079] EmailMessage.is_attachment == False if filename is present

2014-03-27 Thread Brandon Rhodes

Brandon Rhodes added the comment:

Given that methods like get_param() already exist for pulling data out of
the right-hand-side of the ';' in a parameterized email header, would it
be amiss for EmailMessage to also have a method that either returns
everything to the left of the semicolon, or returns something like:

('attachment', [('filename', 'example.txt')])

thus doing all the parsing in one place that everything else can then
steadily rely upon, including users that want to pull the parsed values
for their own inspection?

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21079
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21073] Py_ReprEnter potentially misbehaves during malformed thread states

2014-03-27 Thread Antoine Pitrou

Antoine Pitrou added the comment:

hg annotate shows it dates back to 4f0b7acffc7d by Guido, with the following 
diff:

diff --git a/Misc/NEWS b/Misc/NEWS
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -150,6 +150,10 @@
 C API
 -
 
+- PyThreadState_GetDict() was changed not to raise an exception or
+  issue a fatal error when no current thread state is available.  This
+  makes it possible to print dictionaries when no thread is active.
+
 - LONG_LONG was renamed to PY_LONG_LONG.
 
 - Added PyObject_SelfIter() to fill the tp_iter slot for the
diff --git a/Objects/object.c b/Objects/object.c
--- a/Objects/object.c
+++ b/Objects/object.c
@@ -2119,7 +2119,7 @@
 
dict = PyThreadState_GetDict();
if (dict == NULL)
-   return -1;
+   return 0;
list = PyDict_GetItemString(dict, KEY);
if (list == NULL) {
list = PyList_New(0);


Unless Guido has changed his mind about it, I'd close this issue as rejected ;-)

--
nosy: +gvanrossum, pitrou

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21073
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21073] Py_ReprEnter potentially misbehaves during malformed thread states

2014-03-27 Thread Antoine Pitrou

Antoine Pitrou added the comment:

(but you're right, we could add a comment explaining this)

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21073
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21073] Py_ReprEnter potentially misbehaves during malformed thread states

2014-03-27 Thread Guido van Rossum

Guido van Rossum added the comment:

No, I haven't changed my mind. Feel free to add a comment explaining this. :-)

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21073
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21079] EmailMessage.is_attachment == False if filename is present

2014-03-27 Thread R. David Murray

R. David Murray added the comment:

That facility already mostly exists.  The bug is that the code in question 
doesn't use it.

 m['Content-Disposition'].content_disposition
'attachment'
 m['Content-Disposition'].params
{'filename': 'attachment.gz'}

On the other hand, looking at that it is obvious there should be a generic 
'value' attribute on all MIME headers so that that could be written:

m['Content-Disposition'].value == 'attachment'

where value would be the 'canonical form' of the value for that header when 
there is one, including normalizing the case.  Some headers still want 
specialized attributes (Content-Type's maintype and subtype, for example), but 
there is always the value/params split, and that ought to be accessible 
generically and currently isn't.

This is why this stuff is still provisional :)

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21079
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21063] Touch up one-line descriptions of modules for module index

2014-03-27 Thread Brett Cannon

Brett Cannon added the comment:

Just the synopsis lines for the modules.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21063
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21063] Touch up one-line descriptions of modules for module index

2014-03-27 Thread Angad Singh

Angad Singh added the comment:

Interested in taking this up as my first patch -
@brett - are you only talking about the :synopsis: or the occurrence of This 
module at the beginning of the description as well?
-angad

--
nosy: +angad

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21063
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21063] Touch up one-line descriptions of modules for module index

2014-03-27 Thread Angad Singh

Angad Singh added the comment:

Not a lot of occurrences if I only look at the synopsis. Attaching a diff.
Also saw a weird This subpackage in apiref.rst line 1767. Fix that too?

--
keywords: +patch
Added file: http://bugs.python.org/file34639/this_module_doc_fix.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21063
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21063] Touch up one-line descriptions of modules for module index

2014-03-27 Thread Brett Cannon

Brett Cannon added the comment:

Sure, if you are just looking for This module you won't find very many 
instances. The bug is more about doing a sweep through *every* module's 
synopsis and just cleaning them up to read better. The this module instance 
for linecache is just an example of why a cleanup would be good to do.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21063
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20668] Remove dependency on tests.txt when running test_asyncio suite

2014-03-27 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 07984815003f by Yury Selivanov in branch '3.4':
asyncio.tests: Autodiscover asyncio tests. Patch by Vajrasky Kok. Closes #20668
http://hg.python.org/cpython/rev/07984815003f

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20668
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20668] Remove dependency on tests.txt when running test_asyncio suite

2014-03-27 Thread Yury Selivanov

Yury Selivanov added the comment:

Guido, good idea. Committed.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20668
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21076] Turn signal.SIG* constants into enums

2014-03-27 Thread Charles-François Natali

Charles-François Natali added the comment:

This patch can't be reviewed: please re-generate without --git.

--
nosy: +neologix

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21076
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20816] inspect.getcallargs() attempts to iterate over None

2014-03-27 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 3de2e729d0fb by Yury Selivanov in branch 'default':
inspect: Fix getcallargs() to raise correct TypeError
http://hg.python.org/cpython/rev/3de2e729d0fb

New changeset 070dfca74610 by Yury Selivanov in branch '3.4':
inspect: Fix getcallargs() to raise correct TypeError
http://hg.python.org/cpython/rev/070dfca74610

--
nosy: +python-dev
resolution:  - fixed
stage:  - committed/rejected
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20816
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20816] inspect.getcallargs() attempts to iterate over None

2014-03-27 Thread Yury Selivanov

Yury Selivanov added the comment:

Fixed for 3.4.1 and 3.5.
Thank you Jeremiah!

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20816
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21076] Turn signal.SIG* constants into enums

2014-03-27 Thread STINNER Victor

Changes by STINNER Victor victor.stin...@gmail.com:


--
nosy: +haypo

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21076
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18932] selectors and modify()

2014-03-27 Thread Andrew Svetlov

Changes by Andrew Svetlov andrew.svet...@gmail.com:


--
versions: +Python 3.5 -Python 3.4

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18932
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20817] inspect.getcallargs() raises the wrong error if 3+ arguments are missing

2014-03-27 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 35302cc4fc93 by Yury Selivanov in branch 'default':
inspect: Fix getcallargs() to fail correctly if more than 3 args are missing.
http://hg.python.org/cpython/rev/35302cc4fc93

New changeset 9f06cbb7962b by Yury Selivanov in branch '3.4':
inspect: Fix getcallargs() to fail correctly if more than 3 args are missing.
http://hg.python.org/cpython/rev/9f06cbb7962b

--
nosy: +python-dev
resolution:  - fixed
stage:  - committed/rejected
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20817
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20817] inspect.getcallargs() raises the wrong error if 3+ arguments are missing

2014-03-27 Thread Yury Selivanov

Yury Selivanov added the comment:

Fixed for 3.4.1 and 3.5.
Thanks for the contribution!

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20817
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21076] Turn signal.SIG* constants into enums

2014-03-27 Thread Giampaolo Rodola'

Changes by Giampaolo Rodola' g.rod...@gmail.com:


Added file: http://bugs.python.org/file34640/signals.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21076
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21079] EmailMessage.is_attachment == False if filename is present

2014-03-27 Thread R. David Murray

R. David Murray added the comment:

Here's patch.

--
keywords: +patch
Added file: http://bugs.python.org/file34641/is_attachment.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21079
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21076] Turn signal.SIG* constants into enums

2014-03-27 Thread Giampaolo Rodola'

Changes by Giampaolo Rodola' g.rod...@gmail.com:


Removed file: http://bugs.python.org/file34640/signals.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21076
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21076] Turn signal.SIG* constants into enums

2014-03-27 Thread Giampaolo Rodola'

Changes by Giampaolo Rodola' g.rod...@gmail.com:


Added file: http://bugs.python.org/file34642/signals.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21076
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18932] selectors and modify()

2014-03-27 Thread Guido van Rossum

Guido van Rossum added the comment:

Why can't this be fixed in 3.4.1? It isn't an API change.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18932
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21076] Turn signal.SIG* constants into enums

2014-03-27 Thread Giampaolo Rodola'

Giampaolo Rodola' added the comment:

This time I made it without --git but that didn't help either.
Not sure what to do. :-\

Note: the devguide recommends using --git BTW: 
http://docs.python.org/devguide/committing.html
Should that be changed?

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21076
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20691] inspect.signature: Consider exposing 'follow_wrapper_chains' option in public API

2014-03-27 Thread Yury Selivanov

Yury Selivanov added the comment:

So... should we expose two keyword only parameters for 
Signature.from_callable() and signature():

- 'follow_wrapped=True' to follow __wrapped__ chains;
- 'keep_bound_arg=False' to skip/include first bound arg?

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20691
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21076] Turn signal.SIG* constants into enums

2014-03-27 Thread Giampaolo Rodola'

Changes by Giampaolo Rodola' g.rod...@gmail.com:


Removed file: http://bugs.python.org/file34642/signals.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21076
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21080] asyncio.subprocess: connect pipes of two programs

2014-03-27 Thread STINNER Victor

New submission from STINNER Victor:

With the current asyncio API, it's not possible to implement the shell command 
ls | wc -l in Python: connect the stdin of a consumer to the stdin of a 
producer.

--
messages: 214994
nosy: gvanrossum, haypo, yselivanov
priority: normal
severity: normal
status: open
title: asyncio.subprocess: connect pipes of two programs
type: enhancement
versions: Python 3.5

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21080
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21079] EmailMessage.is_attachment == False if filename is present

2014-03-27 Thread R. David Murray

R. David Murray added the comment:

I was going to open new issue for adding 'value', but looking at the parsing 
code I see why I didn't add one.  The way the new parser works it really wants 
to know the actual structure of the value, it doesn't have a good way to treat 
it as generic.  We could still add 'value' and just set it to the appropriate 
value, but there isn't currently a way to parse an unknown MIME header.

I think maybe I'll postpone this 'value' idea until we have a bit more 
experience with the API.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21079
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21080] asyncio.subprocess: connect pipes of two programs

2014-03-27 Thread Guido van Rossum

Guido van Rossum added the comment:

How do you do that with the subprocess module, and why doesn't that work with 
asyncio?

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21080
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21079] EmailMessage.is_attachment == False if filename is present

2014-03-27 Thread Brandon Rhodes

Brandon Rhodes added the comment:

Understood. I wonder where in the documentation the ability to get the content 
disposition should wind up? I am almost tempted to suggest a 
get_content_disposition() method that parallels get_content_type(), mostly to 
avoid having to document the asymmetry between how users should go about 
getting these two pieces of information. :)

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21079
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20739] PEP 463 (except expression) implementation

2014-03-27 Thread Josh Rosenberg

Josh Rosenberg added the comment:

It's not part of the PEP, but what happens with the new syntax if there is an 
existing exception context? Some utilities (e.g. functools.lru_cache) use 
dict.get over a try/except because they operate under the assumption that they 
may be invoked within an except block, and must leave the exception context (if 
any) unmodified.

It seems like something intended to serve as a general replacement for 
non-exception raising functions like dict.get should have similar exception 
context preserving semantics.

--
nosy: +josh.rosenberg

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20739
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21080] asyncio.subprocess: connect pipes of two programs

2014-03-27 Thread STINNER Victor

STINNER Victor added the comment:

 How do you do that with the subprocess module

Something like that:
---
import subprocess
ls = subprocess.Popen([ls, -1], stdout=subprocess.PIPE)
wc = subprocess.Popen([wc, -l], stdin=ls.stdout)
ls.wait()
wc.wait()
---

 and why doesn't that work with asyncio?

It's possible with the two methods of an event loop, but I'm requesting this 
feature for the high-level API: asyncio.subprocess.

create_subprocess_shell(cat, stdout=subprocess.PIPE) starts immediatly to 
consume stdout, before I can connect the pipe to wc stdin. Currently, the 
asyncio.subprocess is designed to be able to write:
---
proc = yield from create_subprocess_exec(ls, stdout=subprocess.PIPE)
stdout, _ = yield from proc.communicate()
---

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21080
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21080] asyncio.subprocess: connect pipes of two programs

2014-03-27 Thread Guido van Rossum

Guido van Rossum added the comment:

Oh, I see. Given that it is possible to do using event loop methods, why don't 
you write up a complete implementation and then propose to add that to the 
asyncio.subprocess module?

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21080
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21075] fileinput should use stdin.buffer for rb mode

2014-03-27 Thread Josh Rosenberg

Josh Rosenberg added the comment:

There is a similar, (unfixed?) bug, #14156, in argparse as well. Seems like a 
common failing in the move to Python 3; std*.buffer was introduced, but none of 
the places that use it were updated, so they all became str only.

--
nosy: +josh.rosenberg

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21075
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14156] argparse.FileType for '-' doesn't work for a mode of 'rb'

2014-03-27 Thread Josh Rosenberg

Changes by Josh Rosenberg shadowranger+pyt...@gmail.com:


--
nosy: +josh.rosenberg

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14156
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21079] EmailMessage.is_attachment == False if filename is present

2014-03-27 Thread R. David Murray

R. David Murray added the comment:

Well, that's why is_attachment exists.  I wouldn't be averse to adding 
get_content_disposition if nobody objects, though.

The attributes are on the headers because the data really is attributes of the 
parsed headers, but the more useful user API is the methods on the message 
object those headers are part of.  Originally I thought the header attributes 
could replace the message object methods, but the more I actually used that 
interface the less I liked it :).  So now I consider them more of an 
implementation or lower-level-of-the-model detail.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21079
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21076] Turn signal.SIG* constants into enums

2014-03-27 Thread Giampaolo Rodola'

Changes by Giampaolo Rodola' g.rod...@gmail.com:


Added file: http://bugs.python.org/file34643/signals2.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21076
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21076] Turn signal.SIG* constants into enums

2014-03-27 Thread Giampaolo Rodola'

Giampaolo Rodola' added the comment:

OK, it appears it works now. Sorry for the notification noise.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21076
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21079] EmailMessage.is_attachment == False if filename is present

2014-03-27 Thread Brandon Rhodes

Brandon Rhodes added the comment:

I agree that is_attachment supports the most common use-case of people who need 
to inspect the content disposition!

But people implementing heavyweight tools and email clients might additionally 
need to distinguish between a MIME part whose disposition is explicitly 
inline and a MIME part whose disposition is simply unspecified — since the 
RFC seems to allow clients quite a bit of freedom in the case where it is 
entirely unspecified:

Content-Disposition is an optional header field. In its absence, the MUA may 
use whatever presentation method it deems suitable. — RFC 2183

And a three-possibility 'inline'|'attachment'|None return value from 
get_content_disposition() would perfectly reflect the three possibilities 
envisioned in the standard.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21079
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6676] expat parser throws Memory Error when parsing multiple files

2014-03-27 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 74faca1ac59c by Ned Deily in branch '2.7':
Issue #6676: Ensure a meaningful exception is raised when attempting
http://hg.python.org/cpython/rev/74faca1ac59c

New changeset 9e3fc66ee0b8 by Ned Deily in branch '3.4':
Issue #6676: Ensure a meaningful exception is raised when attempting
http://hg.python.org/cpython/rev/9e3fc66ee0b8

New changeset ee0034434e65 by Ned Deily in branch 'default':
Issue #6676: merge from 3.4
http://hg.python.org/cpython/rev/ee0034434e65

--
nosy: +python-dev

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6676
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21080] asyncio.subprocess: connect pipes of two programs

2014-03-27 Thread STINNER Victor

STINNER Victor added the comment:

 Oh, I see. Given that it is possible to do using event loop methods, why 
 don't you write up a complete implementation and then propose to add that to 
 the asyncio.subprocess module?

I don't know that a whole new implementation is needed. I guess that a
simpler change can be done on SubprocessStreamProtocol to ask to not
consume the pipe (don't attach a StreamReader to the pipe transport).

I still want to use streams at the end, so use the high-level API. Example:
---
ls = yield from create_subprocess_exec(ls, stdout=subprocess.PIPE)
grep = yield from create_subprocess_exec(grep, -v, -F, .old,
stdin=ls.stdin, stdout=subprocess.PIPE)
stdout, _ = yield from grep.communicate()
---

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21080
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20739] PEP 463 (except expression) implementation

2014-03-27 Thread Thomas Wouters

Thomas Wouters added the comment:

The implementation in the patch preserves the exception context. It's probably 
the thing that took the most code, and it's why there's two new opcodes in the 
patch :) It's covered in the tests, too.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20739
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17654] IDLE only customizes correctly for OS X when using framework build

2014-03-27 Thread Ned Deily

Ned Deily added the comment:

If there are no objections, I'd like to commit this cleanup soon.  It should 
make things a bit easier for people testing IDLE from development builds on OS 
X and fix some long-standing bugs when linking with the Tk X11 variant on OS X.

--
nosy: +terry.reedy
stage: patch review - commit review
versions: +Python 3.5 -Python 3.3

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17654
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21080] asyncio.subprocess: connect pipes of two programs

2014-03-27 Thread Guido van Rossum

Guido van Rossum added the comment:

But how is the first call supposed to know that you don't want a StreamReader? 
Or the second that you do want one? Maybe we need a new constant instead of 
PIPE that means leave it hanging?

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21080
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17654] IDLE only customizes correctly for OS X when using framework build

2014-03-27 Thread Terry J. Reedy

Terry J. Reedy added the comment:

If I understand the Bindings.py patch, the fragility changed from If you edit 
menudefs, edit the Mac block that follows to If you change (e sections of) 
menudefs, edit macosxSupport.overrideRootMenu. That seems like a wash to me, 
except for the narrowing down of which sections might later be patched.

Every thing else that is not a change to macosSupport is guarded by 
macosSupport.xxx or 'darwin', so none from me.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17654
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6676] expat parser throws Memory Error when parsing multiple files

2014-03-27 Thread Ned Deily

Ned Deily added the comment:

Applied for release in 3.5.0, 3.4.1 and 2.7.7.  Thanks, everyone!

--
resolution:  - fixed
stage: patch review - committed/rejected
status: open - closed
versions: +Python 3.5 -Python 3.3

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6676
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21080] asyncio.subprocess: connect pipes of two programs

2014-03-27 Thread Giampaolo Rodola'

Changes by Giampaolo Rodola' g.rod...@gmail.com:


--
nosy: +giampaolo.rodola

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21080
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21081] missing vietnamese codec TCVN 5712:1993 in Python

2014-03-27 Thread Jean Christophe André

New submission from Jean Christophe André:

In Python version 2.x and at least 3.2 there no Vietnamese encoding support for 
TCVN 5712:1993.

This encoding is currently largely used in Vietnam and I think it would be 
usefull to add it to the python core encodings.

I already wrote some codec code, based on the codecs already available, that I 
successfully used in real life situation.

I would like to give it as a contribution to Python.

--
components: Unicode
files: vntime_tcvn.py
messages: 215012
nosy: ezio.melotti, haypo, progfou
priority: normal
severity: normal
status: open
title: missing vietnamese codec TCVN 5712:1993 in Python
type: enhancement
versions: Python 2.7, Python 3.2
Added file: http://bugs.python.org/file34644/vntime_tcvn.py

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21081
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20778] ModuleFinder.load_module skips incorrect number of bytes in pyc files

2014-03-27 Thread Thomas Kluyver

Thomas Kluyver added the comment:

For future reference, cx_Freeze ships its own copy of ModuleFinder, so it 
doesn't depend on the stdlib copy. This issue was fixed there some time around 
the release of Python 3.3.

I realised recently that this is based on code in the stdlib, and I've been 
meaning to work out whether cx_Freeze can use any of the stdlib code and lose 
parts of its own implementation. I guess it's been diverging for quite some 
time, though.

--
nosy: +takluyver

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20778
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21079] EmailMessage.is_attachment == False if filename is present

2014-03-27 Thread R. David Murray

R. David Murray added the comment:

OK.  If you would be willing to open a feature request for that, that would be 
great.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21079
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21057] TextIOWrapper does not support reading bytearrays or memoryviews

2014-03-27 Thread Nikolaus Rath

Nikolaus Rath added the comment:

I'm attaching a patch that enables TextIOWrapper to work with bytes-like 
objects from the underlying file descriptor.

The code changes are pretty small, without introducing any significant 
additional complexity.

For streams providing bytes objects, this patch does not change anything. For 
streams that are able to provide bytearrays or memoryviews, this patch removes 
the overhead that would be incurred by explicitly converting to bytes.

--
keywords: +patch
Added file: http://bugs.python.org/file34645/issue21057.diff

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21057
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21057] TextIOWrapper does not support reading bytearrays or memoryviews

2014-03-27 Thread Nikolaus Rath

Changes by Nikolaus Rath nikol...@rath.org:


Removed file: http://bugs.python.org/file34645/issue21057.diff

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21057
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21057] TextIOWrapper does not support reading bytearrays or memoryviews

2014-03-27 Thread Nikolaus Rath

Changes by Nikolaus Rath nikol...@rath.org:


Added file: http://bugs.python.org/file34646/issue21057.diff

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21057
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17654] IDLE only customizes correctly for OS X when using framework build

2014-03-27 Thread Roundup Robot

Roundup Robot added the comment:

New changeset f551740c26b6 by Ned Deily in branch '2.7':
Issue #17654: Ensure IDLE menus are customized properly on OS X for
http://hg.python.org/cpython/rev/f551740c26b6

New changeset 67a7a49e7b78 by Ned Deily in branch '3.4':
Issue #17654: Ensure IDLE menus are customized properly on OS X for
http://hg.python.org/cpython/rev/67a7a49e7b78

New changeset d8659dbebfd1 by Ned Deily in branch 'default':
Issue #17654: merge from 3.4
http://hg.python.org/cpython/rev/d8659dbebfd1

--
nosy: +python-dev

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17654
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17654] IDLE only customizes correctly for OS X when using framework build

2014-03-27 Thread Ned Deily

Ned Deily added the comment:

Thanks for the review, Terry. The reasons for moving the menders changes are 
two.  As noted in the comments, the menudefs were being customized early in 
IDLE initialization before calling Tk to create the root object and, therefore, 
we did not know at that point which kind of Tk we were running under.  To 
properly customize, we need to know that, as we are now more careful to 
customize menus depending on the OS X Tk variant.  Also, there already were 
other menu customizations being done in macosxSupport; now it is all in one 
place. It would be nice to reduce the fragility in the menu management. I would 
encourage anyone interested in working on IDLE to tackle it as a separate issue.

Applied for release in 3.5.0, 3.4.1, and 2.7.7.

--
resolution:  - fixed
stage: commit review - committed/rejected
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17654
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1615] PyObject_GenericGetAttr suppresses AttributeErrors in descriptors

2014-03-27 Thread Ethan Furman

Ethan Furman added the comment:

Results from the first two tests in my test script:
--
'WithOut' object has no attribute 'not_here'

looking up not_here
looking up huh
'With' object has no attribute 'not_here'

--
stage: test needed - patch review
Added file: http://bugs.python.org/file34647/issue1615.stoneleaf.01.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1615
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



  1   2   >