[issue16638] support multi-line docstring signatures in IDLE calltips

2014-05-27 Thread Terry J. Reedy

Terry J. Reedy added the comment:

As I said previously, the only reason for the change was get all the docstring 
signature lines for builtins, after they were changed from 1 to many. I was not 
thrilled with having to do this. However, I felt that just presenting the 
arbitrary first of many lines was (and would be) a bug.

For 3.4+, this is a temporary measure until Argument Clinic is applied to 
enough builtins to make it sensible to switch calltips to using 
str(inspect.signature). See #19903. When A.C. is applied to a function, the 
signature is no longer in the docstring, which instead starts with 'Returns (or 
whatever) just as for python-coded functions.

Since A.C. and #19903 do not apply to 2.7, feel free to develop a more 
permanent alternative for 2.7. Perhaps just say expand multiple line 
signature and have a click on that line do the expansion instead of dismissing 
the box.

If you do, I can check whether the A.C conversion has been slow enough to make 
temporary application to 3.4 worthwhile, or if *really* slow, to 3.5. The click 
idea, while still needed, might be combined with using .signature, but I have 
to recheck its current behavior.

--
assignee: terry.reedy - 
type: behavior - enhancement
versions:  -Python 3.3, Python 3.4

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



[issue21477] Idle: improve idle_test.htest

2014-05-27 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 72a8a107eed1 by Terry Jan Reedy in branch '2.7':
Issue #21477: Idle htest: modify run; add more tests.
http://hg.python.org/cpython/rev/72a8a107eed1

--

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



[issue21498] configparser accepts keys beginning with comment_chars when writing

2014-05-27 Thread Łukasz Langa

Changes by Łukasz Langa luk...@langa.pl:


--
assignee:  - lukasz.langa

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



[issue10203] sqlite3.Row doesn't support sequence protocol

2014-05-27 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Compare with tuple:

 (1, 2)[2**1000]
Traceback (most recent call last):
  File stdin, line 1, in module
IndexError: cannot fit 'int' into an index-sized integer

--

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



[issue21477] Idle: improve idle_test.htest

2014-05-27 Thread Roundup Robot

Roundup Robot added the comment:

New changeset e770d8c4291c by Terry Jan Reedy in branch '2.7':
Issue #21477: Add htests for Search and Replace dialogs.
http://hg.python.org/cpython/rev/e770d8c4291c

New changeset b8e4bb1e1090 by Terry Jan Reedy in branch '3.4':
Issue #21477: Add htests for Search and Replace dialogs.
http://hg.python.org/cpython/rev/b8e4bb1e1090

--

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



[issue10203] sqlite3.Row doesn't support sequence protocol

2014-05-27 Thread Claudiu.Popa

Claudiu.Popa added the comment:

Thanks. Patch modified.

--
Added file: http://bugs.python.org/file35376/issue10203_2.patch

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



[issue21477] Idle: improve idle_test.htest

2014-05-27 Thread Terry J. Reedy

Terry J. Reedy added the comment:

I think it time to make running through all or just some of the tests more 
pleasant. If we reversed the order [next], [test name], test instruction, then 
[next] would not just up and down. If the window were set to a constant width, 
then it would not jump back and forth either. The width should be just wide 
enough for the longest lines we use in htest.py, or can we just allow them to 
wrap?

To select just a one or a few tests (like just Search, Replace, and Tree for 
the 2605.. patch), a drop down list box would be nice. It could be beside the 
next box. With a constant width, there would be room.

Doing the test reminded me that Search (find) and Replace have a severe bug on 
Windows of not highlighting the the found text while the box is still open. 
There was an issue where this was supposedly fixed, but it is not. Find is 
usable by closing the box and using cntl-G for find next. But this does not 
work for replace, making replace useless on windows unless one is really sure 
about replace all.

--

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



[issue21477] Idle: improve idle_test.htest

2014-05-27 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Ned, I recently saw that some of the builtin extensions call macosxsupport. I 
though then that it would be better if such calls were somehow handled 
automatically. I have no idea how and when to make them and so I don't know if 
the existing calls are needed or if other calls should be added. So I like your 
idea. It seems like it should be a separate issue.

--

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



[issue21468] NNTPLib connections become corrupt after long periods of activity

2014-05-27 Thread James Meneghello

James Meneghello added the comment:

Yeah, I didn't have a lot of time so I chose just to work around it. When I get 
a chance I'll have a better look.

Good point: I didn't think to try it with SSL off (SSL is enabled for all 
connections by default with this application). I'll test this and see if it 
still breaks.

I tested it with 3.2.5, 3.3.2, 3.4.0a (was the latest at the time) on Ubuntu 
64-bit. As said, didn't encounter the same problems with those versions on 
Windows 8 64-bit.

--

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



[issue16099] robotparser doesn't support request rate and crawl delay parameters

2014-05-27 Thread Nikolay Bogoychev

Nikolay Bogoychev added the comment:

Updated patch, all comments addressed, sorry for the 6 months delay. Please 
review

--
Added file: http://bugs.python.org/file35377/robotparser_v3.patch

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



[issue16446] pdb raises BdbQuit on 'quit' when started with set_trace

2014-05-27 Thread Richard Marko

Richard Marko added the comment:

Would be nice to have this commited as without this change

-if self.quitting:
-return # None
+if not self.botframe:
+self.botframe = frame

it's not possible to quit Bdb (and the code it's executing) as it just returns 
and doesn't raise BdbQuit.

--
nosy: +rmarko

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



[issue14776] Add SystemTap static markers

2014-05-27 Thread Bohuslav Slavek Kabrda

Bohuslav Slavek Kabrda added the comment:

@jcea: So here is my proposal for dealing with this: let's take what I 
currently have (e.g. tracepoints for function entry/function exit) and extend 
my patch to also work with DTrace in a similar fashion. Then, when we have a 
working patch for both Systemtap and DTrace, we can start adding more 
tracepoints as needed/as we see fit. Sounds good?

--

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



[issue14776] Add SystemTap static markers

2014-05-27 Thread Jesús Cea Avión

Jesús Cea Avión added the comment:

Could you possibly create a new issue and add me to its NOSY?

--

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



[issue21589] Use better idiom in unittest example

2014-05-27 Thread Claudiu.Popa

New submission from Claudiu.Popa:

Hello.

This patch proposes using `assertIn` in the first unittest example, instead of 
`assertTrue(x in seq)`. This is clearer and recommending it first is better for 
beginners.

--
assignee: docs@python
components: Documentation
files: unittest_better_idiom.patch
keywords: patch
messages: 219216
nosy: Claudiu.Popa, docs@python
priority: normal
severity: normal
status: open
title: Use better idiom in unittest example
type: enhancement
versions: Python 3.5
Added file: http://bugs.python.org/file35378/unittest_better_idiom.patch

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



[issue21589] Use better idiom in unittest example

2014-05-27 Thread Ezio Melotti

Ezio Melotti added the comment:

This is a duplicate of #11468.

--
nosy: +ezio.melotti, rhettinger
resolution:  - duplicate
stage:  - resolved
status: open - closed
superseder:  - Improve unittest basic example in the doc

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



[issue11468] Improve unittest basic example in the doc

2014-05-27 Thread Berker Peksag

Changes by Berker Peksag berker.pek...@gmail.com:


--
versions: +Python 3.5 -Python 3.3

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



[issue20689] socket.AddressFamily is absent in html pydoc

2014-05-27 Thread Vajrasky Kok

Vajrasky Kok added the comment:

I found the culprit. The AddressFamily is not registered in _socket module. I 
created a preliminary patch to show the culprit.

--
keywords: +patch
nosy: +vajrasky
Added file: http://bugs.python.org/file35379/pydoc_display_AddressFamily.patch

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



[issue21590] Systemtap and DTrace support

2014-05-27 Thread Bohuslav Slavek Kabrda

New submission from Bohuslav Slavek Kabrda:

This is a tracking bug for development of combined systemtap and dtrace patch 
for Python. The separate patches were submitted at [1] (systemtap) and [2] 
(dtrace).
Since it was agreed that it'd be best to merge the two patches to reuse as much 
code as possible between them, I'm opening this issue to track the progress and 
discuss possible improvements and suggestions.

[1] http://bugs.python.org/issue14776
[2] http://bugs.python.org/issue13405

--
components: Interpreter Core
messages: 219219
nosy: bkabrda, jcea
priority: normal
severity: normal
status: open
title: Systemtap and DTrace support
type: enhancement
versions: Python 3.5

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



[issue14776] Add SystemTap static markers

2014-05-27 Thread Bohuslav Slavek Kabrda

Bohuslav Slavek Kabrda added the comment:

I opened a bug for tracking progress of development of the combined dtrace and 
systemtap support: http://bugs.python.org/issue21590

--

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



[issue13405] Add DTrace probes

2014-05-27 Thread Bohuslav Slavek Kabrda

Bohuslav Slavek Kabrda added the comment:

I opened a bug for tracking progress of development of the combined dtrace and 
systemtap support: http://bugs.python.org/issue21590

--
nosy: +bkabrda

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



[issue21590] Systemtap and DTrace support

2014-05-27 Thread Jesús Cea Avión

Jesús Cea Avión added the comment:

Bohuslav, do you have Jabber/XMPP?. Mine is j...@jabber.org. This thing will 
require real time communication.

I rather prefer XMPP/Jabber, but I could accept IRC :-)

--

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



[issue20689] socket.AddressFamily is absent in html pydoc

2014-05-27 Thread Berker Peksag

Changes by Berker Peksag berker.pek...@gmail.com:


--
nosy:  -berker.peksag

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



[issue21590] Systemtap and DTrace support

2014-05-27 Thread Dave Malcolm

Changes by Dave Malcolm dmalc...@redhat.com:


--
nosy: +dmalcolm

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



[issue21235] importlib's spec module create algorithm is not exposed

2014-05-27 Thread Brett Cannon

Brett Cannon added the comment:

I'm not torn so let that settle your torment. =) Considering we are talking 
about the standard library for a language that has a mantra of explicit is 
better than implicit I think worrying about an added line to very little code 
since so few people muck with this stuff is enough to not worry about it.

--

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



[issue20383] Add a keyword-only spec argument to types.ModuleType

2014-05-27 Thread Brett Cannon

Brett Cannon added the comment:

Why do you want a one-liner wrapper for the functions for the public API when 
they are exactly the same?

--

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



[issue21581] Consider dropping importlib.abc.Loader.create_module()

2014-05-27 Thread Brett Cannon

Brett Cannon added the comment:

This issue is not talking about dropping create_module() from the algorithm (I 
need it for the lazy loader), just from the ABC since it's a do-nothing 
implementation that doesn't have to be there.

Otherwise it should be made a required method and possibly even not have its 
``return None`` special-casing.

--

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



[issue20689] socket.AddressFamily is absent in html pydoc

2014-05-27 Thread STINNER Victor

STINNER Victor added the comment:

I found the culprit. The AddressFamily is not registered in _socket module. I 
created a preliminary patch to show the culprit.

That's not surprising, this type is created in socket (socket.py), not in 
_socket (the C module). Your patch is wrong.

--
nosy: +haypo

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



[issue21539] pathlib's Path.mkdir() should allow for mkdir -p functionality

2014-05-27 Thread Barry A. Warsaw

Changes by Barry A. Warsaw ba...@python.org:


--
nosy: +barry

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



[issue21539] pathlib's Path.mkdir() should allow for mkdir -p functionality

2014-05-27 Thread Barry A. Warsaw

Barry A. Warsaw added the comment:

I've just been writing some new code to use pathlib and ran into this one 
myself.  An exist_ok=False is fine, although it's a slight shame that for 
backward compatibility we can't adopt os.makedirs() signature exactly.

--

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



[issue18807] Allow venv to create copies, even when symlinks are supported

2014-05-27 Thread Dominic Cerquetti

Dominic Cerquetti added the comment:

Requesting re-open of this issue, using --closes to force no symlinks to be 
created still results in venv trying to create symlinks.

I'm using Python 3.4 with the following command inside a vagrant Ubuntu 14.04 
virtualbox image.  The folder is a SMB mount from a windows host, which does 
not allow symlinks.

Expected behavior: os.symlink() is never called when you run:
python3.4 -m venv --copies

Actual behavior: os.symlink() is still called in a few places such as:
http://hg.python.org/cpython/file/b8e4bb1e1090/Lib/venv/__init__.py
line: 147
line: 215

I have a fix for line 215 that I'm testing now (basically just need to call 
copier() instead of os.symlink()). 

I don't want to mess with line 147 due to it being OSX specific and I have no 
way to test it.  But in theory it should also just be a call to copier()

--
nosy: +Dominic.Cerquetti

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



[issue20383] Add a keyword-only spec argument to types.ModuleType

2014-05-27 Thread Eric Snow

Eric Snow added the comment:

You're right that it doesn't have to be a one-line wrapper or anything more 
than an import-from in importlib.util. :)

--

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



[issue21578] Misleading error message when ImportError called with invalid keyword args

2014-05-27 Thread Berker Peksag

Berker Peksag added the comment:

Thanks for the review, Eric. Here's a new patch.

--
Added file: http://bugs.python.org/file35381/issue21578_v2.diff

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



[issue16446] pdb raises BdbQuit on 'quit' when started with set_trace

2014-05-27 Thread Xavier de Gaye

Xavier de Gaye added the comment:

Yes the patch does change the semantics of the quit command:

* no change when pdb is run as a script or with 'python -m pdb 
script_name'. As stated in the doc, the 'quit command': Quit from the 
debugger. The program being executed is aborted.

* but when a set_trace() breakpoint is inserted, 'quit' just terminates the 
debugger and the program continues its execution. It is the purpose of the 
patch to prevent an inconvenient crash with BdbQuit in that case. The idea is 
that the hard-coded breakpoint was set to investigate a local problem and one 
may want to let it run afterwards (for example to check its behavior after 
having changed some its internal state with pdb).

Sorry, I should have documented that behavior change.

--

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



[issue21439] Numerous minor issues in Language Reference

2014-05-27 Thread Zachary Ware

Zachary Ware added the comment:

A few comments on the committed patch.  The quoted diff is trimmed to just the 
hunks I have comments on.

On Tue, May 27, 2014 at 12:21 AM, raymond.hettinger 
python-check...@python.org wrote:
 diff --git a/Doc/reference/compound_stmts.rst 
 b/Doc/reference/compound_stmts.rst
 --- a/Doc/reference/compound_stmts.rst
 +++ b/Doc/reference/compound_stmts.rst
 @@ -170,17 +170,25 @@
  A :keyword:`break` statement executed in the first suite terminates the loop
  without executing the :keyword:`else` clause's suite.  A :keyword:`continue`
  statement executed in the first suite skips the rest of the suite and 
 continues
 -with the next item, or with the :keyword:`else` clause if there was no next
 +with the next item, or with the :keyword:`else` clause if there is no next
  item.

 -The suite may assign to the variable(s) in the target list; this does not 
 affect
 -the next item assigned to it.
 +The for-loop makes assignments to the variables(s) in the target list.
 +This overwrites all previous assignments to those variables including
 +those made in the suite of the for-loop::
 +
 +   for i in range(10):
 +   print(i)
 +   i = 5 # this will not affect the for-loop
 + # be i will be overwritten with the next

Typo here, looks like an unfinished thought. because rather than be?

 + # index in the range
 +

  .. index::
 builtin: range

  Names in the target list are not deleted when the loop is finished, but if 
 the
 -sequence is empty, it will not have been assigned to at all by the loop.  
 Hint:
 +sequence is empty, they will not have been assigned to at all by the loop.  
 Hint:
  the built-in function :func:`range` returns an iterator of integers suitable 
 to
  emulate the effect of Pascal's ``for i := a to b do``; e.g., 
 ``list(range(3))``
  returns the list ``[0, 1, 2]``.

 diff --git a/Doc/reference/expressions.rst b/Doc/reference/expressions.rst
 --- a/Doc/reference/expressions.rst
 +++ b/Doc/reference/expressions.rst
 @@ -520,11 +521,11 @@

  The primary must evaluate to an object of a type that supports attribute
  references, which most objects do.  This object is then asked to produce the
 -attribute whose name is the identifier (which can be customized by overriding
 -the :meth:`__getattr__` method).  If this attribute is not available, the
 -exception :exc:`AttributeError` is raised.  Otherwise, the type and value of 
 the
 -object produced is determined by the object.  Multiple evaluations of the 
 same
 -attribute reference may yield different objects.
 +attribute whose name is the identifier.  This production can be customized by
 +overriding the :meth:`__getattr__` method).  If this attribute is not 
 available,

Orphaned ')' on this line.

 +the exception :exc:`AttributeError` is raised.  Otherwise, the type and 
 value of
 +the object produced is determined by the object.  Multiple evaluations of the
 +same attribute reference may yield different objects.


  .. _subscriptions:
 @@ -1244,10 +1245,9 @@
 lambda_expr: lambda [`parameter_list`]: `expression`
 lambda_expr_nocond: lambda [`parameter_list`]: `expression_nocond`

 -Lambda expressions (sometimes called lambda forms) have the same syntactic 
 position as
 -expressions.  They are a shorthand to create anonymous functions; the 
 expression
 -``lambda arguments: expression`` yields a function object.  The unnamed 
 object
 -behaves like a function object defined with ::
 +Lambda expressions (sometimes called lambda forms) are create anonymous

Unfinished thought here; are create - are used to create?

 +functions. The expression ``lambda arguments: expression`` yields a function
 +object.  The unnamed object behaves like a function object defined with ::

While we're here, the object is in fact named, its name (__name__) is 
lambda.  It's not a valid identifier, but it is its name.


 def lambda(arguments):
 return expression
 @@ -1310,13 +1310,15 @@

  .. index:: pair: operator; precedence

 -The following table summarizes the operator precedences in Python, from 
 lowest
 +The following table summarizes the operator precedence in Python, from lowest

This sentence still doesn't read correctly to me; the simplest fix that makes 
sense to my brain is to remove the (... summarizes operator precedence 
...).  I would welcome any other better wording.

  precedence (least binding) to highest precedence (most binding).  Operators 
 in
  the same box have the same precedence.  Unless the syntax is explicitly 
 given,
  operators are binary.  Operators in the same box group left to right (except 
 for
 -comparisons, including tests, which all have the same precedence and chain 
 from
 -left to right --- see section :ref:`comparisons` --- and exponentiation, 
 which
 -groups from right to left).
 +exponentiation, which groups from right to left).
 +
 +Note that comparisons, membership tests, and identity tests, 

[issue20689] socket.AddressFamily is absent in html pydoc

2014-05-27 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Ah, now I see what is wrong.

Actually AddressFamily is missing in text output of pydoc too. Because 
AddressFamily is not included in the __all__ list. SocketType is included, 
but this is different SocketType, SocketType from _socket (see issue20386).

Here is a patch which fixes this issue.

--
assignee:  - serhiy.storchaka
stage:  - patch review
versions: +Python 3.5
Added file: http://bugs.python.org/file35380/socket__all__.patch

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



[issue21439] Numerous minor issues in Language Reference

2014-05-27 Thread Zachary Ware

Changes by Zachary Ware zachary.w...@gmail.com:


--
stage: test needed - commit review

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



[issue20689] socket.AddressFamily is absent in pydoc output

2014-05-27 Thread Serhiy Storchaka

Changes by Serhiy Storchaka storch...@gmail.com:


--
title: socket.AddressFamily is absent in html pydoc - socket.AddressFamily is 
absent in pydoc output

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



[issue20689] socket.AddressFamily is absent in pydoc output

2014-05-27 Thread STINNER Victor

STINNER Victor added the comment:

I suggested to not document new enums of the socket module (ex: AddressFamily, 
SocketType) when they were added. I don't think that they should be part of 
Python public API.

--

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



[issue20140] UnicodeDecodeError in ntpath.py when home dir contains non-ascii signs

2014-05-27 Thread honglei jiang

honglei jiang added the comment:

Python:canopy-1.3.0.1715.win-x86_64\
OS:Win8.1 64

directory
'F:\\Flask\\EmberJS\\\xd6\xd0\xce\xc4\\Prj\\static'
os.path.isdir(directory)
True
filename
u'todomvc/architecture-examples/angularjs/index.html'
os.path.join(directory,filename)
Traceback (most recent call last):
  File 
c:\Users\honglei\AppData\Local\Enthought\Canopy\User\Lib\site-packages\flask\helpers.py,
 line 1, in module
# -*- coding: utf-8 -*-
  File 
C:\Users\honglei\AppData\Local\Enthought\Canopy\App\appdata\canopy-1.3.0.1715.win-x86_64\Lib\ntpath.py,
 line 108, in join
path += \\ + b
UnicodeDecodeError: 'ascii' codec can't decode byte 0xd6 in position 17: 
ordinal not in range(128)

f=os.path.join(directory.decode(sys.getfilesystemencoding()),filename)
os.path.isfile(f)
True

--
nosy: +jhonglei

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



[issue11468] Improve unittest basic example in the doc

2014-05-27 Thread Zachary Ware

Changes by Zachary Ware zachary.w...@gmail.com:


--
nosy: +zach.ware

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



[issue18807] Allow venv to create copies, even when symlinks are supported

2014-05-27 Thread Vinay Sajip

Vinay Sajip added the comment:

While you may be right about line 215, line 147 isn't analogous, because in the 
latter case it's a symlink to a directory. We don't really want the entire lib 
directory tree *copied* into lib64 (and in any case, the populating of lib will 
happen much after venv creatuion, when things are installed into the venv: a 
copy is of no use here).

--

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



[issue17172] Add turtledemo to IDLE menu

2014-05-27 Thread Lita Cho

Lita Cho added the comment:

I am currently in the process of editing this patch such that the Turtle Demo 
launches from the Help Menu and spawns a separate process. 

However, I am deciding whether if the separate process should be asynchronous 
or not. Currently, I have it working with the subprocess module, but the IDLE 
window is hanging. 

I can use the multiprocess module or Popen to make it asynchronous. However, I 
am not sure where the clean-up should happen once the turtle process has been 
terminated.

--

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



[issue21539] pathlib's Path.mkdir() should allow for mkdir -p functionality

2014-05-27 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Le 27/05/2014 20:32, Barry A. Warsaw a écrit :

 I've just been writing some new code to use pathlib and ran into
 this
one myself. An exist_ok=False is fine, although it's a slight shame that
for backward compatibility we can't adopt os.makedirs() signature exactly.

What do you mean by that? The os.makedirs() signature is 
os.makedirs(name, mode=0o777, exist_ok=False)

--

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



[issue21539] pathlib's Path.mkdir() should allow for mkdir -p functionality

2014-05-27 Thread Barry A. Warsaw

Barry A. Warsaw added the comment:

On May 27, 2014, at 08:48 PM, Antoine Pitrou wrote:

What do you mean by that? The os.makedirs() signature is 
os.makedirs(name, mode=0o777, exist_ok=False)

Right, but this is Path.mkdir's signature:

Path.mkdir(mode=0o777, parents=False)

so it's too late to make exist_ok=False the second argument (i.e. the one
after `mode`).  Oh well.

--

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



[issue21578] Misleading error message when ImportError called with invalid keyword args

2014-05-27 Thread Eric Snow

Eric Snow added the comment:

Looks good to me.  Thanks for doing this.  If no one objects in the meantime, 
I'll commit this in a few days.

--
assignee:  - eric.snow
stage: patch review - commit review

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



[issue18807] Allow venv to create copies, even when symlinks are supported

2014-05-27 Thread Dominic Cerquetti

Dominic Cerquetti added the comment:

Preliminary patch for line 215, per earlier description.

While this doesn't appear to break anything and creates both copies and 
symlinks correctly, I do have these four failing unit tests:

test_multiprocessing_fork 
test_multiprocessing_forkserver
test_multiprocessing_main_handling 
test_multiprocessing_spawn

I don't have time right now to look into it to see if they're related to my 
change (at first glance, it looks like not).

--
keywords: +patch
Added file: http://bugs.python.org/file35382/venv-symlink-fix.patch

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



[issue18807] Allow venv to create copies, even when symlinks are supported

2014-05-27 Thread Dominic Cerquetti

Dominic Cerquetti added the comment:

Ok cool, as you said line 215 then seems to be the only one that needs it.

--

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



[issue17172] Add turtledemo to IDLE menu

2014-05-27 Thread Raymond Hettinger

Raymond Hettinger added the comment:

 the IDLE window is hanging

Check to make sure it is actually hung.  The event-loop can make it look hung 
but it is actually just waiting for an event.  An IDLE restart suffices to kill 
it sometimes.

--

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



[issue11468] Improve unittest basic example in the doc

2014-05-27 Thread Raymond Hettinger

Raymond Hettinger added the comment:

FWIW, I'm going to test some other module (math or somesuch) rather than the 
built-in string methods.  The normal use of unittest is to import both the 
unittest module and the module under test.  I want to show that pattern (which 
is somewhat different from doctests where the tests are typically in the same 
file as the code being tested).

--

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



[issue17172] Add turtledemo to IDLE menu

2014-05-27 Thread Lita Cho

Lita Cho added the comment:

Okay, maybe hanging is not the right word. The IDLE window becomes busy since 
it spawned off the Turtle demo subprocess, and it is waiting for the subprocess 
to finish. After I close the Turtle window, it returns back to normal.

I was wondering if the Turtle Demo should be a separate asynchronous process so 
that users could use the IDLE window as well as the Turtle demo.

--

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



[issue18132] buttons in turtledemo disappear on small screens

2014-05-27 Thread Terry J. Reedy

Changes by Terry J. Reedy tjre...@udel.edu:


--
nosy: +terry.reedy

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



[issue17172] Add turtledemo to IDLE menu

2014-05-27 Thread Lita Cho

Lita Cho added the comment:

I currently have a patch where the Turtle Demo now shows up in the Help menu 
rather than in File menu.

I also have it such that Turtle is now launched as a separate process rather 
than within the IDLE process. Currently, the commend is calling ./python.exe so 
it uses my build of Python rather than my system's python. But I can change 
that once people agree this is the right way to go.

--
Added file: http://bugs.python.org/file35383/turtle_demo.patch

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



[issue3015] tkinter with wantobjects=False has been broken for some time

2014-05-27 Thread Lita Cho

Lita Cho added the comment:

Serhiy, does that mean this is fixed the way it is? Do I need to do anything 
else to close out this issue? It looks like wantobjects is set to False, 
currently.

--

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



[issue6639] turtle: _tkinter.TclError: invalid command name .10170160

2014-05-27 Thread Lita Cho

Lita Cho added the comment:

So I have a patch that fixes the original problem, but doesn't fix the crash 
with the tdemo_round_dance.py. However, I was wondering why 
TurtleScreen._RUNNING = True in the _destroy method. Can anyone shed some light 
on this? Here is the current state of my patch.

--
keywords: +patch
Added file: http://bugs.python.org/file35384/turtle_bug.patch

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



[issue21208] Change default behavior of arguments with type bool when options are specified

2014-05-27 Thread paul j3

paul j3 added the comment:

Last year someone asked on Stackoverflow about using 'type=bool'.  My answer is 
at:

http://stackoverflow.com/questions/15008758/parsing-boolean-values-with-argparse/19233287#19233287

'type' is supposed to be a function that takes a string, and converts to a 
desired Python object (e.g. number), and in the process validates it.

The builtin 'bool()' is not a good choice for this. 'bool()' returns False, 
all other strings return True, that includes strings like false, no, 
False.  If you want those strings to be interpreted as boolean False, you 
need to write your own 'str2bool' function.

But normally boolean values are entered via 'store_true' and 'store_false' 
actions.

--
nosy: +paul.j3

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



[issue21416] argparse should accept bytes arguments as originally passed

2014-05-27 Thread paul j3

paul j3 added the comment:

Two points to keep in mind:

'argparse' works with 'sys.argv[1:]'.  If that does not contain what you want, 
then you can pass your own 'argv' to 'parse_args'.

'type=bytes' means, call the builtin 'bytes' function with one of the argv 
strings. If 'bytes' does not handle the string as you want, then you need to 
write your own function.

--
nosy: +paul.j3

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



[issue21416] argparse should accept bytes arguments as originally passed

2014-05-27 Thread paul j3

paul j3 added the comment:

'invalid bytes value' is the error message generated by 'argparse'.  The 
underlying error (for a string like 'xxx') is:

print(bytes(sys.argv[1]))
TypeError: string argument without an encoding

You could use 'bytes' if you somehow supply the encoding, as in:

def mybytes(astr):
   return bytes(astr, 'utf-8')

--

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



[issue10523] argparse has problem parsing option files containing empty rows

2014-05-27 Thread paul j3

Changes by paul j3 ajipa...@gmail.com:


--
nosy: +paul.j3

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



[issue17172] Add turtledemo to IDLE menu

2014-05-27 Thread Terry J. Reedy

Terry J. Reedy added the comment:

I think a patch should reuse the run module function that Idle already has. No 
need to re-invent something. I will say more tomorrow after sleeping.

--

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



[issue1683368] object.__init__ shouldn't allow args/kwds

2014-05-27 Thread Jason R. Coombs

Jason R. Coombs added the comment:

I recently ran into this error again. I was writing this class to provide 
backward-compatible context manager support for zipfile.ZipFile on Python 2.6 
and 3.1:

class ContextualZipFile(zipfile.ZipFile):

Supplement ZipFile class to support context manager for Python 2.6


def __enter__(self):
return self

def __exit__(self, type, value, traceback):
self.close()

def __new__(cls, *args, **kwargs):

Construct a ZipFile or ContextualZipFile as appropriate

if hasattr(zipfile.ZipFile, '__exit__'):
return zipfile.ZipFile(*args, **kwargs)
return super(ContextualZipFile, cls).__new__(cls, *args, **kwargs)


At the point where super is called, the author is unaware of the details of the 
function signature for zipfile.ZipFile.__new__, so simply passes the same 
arguments as were received by the derived class. However, this behavior raises 
a DeprecationWarning on Python 2.6 and 3.1 (and would raise an error on Python 
3.2 if the code allowed it).

What's surprising is that the one cannot simply override a constructor or 
initializer without knowing in advance which of those methods are implemented 
(and with what signature) on the parent class.

It seems like the construction (calling of __new__) is special-cased for 
classes that don't implement __new__.

What is the proper implementation of ContextualZipFile.__new__? Should it use 
super but omit the args and kwargs? Should it call object.__new__ directly? 
Should it check for the existence of __new__ on the parent class (or compare it 
to object.__new__)?

--

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



[issue20430] Make argparse.SUPPRESS work as an argument dest

2014-05-27 Thread paul j3

paul j3 added the comment:

If we make this change to '_StoreAction', we need to do it to 4 other 
subclasses which take the same 'setattr(namespace, self.dest, values)'.

An alternative would be to define a 'Namespace' function that does this 
conditional 'setattr'.

How should this 'SUPPRESS' affect the usage and help?  I'm seeing --foo 
==SUPPRESS==.

Do you have practical need for such a 'SUPPRESS', or are you just trying to 
make behavior consistent?  'SUPPRESS' is used for '--help' and subparsers 
because those Actions have important side effects, and we don't want default 
values to appear in the Namespace.  With '_StoreAction', the only effect is to 
store a value in the Namespace.

--
nosy: +paul.j3

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



[issue1683368] object.__init__ shouldn't allow args/kwds

2014-05-27 Thread Jason R. Coombs

Jason R. Coombs added the comment:

I recently ran into this error again. I was writing this class to provide 
backward-compatible context manager support for zipfile.ZipFile on Python 2.6 
and 3.1:

class ContextualZipFile(zipfile.ZipFile):

Supplement ZipFile class to support context manager for Python 2.6


def __enter__(self):
return self

def __exit__(self, type, value, traceback):
self.close()

def __new__(cls, *args, **kwargs):

Construct a ZipFile or ContextualZipFile as appropriate

if hasattr(zipfile.ZipFile, '__exit__'):
return zipfile.ZipFile(*args, **kwargs)
return super(ContextualZipFile, cls).__new__(cls, *args, **kwargs)


At the point where super is called, the author is unaware of the details of the 
function signature for zipfile.ZipFile.__new__, so simply passes the same 
arguments as were received by the derived class. However, this behavior raises 
a DeprecationWarning on Python 2.6 and 3.1 (and would raise an error on Python 
3.2 if the code allowed it).

What's surprising is that the one cannot simply override a constructor or 
initializer without knowing in advance which of those methods are implemented 
(and with what signature) on the parent class.

It seems like the construction (calling of __new__) is special-cased for 
classes that don't implement __new__.

What is the proper implementation of ContextualZipFile.__new__? Should it use 
super but omit the args and kwargs? Should it call object.__new__ directly? 
Should it check for the existence of __new__ on the parent class (or compare it 
to object.__new__)?

--

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



[issue9351] argparse set_defaults on subcommands should override top level set_defaults

2014-05-27 Thread paul j3

Changes by paul j3 ajipa...@gmail.com:


--
nosy: +paul.j3

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