[issue22395] test_pathlib error for complex symlinks on Windows

2014-09-13 Thread Justin Foo

Justin Foo added the comment:

The failing tests were:

* test_complex_symlinks_absolute
* test_complex_symlinks_relative
* test_complex_symlinks_relative_dot_dot

for both PathTest and WindowsPathTest, via inheritance from the _BasePathTest 
class.

--

___
Python tracker 

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



[issue22388] Unify style of "Contributed by" notes

2014-09-13 Thread R. David Murray

R. David Murray added the comment:

Yep, that's exactly the logic I used for "trailing parenthetical
sentence" versus "trailing parenthetical paragraph": whether or not what
was being referenced was a single paragraph for a block of paragraphs.

I went through and made 3.4 consistent, so there should be no changes
there.  Likewise the editors of earlier whats new should have made those
consistent, and it is probably best not to second guess the editor
absent a glaring typo.

If you want to make 3.5 "currently consistent" by all means do so.
However, a final edit pass (or passes) will be needed at release time
whatever you do now.

--

___
Python tracker 

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



[issue22388] Unify style of "Contributed by" notes

2014-09-13 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

If don't make these editions now, inconsistent lines will provoke inconsistency 
in future additions.

--

___
Python tracker 

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



[issue22384] Tk.report_callback_exception kills process when run with pythonw.exe

2014-09-13 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
keywords: +needs review
nosy: +terry.reedy

___
Python tracker 

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



[issue22220] Ttk extensions test failure

2014-09-13 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
resolution:  -> works for me
stage: test needed -> resolved
status: open -> closed

___
Python tracker 

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



[issue22398] Tools/msi enhancements for 2.7

2014-09-13 Thread Berker Peksag

Changes by Berker Peksag :


--
stage: patch review -> resolved

___
Python tracker 

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



[issue22384] Tk.report_callback_exception kills process when run with pythonw.exe

2014-09-13 Thread Terry J. Reedy

Terry J. Reedy added the comment:

In a pythonw process, stdout and stderr are initially None unless and until 
changed.  (This is something we need to do for the Idle process itself.)  
Writing to None generates an AttributeError. Uncaught exceptions stop the 
Python process.

The patch works, for this particular case, in the sense of preventing process 
termination.  Print suppresses the exception-reporting exception (after trying 
sys.stdout as a backup).  It still fails at delivering the original exception 
message and traceback. 'Click', and nothing happens.

A developer need to see the specific message and users should at least know 
that something is wrong. The following alternate delivers the message in 
addition to suppressing the AttributeError. It is a a copy and paste 
replacement for the existing "def report_callback_exception" statement. (It was 
easier for me to experiment with my installed, non-repository Pythons).

class _Errbox:
def __init__(self):
self.txt=[]
from tkinter.messagebox import showerror
self.showerror = showerror
def write(self, txt):
self.txt.append(txt)
def show(self):
self.showerror(
title="Exception in Tkinter callback",
message=''.join(self.txt))
self.txt = []
def report_callback_exception(self, exc, val, tb):
"""Internal function. It reports exception on sys.stderr."""
import traceback
try:
sys.stderr.write("Exception in Tkinter callback\n")
efile = sys.stderr
except AttributeError:
efile = self._Errbox()
sys.last_type = exc
sys.last_value = val
sys.last_traceback = tb
traceback.print_exception(exc, val, tb, file=efile)
if isinstance(efile, self._Errbox):
efile.show()

I checked and this is the only direct .write in the file. There is only one 
other print (to the default sys.stdout).

--

___
Python tracker 

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



[issue22400] Stable API broken on Windows for PyUnicode_*

2014-09-13 Thread Jeremy Kloth

New submission from Jeremy Kloth:

When using any of the PyUnicode_* functions in an extension module compiled 
with Py_LIMITED_API defined, the resulting module cannot be imported due to:

ImportError: DLL load failed: The specified procedure could not be found.

Upon investigation, the error is in the EXPORTS for PC\python3.def.  The 
PyUnicode_* functions still refer to the old PyUnicodeUCS2_* variants.

--
components: Extension Modules, Windows
messages: 226856
nosy: jkloth, loewis, steve.dower, zach.ware
priority: normal
severity: normal
status: open
title: Stable API broken on Windows for PyUnicode_*
versions: Python 3.3, Python 3.4, Python 3.5

___
Python tracker 

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



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

2014-09-13 Thread Akira Li

Akira Li added the comment:

if PEP 431 is implemented (or anything that gives access to zoneinfo)
then strptime could extend the list of timezones it accepts (utc + 
local timezone names) to include names from the tz database:

  import pytz # $ pip install pytz

  {tzname for tz in map(pytz.timezone, pytz.all_timezones) 
   for _, _, tzname in getattr(tz, '_transition_info', [])}

It includes EST.

--
nosy: +akira

___
Python tracker 

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



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

2014-09-13 Thread Akira Li

Akira Li added the comment:

Without %z (utc offset) strptime returns a naive datetime object that
is interpreted as utc or local time usually.

It might explain why %Z tries to match only utc and the local timezone
names.

--

___
Python tracker 

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



[issue12916] Add inspect.splitdoc

2014-09-13 Thread Martin Panter

Martin Panter added the comment:

Although it is not documented, inspect.getdoc() may return None instead of a 
documentation string. In patch 2, inspect.splitdoc() only accepts a string; 
perhaps it should also accept None? Otherwise you might have to use it like 
this:

[summary, body] = splitdoc(getdoc(api) or "")

--

___
Python tracker 

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



[issue20631] python readline module crashing on NULL access

2014-09-13 Thread Benjamin Peterson

Benjamin Peterson added the comment:

Why does _py_get_history_length return a positive value if there's no line 
available?

--
nosy: +benjamin.peterson

___
Python tracker 

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



[issue20631] python readline module crashing on NULL access

2014-09-13 Thread Arfrever Frehtes Taifersar Arahesis

Changes by Arfrever Frehtes Taifersar Arahesis :


--
nosy: +Arfrever

___
Python tracker 

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



[issue21998] asyncio: a new self-pipe should be created in the child process after fork

2014-09-13 Thread Yury Selivanov

Yury Selivanov added the comment:

It's not that it doesn't work after fork, right? Should we add a recipe with 
pid monitoring a self-pipe re-initialization?

--

___
Python tracker 

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



[issue22401] argparse: 'resolve' conflict handler damages the actions of the parent parser

2014-09-13 Thread paul j3

New submission from paul j3:

When there's a conflict involving an argument that was added via 'parents', and 
the conflict handler is 'resolve', the action in the parent parser may be 
damaged, rendering that parent unsuitable for further use.

In this example, 2 parents have the same '--config' argument:
  
parent1 = argparse.ArgumentParser(add_help=False) 
parent1.add_argument('--config')

parent2 = argparse.ArgumentParser(add_help=False)
parent2.add_argument('--config')

parser = argparse.ArgumentParser(parents=[parent1,parent2],
conflict_handler='resolve')

The actions of the 3 parsers are (from the ._actions list):

   (id,  dest,option_strings)
parent1:  [(3077384012L, 'config', [])]# empty option_strings

parent2:  [(3076863628L, 'config', ['--config'])]

parser:   [(3076864428L, 'help', ['-h', '--help']),
   (3076863628L, 'config', ['--config'])]  # same id

The 'config' Action from 'parent1' is first copied to 'parser' by reference 
(this is important).  When 'config' from 'parent2' is copied, there's a 
conflict.  '_handle_conflict_resolve()' attempts to remove the first Action, so 
it can add the second.  But in the process it ends up deleting the 
'option_strings' values from the original action.

So now 'parent1' has an action in its 'optionals' argument group with an empty 
option_strings list.  It would display as an 'optionals' but parse as a 
'positionals'.  'parent1' can no longer be safely used as a parent for another 
(sub)parser, nor used as a parser itself.

The same sort of thing would happen, if, as suggested in the documentation:

"Sometimes (e.g. when using parents_) it may be useful to simply
 override any older arguments with the same option string." 

In test_argparse.py, 'resolve' is only tested once, with a simple case of two 
'add_argument' statements.  The 'parents' class tests a couple of cases of 
conflicting actions (for positionals and optionals), but does nothing with the 
'resolve' handler.

--

Possible fixes:

- change the documentation to warn against reusing such a parent parser

- test the 'resolve' conflict handler more thoroughly

- rewrite this conflict handler so it does not modify the action in the parent

- possibly change the 'parents' mechanism so it does a deep copy of actions.

References:

http://stackoverflow.com/questions/25818651/argparse-conflict-resolver-for-options-in-subcommands-turns-keyword-argument-int

http://bugs.python.org/issue15271 
argparse: repeatedly specifying the same argument ignores the previous ones

http://bugs.python.org/issue19462
Add remove_argument() method to argparse.ArgumentParser

http://bugs.python.org/issue15428
add "Name Collision" section to argparse docs

--
assignee: docs@python
components: Documentation, Library (Lib), Tests
messages: 226862
nosy: docs@python, paul.j3
priority: normal
severity: normal
status: open
title: argparse: 'resolve' conflict handler damages the actions of the parent 
parser
type: behavior
versions: Python 3.5

___
Python tracker 

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