[issue22097] Linked list API for ordereddict

2014-07-29 Thread Martin v . Löwis

Martin v. Löwis added the comment:

ISTM that a dictionary is not the proper data structure for an instruction 
list. The support for the Mapping interface is not needed at all (AFAICT).

It's possible to make a list implementation with O(1) insert_after, using the 
same strategy that OrderedDict uses (i.e. maintain a mapping from value to link 
element).

--
nosy: +loewis

___
Python tracker 

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



[issue22096] Argument Clinic: add ability to specify an existing impl function

2014-07-29 Thread Martin v . Löwis

Martin v. Löwis added the comment:

I don't think it it is worth the effort. You would need two different entry 
functions still, to allow error messages to refer to the function name. Since 
the _impl functions can trivially call each other, the saving in lines of code 
are minimal, and from a code reading point of view, having aliases actually 
complicates the code.

--
nosy: +loewis

___
Python tracker 

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



[issue22089] collections.MutableSet does not provide update method

2014-07-29 Thread Akira Li

Akira Li added the comment:

Set has no __ior__ method but MutableSet has:

  class MySet(MutableSet):
  update = MutableSet.__ior__

Unlike set.__ior__; MutableSet.__ior__ accepts an arbitrary iterable
and therefore MutableSet.update is redundant.

set.__ior__ doesn't accept an arbitrary iterable:

  >>> s = set()
  >>> s.update('ab')
  >>> s |= 'ab'
  Traceback (most recent call last):
File "", line 1, in 
  TypeError: unsupported operand type(s) for |=: 'set' and 'str'
  >>> s |= set('ab')
  >>> s
  {'a', 'b'}

MutableSet.__ior__ does accept an arbitrary iterable:

  from collections.abc import MutableSet
  
  class UpperSet(MutableSet):
  """Like set() but stores items in upper case."""
  def __init__(self, iterable=()):
  self._set = set()
  self |= iterable
  def _key(self, item):
  return item.upper()
  update = MutableSet.__ior__
  
  # implement MutableSet abstract methods
  def __contains__(self, item):
  return self._key(item) in self._set
  def __iter__(self):
  return iter(self._set)
  def __len__(self):
  return len(self._set)
  def add(self, item):
  self._set.add(self._key(item))
  def discard(self, item):
  self._set.discard(self._key(item))
  
Example:

  s = UpperSet('σs')
  assert 'σ' in s and 'Σ' in s and 'S' in s and 'ς' in s and 'ſ' in s
  s.update('dzẞ') # or s |= 'dzẞ'
  assert 'Dz' in s and 'DZ' in s and 'ß' not in s and 'SS' not in s
  s |= 'ß' # or s.update('ß')
  assert s == {'Σ', 'S', 'DZ', 'ẞ', 'SS'}

--
nosy: +akira

___
Python tracker 

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



[issue22086] Tab indent no longer works in interpreter

2014-07-29 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
nosy: +pitrou

___
Python tracker 

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



[issue22097] Linked list API for ordereddict

2014-07-29 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

About your use case. Note that all indices after inserted element should be 
shifted. If you inserted more than one statement in the same ir_block, all but 
first insertions can be at wrong position.

--

___
Python tracker 

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



[issue22096] Argument Clinic: add ability to specify an existing impl function

2014-07-29 Thread Larry Hastings

Larry Hastings added the comment:

I'm with Martin. It would be a funny exception, where the reader'd get 
confused... why is the impl missing? 

Also, any halfway-decent optimizer will inline the impl into the parsing 
function, so this has no runtime cost.

--

___
Python tracker 

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



[issue22086] Tab indent no longer works in interpreter

2014-07-29 Thread Ezio Melotti

Changes by Ezio Melotti :


--
nosy: +ezio.melotti
stage:  -> needs patch
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



[issue21725] RFC 6531 (SMTPUTF8) support in smtpd

2014-07-29 Thread R. David Murray

R. David Murray added the comment:

You can use test.support.captured_stdout or whatever its name is.

--

___
Python tracker 

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



[issue14452] SysLogHandler sends invalid messages when using unicode

2014-07-29 Thread Daniel Pocock

Daniel Pocock added the comment:

As a workaround, Python 3.2 users can clobber the global variable codecs like 
this from their own init code:

logging.handlers.codec = None

There is a more complete example here:

https://github.com/dpocock/python-rfc5424-logging-formatter

--
nosy: +pocock

___
Python tracker 

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



[issue22097] Linked list API for ordereddict

2014-07-29 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Le 29/07/2014 07:09, Serhiy Storchaka a écrit :
>
> About your use case. Note that all indices after inserted element
should be shifted. If you inserted more than one statement in the same
ir_block, all but first insertions can be at wrong position.

Thanks for noticing! This is precisely why I'm not using indices, and 
why a regular sequence isn't fit for the use case.

--

___
Python tracker 

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



[issue11212] Python memory limit on AIX

2014-07-29 Thread David Edelsohn

David Edelsohn added the comment:

Setting the environment variable LDR_CNTRL is discouraged.  It is much better 
to set the value in the executable header. Best to set it at link time, but one 
can use ldedit.

The issue with the segments in 32 bit mode is a trade off between heap memory 
and shmat attached shared memory. If one wanted to use Python with some forms 
of shared memory, one cannot allocate all of the segments to heap. Setting 
maxdata too large can cause unexpected failures if shared memory is used.

Increasing the default maxdata value seems like a good idea. The default GCC 
for AIX builds with a larger value. But it adds the command to LDFLAGS, which 
is applied everywhere, but not a significant problem and cc1* do not use shared 
memory.

One subtlety with LDFLAG is XLC wants the flag directly (-bmaxdata:0x4000) 
but GCC needs to use -Wl,-bmaxdata.

--

___
Python tracker 

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



[issue22097] Linked list API for ordereddict

2014-07-29 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Le 29/07/2014 05:40, Martin v. Löwis a écrit :
>
> ISTM that a dictionary is not the proper data structure for an
instruction list. The support for the Mapping interface is not needed at
all (AFAICT).

This is true.

> It's possible to make a list implementation with O(1) insert_after,
using the same strategy that OrderedDict uses (i.e. maintain a mapping
from value to link element).

Are you suggesting the collections module is ready for a linked list 
implementation to go into it?

--

___
Python tracker 

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



[issue21704] _multiprocessing module builds incorrectly when POSIX semaphores are disabled

2014-07-29 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 1a00be3d79bc by Ezio Melotti in branch '3.4':
#21704: remove duplicate name in Misc/ACKS.
http://hg.python.org/cpython/rev/1a00be3d79bc

New changeset 723e0a7c4914 by Ezio Melotti in branch 'default':
#21704: merge with 3.4.
http://hg.python.org/cpython/rev/723e0a7c4914

--

___
Python tracker 

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



[issue21704] _multiprocessing module builds incorrectly when POSIX semaphores are disabled

2014-07-29 Thread Arfrever Frehtes Taifersar Arahesis

Changes by Arfrever Frehtes Taifersar Arahesis :


--
resolution:  -> fixed
stage: patch review -> 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



[issue21591] "exec(a, b, c)" not the same as "exec a in b, c" in nested functions

2014-07-29 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 33fb5600e9a1 by Dirkjan Ochtman in branch '2.7':
Issue #21591: Handle exec backwards compatibility in the AST builder.
http://hg.python.org/cpython/rev/33fb5600e9a1

New changeset 6c47c6d2033e by Robert Jordens in branch '2.7':
Issue #21591: add test for qualified exec in tuple form.
http://hg.python.org/cpython/rev/6c47c6d2033e

--
nosy: +python-dev

___
Python tracker 

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



[issue21591] "exec(a, b, c)" not the same as "exec a in b, c" in nested functions

2014-07-29 Thread Dirkjan Ochtman

Dirkjan Ochtman added the comment:

Thanks to Victor Stinner for the review!

--
resolution:  -> fixed
status: open -> closed

___
Python tracker 

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



[issue22100] Use $HOSTPYTHON when determining candidate interpreter for $PYTHON_FOR_BUILD.

2014-07-29 Thread Shiz

New submission from Shiz:

Currently, when cross-compiling, the configure script doesn't take $HOSTPYTHON 
into account when determining $PYTHON_FOR_BUILD. This can lead to a wrong 
Python interpreter being used for several critical cross-compilation stages, 
leading to compilation errors[1].

Attached is a patch which makes it take $HOSTPYTHON into account, thus solving 
said issues, diffed against the current hg tip, 723e0a7c4914.

[1]: https://github.com/rave-engine/python3-android/issues/1 (the last issue in 
the report)

--
components: Cross-Build
files: Python-hg-723e0a7c4914-fix-PYTHON_FOR_BUILD-detection.patch
keywords: patch
messages: 224230
nosy: shiz
priority: normal
severity: normal
status: open
title: Use $HOSTPYTHON when determining candidate interpreter for 
$PYTHON_FOR_BUILD.
type: enhancement
versions: Python 3.5
Added file: 
http://bugs.python.org/file36150/Python-hg-723e0a7c4914-fix-PYTHON_FOR_BUILD-detection.patch

___
Python tracker 

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



[issue22097] Linked list API for ordereddict

2014-07-29 Thread Martin v . Löwis

Martin v. Löwis added the comment:

> Are you suggesting the collections module is ready for a linked list 
> implementation to go into it?

I don't know about the collections module. All I'm saying is that
a linked list with an efficient insert_after(x) could be implemented.
I'm not seeing one on PyPI, so if this was a desirable thing to have
in the standard library, it should probably have a life on PyPI first.

--

___
Python tracker 

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



[issue22097] Linked list API for ordereddict

2014-07-29 Thread Antoine Pitrou

Antoine Pitrou added the comment:

> I don't know about the collections module. All I'm saying is that
> a linked list with an efficient insert_after(x) could be implemented.
> I'm not seeing one on PyPI

See https://pypi.python.org/pypi/llist/
(and probably others)

--

___
Python tracker 

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



[issue22097] Linked list API for ordereddict

2014-07-29 Thread Martin v . Löwis

Martin v. Löwis added the comment:

Am 29.07.14 17:41, schrieb Antoine Pitrou:
> 
> Antoine Pitrou added the comment:
> 
>> I don't know about the collections module. All I'm saying is that
>> a linked list with an efficient insert_after(x) could be implemented.
>> I'm not seeing one on PyPI
> 
> See https://pypi.python.org/pypi/llist/
> (and probably others)

This does not meet your requirement of supporting insert_after(x),
its insert(x, before) requires to give a dllistnode. To support that,
it would need a mapping from list item value to list link element,
which it doesn't have.

--

___
Python tracker 

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



[issue22097] Linked list API for ordereddict

2014-07-29 Thread Antoine Pitrou

Antoine Pitrou added the comment:

> This does not meet your requirement of supporting insert_after(x),
> its insert(x, before) requires to give a dllistnode.

Indeed it lacks that piece of prettiness in the API. And adding a mapping to 
allow lookups from item to node really means using a orderedset or 
ordereddict-like structure. Which is why I was proposing to reuse the existing 
infrastructure.

(note that I *cannot* reuse it from my own third-party class, since the 
necessary bits are all internal)

Still you may make the point that ordereddict is not appropriate, andorderedset 
would be better for this API. Raymond, would you support adding an orderedset 
to the collections module?

--

___
Python tracker 

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



[issue22038] Implement atomic operations on non-x86 platforms

2014-07-29 Thread Vitor de Lima

Vitor de Lima added the comment:

Implemented a new version of the patch using either gcc builtins or the 
stdatomic.h header (this is detected by the configure script).

--
Added file: http://bugs.python.org/file36151/atomicv2.patch

___
Python tracker 

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



[issue18174] Make regrtest with --huntrleaks check for fd leaks

2014-07-29 Thread Charles-François Natali

Charles-François Natali added the comment:

> Richard Oudkerk added the comment:
>
> I can't remember why I did not use fstat() -- probably it did not occur to me.

I probably have Alzeihmer, I was sure I heard a reasonable case for
dup() vs fstat().
The only thing I can think of is that fstat() can incur I/O, whereas
dup() shouldn't.

In any case, I too prefer fstat(), since it doesn't require creating a
new FD (which could fail with EMFILE/ENFILE), and is more logical.

The only comment I have about this patch is I think that the helper
function to detect the number of open FD might have its place in
test.support.

--

___
Python tracker 

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



[issue17751] ctypes/test/test_macholib.py fails when run from the installed location

2014-07-29 Thread Mark Lawrence

Mark Lawrence added the comment:

Can we have the opinions of our testing experts please.

--
nosy: +BreamoreBoy, ezio.melotti, michael.foord, pitrou
versions: +Python 3.5 -Python 3.3, Python 3.4

___
Python tracker 

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



[issue22100] Use $HOSTPYTHON when determining candidate interpreter for $PYTHON_FOR_BUILD.

2014-07-29 Thread Shiz

Changes by Shiz :


--
versions: +Python 3.3, Python 3.4

___
Python tracker 

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



[issue22003] BytesIO copy-on-write

2014-07-29 Thread David Wilson

David Wilson added the comment:

I suspect it's all covered now, but is there anything else I can help with to 
get this patch pushed along its merry way?

--

___
Python tracker 

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



[issue18174] Make regrtest with --huntrleaks check for fd leaks

2014-07-29 Thread Antoine Pitrou

Antoine Pitrou added the comment:

fstat() can do I/O, or can fail for other reasons. If you don't want to create 
a new fd, I think you can do dup2(fd, fd).

I don't understand the reason for the following code:

+def check_handle_deltas(deltas):
+return abs(sum(deltas)) >= min(3, len(deltas))

Can you add a comment?

--
nosy: +pitrou

___
Python tracker 

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



[issue22049] argparse: type= doesn't honor nargs > 1

2014-07-29 Thread Chris Bruner

Chris Bruner added the comment:

Just had a chance to try this, and this does exactly what I wanted from
"type=". Thank you!

On Fri, Jul 25, 2014 at 4:17 PM, paul j3  wrote:

>
> paul j3 added the comment:
>
> What you want is a custom Action rather than a custom Type.
>
> from the documentation:
>
> >>> class FooAction(argparse.Action):
> ... def __call__(self, parser, namespace, values,
> option_string=None):
> ... print('%r %r %r' % (namespace, values, option_string))
> ... setattr(namespace, self.dest, values)
>
> 'values' will be the list ['1','2','3'], which you test and manipulate,
> before finally saving it to the 'namespace'.
>
> ret = (int(values[0]), int(values[1]), float(values[2]))
> setattr(namespace, self.dest, ret)
>
> Setting 'nargs=3' ensures that this action will always get a 3 item list.
>  If the parser can't give it 3 items, it will raise an error rather than
> call your Action.
>
> 'optparse' passed the remaining argument strings to Option's callback,
> which could consume as many as it wanted.  'argparse' does not give the
> Actions that power.  There is a fundamental difference in the parsing
> algorithm.
>
> --
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

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



[issue18174] Make regrtest with --huntrleaks check for fd leaks

2014-07-29 Thread STINNER Victor

STINNER Victor added the comment:

> fstat() can do I/O, or can fail for other reasons.

Oh, I forgot this reason. Maybe we should add a comment to explain that. I mean 
in the patch for this issue but also in is_valid_fd() (Python/pythonrun.c).

--

___
Python tracker 

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



[issue11969] Can't launch multiproccessing.Process on methods

2014-07-29 Thread Mark Lawrence

Mark Lawrence added the comment:

This works perfectly on 64 bit Windows 8.1 for 3.4.1 and 3.5.0a0.

--
nosy: +BreamoreBoy

___
Python tracker 

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



[issue11969] Can't launch multiproccessing.Process on methods

2014-07-29 Thread Ram Rachum

Ram Rachum added the comment:

Confirmed here it's working in Python 3.4, I guess it was fixed sometime in the 
last few years.

I guess the only thing we'd care about now is ensuring a test for this was 
added to the test suite, so there wouldn't be a regression. Can anyone confirm 
that?

--

___
Python tracker 

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



[issue21710] --install-base option ignored?

2014-07-29 Thread Ned Deily

Ned Deily added the comment:

See also Issue1382562 "--install-base not honored on win32".

--
nosy: +ned.deily

___
Python tracker 

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



[issue11990] redirected output - stdout writes newline as \n in windows

2014-07-29 Thread Mark Lawrence

Mark Lawrence added the comment:

It states in msg136119 that this is already fixed and I've confirmed this in 
3.4.1 and 3.5.0a0 so believe this can be closed.

--
nosy: +BreamoreBoy

___
Python tracker 

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



[issue11990] redirected output - stdout writes newline as \n in windows

2014-07-29 Thread Brian Curtin

Changes by Brian Curtin :


--
nosy:  -brian.curtin

___
Python tracker 

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



[issue22100] Use $HOSTPYTHON when determining candidate interpreter for $PYTHON_FOR_BUILD.

2014-07-29 Thread Ned Deily

Changes by Ned Deily :


--
nosy: +doko
versions:  -Python 3.3

___
Python tracker 

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



[issue8171] bdist_wininst builds wrongly for --plat-name=win-amd64

2014-07-29 Thread Mark Lawrence

Changes by Mark Lawrence :


--
components:  -Distutils2, Windows
nosy: +dstufft
versions: +Python 3.4, Python 3.5 -3rd party, Python 3.2, Python 3.3

___
Python tracker 

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



[issue8170] Wrong Paths for distutils build --plat-name=win-amd64

2014-07-29 Thread Mark Lawrence

Changes by Mark Lawrence :


--
versions: +Python 3.4, Python 3.5 -Python 3.2, Python 3.3

___
Python tracker 

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



[issue11990] redirected output - stdout writes newline as \n in windows

2014-07-29 Thread STINNER Victor

STINNER Victor added the comment:

Yes, the fix was probably one of these issues:

 - #10841: "binary stdio"
 - #11272: "input() has trailing carriage return on windows", fixed in Python 
3.2.1
 - #11395: "print(s) fails on Windows with long strings", fixed in Python 3.2.1
 - #13119: "Newline for print() is \n on Windows, and not \r\n as expected", 
will be fixed in Python 3.2.4 and 3.3 (not released yet)

Python 3 now always use standard streams in binary mode on Windows.

--
resolution:  -> fixed
status: open -> closed

___
Python tracker 

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



[issue22054] Add os.get_blocking() and os.set_blocking() functions

2014-07-29 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 8f0b8ddbb66b by Victor Stinner in branch 'default':
Issue #22054: Add os.get_blocking() and os.set_blocking() functions to get and
http://hg.python.org/cpython/rev/8f0b8ddbb66b

--
nosy: +python-dev

___
Python tracker 

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



[issue22054] Add os.get_blocking() and os.set_blocking() functions

2014-07-29 Thread STINNER Victor

Changes by STINNER Victor :


--
resolution:  -> fixed
status: open -> closed

___
Python tracker 

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



[issue1508864] threading.Timer/timeouts break on change of win32 local time

2014-07-29 Thread Mark Lawrence

Mark Lawrence added the comment:

PEP 418 states "time.monotonic(): timeout and scheduling, not affected by 
system clock updates" and has also deprecated time.clock() so I believe this 
can be closed as "out of date".

--
nosy: +BreamoreBoy

___
Python tracker 

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



[issue1508864] threading.Timer/timeouts break on change of win32 local time

2014-07-29 Thread STINNER Victor

STINNER Victor added the comment:

As Antoine wrote, Condition.wait() was rewritten in Python 3.2 to implement 
timeout using the native OS "acquire a lock with a timeout" function. So the 
initial concern is already fixed. This change is huge, we are not going to 
backport new lock timeouts in Python 2.7, it's too risky. It's time to upgrade 
to Python 3!

There is still a *corner case* when the function is interrupted by a signal, we 
use the system clock to recompute the new timeout. This corner case is 
addresses by the issue #22043.

--
resolution:  -> fixed
status: open -> closed

___
Python tracker 

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



[issue4198] os.path.normcase gets fooled on windows with mapped linux network drive

2014-07-29 Thread Mark Lawrence

Mark Lawrence added the comment:

How does the new pathlib module handle this?  Also note from the docs for 
os.samefile() "Changed in version 3.4: Windows now uses the same implementation 
as all other platforms.".

--
nosy: +BreamoreBoy, steve.dower, zach.ware

___
Python tracker 

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



[issue22089] collections.MutableSet does not provide update method

2014-07-29 Thread Akira Li

Akira Li added the comment:

On the other hand update() method may accept multiple iterables at once:

  def update(self, *iterables):
  for it in iterables:
  self |= it

and therefore it is not equivalent to __ior__ method. In this case:
'difference', 'intersection', 'union' set methods could also be added to
Set and 'difference_update', 'intersection_update', 'update' to
MutableSet.

Negative consequences:

- no use-case?

- there are more than one way to spell an operation e.g., &= and
  intersection_update for a single iterable case

- documentation, tests, methods implementation have to be maintained in
  sync with frozenset/set

Positive:

- Set/MutableSet can be a drop in replacement for frozenset/set without
  manually reimplementing the named methods even if multiple iterables
  are not used

- documentation, tests, methods implementation are maintained only in
  stdlib and therefore bugs are fixed in a single place and the same
  behavior everywhere

I've uploaded a prototype patch that implements the named methods,
mentions them in Set/MutableSet documentation, and adds sanity tests.

If somebody provides a compelling use-case for adding the named methods
then further work on the patch could be done.

--
keywords: +patch
Added file: http://bugs.python.org/file36152/set-update.patch

___
Python tracker 

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



[issue22100] Use $HOSTPYTHON when determining candidate interpreter for $PYTHON_FOR_BUILD.

2014-07-29 Thread Roumen Petrov

Changes by Roumen Petrov :


--
nosy: +rpetrov

___
Python tracker 

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



[issue9665] Buid issues on Cygwin - _curses, _curses_panel, and _io

2014-07-29 Thread Mark Lawrence

Mark Lawrence added the comment:

Stage needs setting to "patch review", any volunteers to undertake a review?

--
components: +Cross-Build -Extension Modules, Windows
nosy: +BreamoreBoy, jlt63
versions: +Python 3.4, Python 3.5 -Python 3.1, Python 3.2

___
Python tracker 

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



[issue22063] asyncio: sock_xxx() methods of event loops should check ath sockets are non-blocking

2014-07-29 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 7e70ec207889 by Victor Stinner in branch '3.4':
Close #22063: socket operations (socket,recv, sock_sendall, sock_connect,
http://hg.python.org/cpython/rev/7e70ec207889

New changeset 8967d9a1bc17 by Victor Stinner in branch 'default':
Merge with Python 3.4 (asyncio)
http://hg.python.org/cpython/rev/8967d9a1bc17

--
nosy: +python-dev
resolution:  -> fixed
stage:  -> 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



[issue22063] asyncio: sock_xxx() methods of event loops should check ath sockets are non-blocking

2014-07-29 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 95ceec174baf by Victor Stinner in branch '3.4':
Issue #22063: Mention in asyncio documentation that socket operations require
http://hg.python.org/cpython/rev/95ceec174baf

New changeset 741e58bcaa65 by Victor Stinner in branch 'default':
(Merge 3.4) Issue #22063: Mention in asyncio documentation that socket
http://hg.python.org/cpython/rev/741e58bcaa65

--

___
Python tracker 

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



[issue4198] os.path.normcase gets fooled on windows with mapped linux network drive

2014-07-29 Thread Brian Curtin

Changes by Brian Curtin :


--
nosy:  -brian.curtin

___
Python tracker 

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



[issue22101] collections.abc.Set doesn't provide copy() method

2014-07-29 Thread Akira Li

New submission from Akira Li:

The documentation for standard types says [1]:

  clear() and copy() are included for consistency with the interfaces of
  mutable containers that don’t support slicing operations (such as dict
  and set)

  New in version 3.3: clear() and copy() methods.

[1] https://docs.python.org/3.4/library/stdtypes.html#immutable-sequence-types

but collections.abc documentation mentions only clear() method.

I've uploaded a patch that implements Set.copy() method, mentions it in
Set's documentation, and adds a sanity test.

--
components: Library (Lib)
files: set-copy.patch
keywords: patch
messages: 224255
nosy: akira
priority: normal
severity: normal
status: open
title: collections.abc.Set doesn't provide copy() method
type: behavior
versions: Python 3.4, Python 3.5
Added file: http://bugs.python.org/file36153/set-copy.patch

___
Python tracker 

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



[issue22018] signal.set_wakeup_fd() should accept sockets on Windows

2014-07-29 Thread Roundup Robot

Roundup Robot added the comment:

New changeset fbd104359ef8 by Victor Stinner in branch 'default':
Issue #22018: On Windows, signal.set_wakeup_fd() now also supports sockets.
http://hg.python.org/cpython/rev/fbd104359ef8

--

___
Python tracker 

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



[issue9665] Buid issues on Cygwin - _curses, _curses_panel, and _io

2014-07-29 Thread Brian Curtin

Changes by Brian Curtin :


--
nosy:  -brian.curtin

___
Python tracker 

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



[issue22102] Zipfile generates Zipfile error in zip with 0 total number of disk in Zip64 end of central directory locator

2014-07-29 Thread Guillaume Carre

New submission from Guillaume Carre:

I've got a zip file with a Zip64 end of central directory locator in which:
- total number of disks = 
- number of the disk with the start of the zip64 end of central directory = 

According to the test line 176 in zipfile.py this fails:
if diskno != 0 or disks != 1:
raise BadZipfile("zipfiles that span multiple disks are not supported")

I believe the test should be changed to  
if diskno != 0 or disks > 1:

--
components: Library (Lib)
messages: 224257
nosy: Guillaume.Carre
priority: normal
severity: normal
status: open
title: Zipfile generates Zipfile error in zip with 0 total number of disk in 
Zip64 end of central directory locator
type: behavior
versions: Python 2.7

___
Python tracker 

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



[issue22103] bdist_wininst does not run install script

2014-07-29 Thread Michael Büsch

New submission from Michael Büsch:

The bdist_wininst installer does not run the specified --install-script.

Attached is an example project foo.zip.
setup.py is invoked as follows:
py setup.py bdist_wininst --install-script foo_postinstall.py

The installer shows that it successfully ran the install script, but it did not 
do this. The file C:\foo.txt is not created. If I add print()s to the install 
script, these messages are not shown either.

I tested this on Python 3.4, 64-bit (Win7) and 32-bit (XP)

--
components: Installation
files: foo.zip
messages: 224258
nosy: mb_
priority: normal
severity: normal
status: open
title: bdist_wininst does not run install script
type: behavior
versions: Python 3.4
Added file: http://bugs.python.org/file36154/foo.zip

___
Python tracker 

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



[issue22018] signal.set_wakeup_fd() should accept sockets on Windows

2014-07-29 Thread STINNER Victor

STINNER Victor added the comment:

I pushed my latest patch. Thank you for helping me to design the API of this 
new feature.

Let's move to the issue #22042 to discuss if signal.set_wakeup_fd() should 
raise an exception if the file descriptor or socket handle is blocking. I close 
this issue.

--
resolution:  -> fixed
status: open -> closed

___
Python tracker 

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



[issue8548] Building on CygWin 1.7: PATH_MAX redefined

2014-07-29 Thread Mark Lawrence

Mark Lawrence added the comment:

main.c has this.

#if defined(MS_WINDOWS) || defined(__CYGWIN__)
#include 
#ifdef HAVE_FCNTL_H
#include 
#define PATH_MAX MAXPATHLEN
#endif
#endif

Wouldn't inserting #else before #define fix this issue?

--
components: +Build -Installation, Windows
nosy: +BreamoreBoy, jlt63, stutzbach
versions: +Python 3.4, Python 3.5 -Python 3.1

___
Python tracker 

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



[issue8548] Building on CygWin 1.7: PATH_MAX redefined

2014-07-29 Thread Roumen Petrov

Changes by Roumen Petrov :


--
nosy: +rpetrov

___
Python tracker 

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



[issue8548] Building on CygWin 1.7: PATH_MAX redefined

2014-07-29 Thread Mark Lawrence

Changes by Mark Lawrence :


--
components: +Windows

___
Python tracker 

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



[issue21933] Allow the user to change font sizes with the text pane of turtledemo

2014-07-29 Thread Lita Cho

Lita Cho added the comment:

Hi Terry,

I've added to the patch, so that the user is able to change the font size 
through the GUI. I tried to match Google Doc's behaviour. I also added a max 
font size. I choose 400 since that is what Google Docs limits their font size.

If you prefer to split out the GUI functionaly out of this patch and submit a 
new patch after this has been committed, that's totally cool!

--
Added file: http://bugs.python.org/file36155/tfont_with_gui.patch

___
Python tracker 

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



[issue15082] [httplib] httplib.BadStatusLine on any HTTPS connection in certain unknown cases.

2014-07-29 Thread Mark Lawrence

Mark Lawrence added the comment:

Can you please retest with Python 2.7.8 as this has an updated version of 
openssl.

--
nosy: +BreamoreBoy

___
Python tracker 

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



[issue22042] signal.set_wakeup_fd(fd): raise an exception if the fd is in blocking mode

2014-07-29 Thread STINNER Victor

STINNER Victor added the comment:

On Windows, it looks like it's not possible to test if a socket handle (int, 
not a socket object) is blocking or not. The WSAIsBlocking() function was 
removed, it's only possible to set the flag using ioctlsocket().

--

___
Python tracker 

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



[issue22042] signal.set_wakeup_fd(fd): raise an exception if the fd is in blocking mode

2014-07-29 Thread STINNER Victor

STINNER Victor added the comment:

I commited my patch to support sockets in signal.set_wakeup_fd() on Windows.

I updated my patch. It doesn't change signal.set_wakeup_fd() on Windows 
anymore. It only raises an exception on POSIX if the file descriptor is 
blocking.

On Windows, it's not possible to make a file non-blocking and so the signal 
handler may block on writing in the file. Antoine Pitrou doesn't want to change 
the behaviour, he prefers to still support files even if there is the possible 
hang.

On Windows, it's not possible to check if a socket handle is blocking or not. 
So set_wakeup_fd() doesn't check if the socket is blocking or not on Windows.

At least, the check can be implemented on POSIX.

--

An alternative is to make the file descriptor non-blocking in set_wakeup_fd(). 
In this case, I suggest to drop support of files on Windows because files 
cannot be set in non-blocking mode.

--
Added file: http://bugs.python.org/file36156/signal_check_nonblocking-2.patch

___
Python tracker 

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



[issue20766] reference leaks in pdb

2014-07-29 Thread STINNER Victor

STINNER Victor added the comment:

It's not easy to test the patch because running test_pdb fails with the 
following error (I also get the error if the patch is not applied):

$ ./python -m test test_pdb test_pdb
[1/2] test_pdb
[2/2] test_pdb
test test_pdb failed -- Traceback (most recent call last):
  File "/home/haypo/prog/python/default/Lib/doctest.py", line 2189, in runTest
test, out=new.write, clear_globs=False)
AssertionError: Failed doctest test for 
test.test_pdb.test_next_until_return_at_return_event
  File "/home/haypo/prog/python/default/Lib/test/test_pdb.py", line 603, in 
test_next_until_return_at_return_event

--
File "/home/haypo/prog/python/default/Lib/test/test_pdb.py", line 617, in 
test.test_pdb.test_next_until_return_at_return_event
Failed example:
with PdbTestInput(['break test_function_2',
   'continue',
   'return',
   'next',
   'continue',
   'return',
   'until',
   'continue',
   'return',
   'return',
   'continue']):
test_function()
Expected:
> (3)test_function()
-> test_function_2()
(Pdb) break test_function_2
Breakpoint 1 at :1
(Pdb) continue
> (2)test_function_2()
-> x = 1
(Pdb) return
--Return--
> (3)test_function_2()->None
-> x = 2
(Pdb) next
> (4)test_function()
-> test_function_2()
(Pdb) continue
> (2)test_function_2()
-> x = 1
(Pdb) return
--Return--
> (3)test_function_2()->None
-> x = 2
(Pdb) until
> (5)test_function()
-> test_function_2()
(Pdb) continue
> (2)test_function_2()
-> x = 1
(Pdb) return
--Return--
> (3)test_function_2()->None
-> x = 2
(Pdb) return
> (6)test_function()
-> end = 1
(Pdb) continue
Got:
> (3)test_function()
-> test_function_2()
(Pdb) break test_function_2
Breakpoint 7 at :1
(Pdb) continue
> (2)test_function_2()
-> x = 1
(Pdb) return
--Return--
> (3)test_function_2()->None
-> x = 2
(Pdb) next
> (4)test_function()
-> test_function_2()
(Pdb) continue
> (2)test_function_2()
-> x = 1
(Pdb) return
--Return--
> (3)test_function_2()->None
-> x = 2
(Pdb) until
> (5)test_function()
-> test_function_2()
(Pdb) continue
> (2)test_function_2()
-> x = 1
(Pdb) return
--Return--
> (3)test_function_2()->None
-> x = 2
(Pdb) return
> (6)test_function()
-> end = 1
(Pdb) continue

--

___
Python tracker 

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



[issue22068] test_idle leaks uncollectable objects

2014-07-29 Thread STINNER Victor

Changes by STINNER Victor :


--
title: test_gc fails after test_idle -> test_idle leaks uncollectable objects

___
Python tracker 

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



[issue21860] Correct FileIO docstrings

2014-07-29 Thread STINNER Victor

STINNER Victor added the comment:

The patch looks good to me.

--

___
Python tracker 

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



[issue22023] PyUnicode_FromFormat is broken on python 2

2014-07-29 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 263701e0b77e by Victor Stinner in branch '2.7':
Issue #22023: Fix %S, %R and %V formats of PyUnicode_FromFormat().
http://hg.python.org/cpython/rev/263701e0b77e

--
nosy: +python-dev

___
Python tracker 

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



[issue4722] _winreg.QueryValue fault while reading mangled registry values

2014-07-29 Thread Mark Lawrence

Mark Lawrence added the comment:

I can't reproduce this with 64 bit Windows 8.1 using 3.4.1 or 3.5.0a0, I don't 
have 2.7 to test on.

--
nosy: +BreamoreBoy, steve.dower, tim.golden, zach.ware
versions: +Python 2.7 -Python 2.6

___
Python tracker 

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



[issue22023] PyUnicode_FromFormat is broken on python 2

2014-07-29 Thread STINNER Victor

STINNER Victor added the comment:

Oh, supporting %li and %zi is a new feature, it's too late to add this in 
Python 2.7. I removed this part of my patch. I commited the other part.

PyUnicode_FromFormat() decodes byte strings from ISO 8859-1 for %S, %R and %V 
formats. I don't like this choice, we should use the default encoding or UTF-8. 
But it's also probably too late to change that. At least, b'\xff' is decoded to 
'\xe4' instead of '\xffe4' (signed/unsigned integer issue, also fixed by my 
patch). It's a little bit better than before.

--
resolution:  -> fixed
status: open -> closed

___
Python tracker 

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



[issue1054] scriptsinstall target fails in alternate build dir

2014-07-29 Thread Mark Lawrence

Mark Lawrence added the comment:

I have no intention of finding out what is in the 48 attached html files :(

--
nosy: +BreamoreBoy
versions: +Python 3.4, Python 3.5 -Python 3.1, Python 3.2

___
Python tracker 

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



[issue4722] _winreg.QueryValue fault while reading mangled registry values

2014-07-29 Thread Brian Curtin

Changes by Brian Curtin :


--
nosy:  -brian.curtin

___
Python tracker 

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



[issue16066] Truncated POST data in CGI script on Windows 7

2014-07-29 Thread Mark Lawrence

Mark Lawrence added the comment:

@Alexander apologies for the delay in getting back to you.  Who is best placed 
to look at this issue, I'll admit to knowing squat about cgi?

--
components: +Library (Lib)
nosy: +BreamoreBoy
versions: +Python 2.7, Python 3.4, Python 3.5 -Python 3.2

___
Python tracker 

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



[issue21725] RFC 6531 (SMTPUTF8) support in smtpd

2014-07-29 Thread Milan Oberkirch

Changes by Milan Oberkirch :


Added file: http://bugs.python.org/file36157/issue21725v5.1.patch

___
Python tracker 

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



[issue16066] Truncated POST data in CGI script on Windows 7

2014-07-29 Thread Brian Curtin

Changes by Brian Curtin :


--
nosy:  -brian.curtin

___
Python tracker 

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



[issue22071] Remove long-time deprecated attributes from smtpd

2014-07-29 Thread Milan Oberkirch

Changes by Milan Oberkirch :


Added file: 
http://bugs.python.org/file36158/smtpd_remove_deprecated_attrs_v2.patch

___
Python tracker 

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



[issue22027] RFC 6531 (SMTPUTF8) support in smtplib

2014-07-29 Thread Milan Oberkirch

Changes by Milan Oberkirch :


Added file: 
http://bugs.python.org/file36159/smtpd_remove_deprecated_attrs_v2.patch

___
Python tracker 

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



[issue16100] Compiling vim with Python 3.3 support fails

2014-07-29 Thread Mark Lawrence

Mark Lawrence added the comment:

I don't see how we can do anything with this as mingw is unsupported.  If any 
docs need changing wouldn't that best be done as a completely separate issue?

--
nosy: +BreamoreBoy

___
Python tracker 

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



[issue22003] BytesIO copy-on-write

2014-07-29 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 79a5fbe2c78f by Antoine Pitrou in branch 'default':
Issue #22003: When initialized from a bytes object, io.BytesIO() now
http://hg.python.org/cpython/rev/79a5fbe2c78f

--
nosy: +python-dev

___
Python tracker 

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



[issue22003] BytesIO copy-on-write

2014-07-29 Thread Antoine Pitrou

Antoine Pitrou added the comment:

The latest patch is good indeed. Thank you very much!

--
resolution:  -> fixed
stage: patch review -> 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



[issue10551] mimetypes read from the registry should not overwrite standard mime mappings

2014-07-29 Thread Mark Lawrence

Mark Lawrence added the comment:

msg185039 from #4969 also complains about this issue.  I agree with the 
solution put forward in the last sentence of msg172531. If we think this is the 
best idea I'll work on a patch unless anybody else wants to pick this up.

--
nosy: +BreamoreBoy, fhamand -brian.curtin

___
Python tracker 

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



[issue22089] collections.MutableSet does not provide update method

2014-07-29 Thread Raymond Hettinger

Raymond Hettinger added the comment:

The starting point for this feature request should be recognizing that Guido 
intentionally chose to not implement the named methods.

Excerpt from PEP 3119:

"This also supports the in-place mutating operations |=, &=, ^=, -=. These are 
concrete methods whose right operand can be an arbitrary Iterable, except for 
&=, whose right operand must be a Container. This ABC does not provide the 
named methods present on the built-in concrete set type that perform (almost) 
the same operations."

--

___
Python tracker 

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



[issue11969] Can't launch multiproccessing.Process on methods

2014-07-29 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Pickling of builtin functions and methods was indeed improved thanks to 
__qualname__ support. Closing.

--
nosy: +pitrou
resolution:  -> out of date
stage: needs patch -> 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



[issue22089] collections.MutableSet does not provide update method

2014-07-29 Thread Antoine Pitrou

Antoine Pitrou added the comment:

This is a bit of a pity, since the named methods are generally more explicit 
for non-experts than the operators. The ABC could simply define default 
implementations for those methods to fallback on the operators.

By not providing such default implementations, the ABC makes it harder to write 
a user class whose API behaves like set's.

--
nosy: +gvanrossum, pitrou

___
Python tracker 

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



[issue22101] collections.abc.Set doesn't provide copy() method

2014-07-29 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
nosy: +gvanrossum, rhettinger

___
Python tracker 

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



[issue22101] collections.abc.Set doesn't provide copy() method

2014-07-29 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue8548] Building on CygWin 1.7: PATH_MAX redefined

2014-07-29 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
nosy:  -terry.reedy

___
Python tracker 

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



[issue20766] reference leaks in pdb

2014-07-29 Thread Antoine Pitrou

Antoine Pitrou added the comment:

See issue20746 for the test_pdb failure when run multiple times.

--
nosy: +pitrou

___
Python tracker 

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



[issue22104] test_asyncio unstable in refleak mode

2014-07-29 Thread Antoine Pitrou

New submission from Antoine Pitrou:

test_asyncio doesn't give usable results when looking for refleaks:

$ ./python -m test -R 2:4 test_asyncio
[1/1] test_asyncio
beginning 6 repetitions
123456
..
test_asyncio leaked [212, -106, 265, -6360] references, sum=-5989
test_asyncio leaked [59, -29, 76, -1799] memory blocks, sum=-1693
1 test failed:
test_asyncio

--
components: Tests
messages: 224280
nosy: giampaolo.rodola, gvanrossum, haypo, pitrou, yselivanov
priority: normal
severity: normal
stage: needs patch
status: open
title: test_asyncio unstable in refleak mode
type: behavior
versions: 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



[issue10551] mimetypes read from the registry should not overwrite standard mime mappings

2014-07-29 Thread Ben Hoyt

Ben Hoyt added the comment:

Mark, are you referring to part 3 of this issue, the image/pjpeg type of 
problem? This was fixed in Python 2.7.6 -- see changeset 
http://hg.python.org/cpython/rev/e8cead08c556 and 
http://bugs.python.org/issue15207

--

___
Python tracker 

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



[issue22097] Linked list API for ordereddict

2014-07-29 Thread Raymond Hettinger

Raymond Hettinger added the comment:

Just for the record, when I originally looked at insert_before() and 
insert_after(), here's some of things that bugged me a little:

* insert_before(currkey, newkey, newvalue) ncan raise TypeErrors for 
hashability from either key.   It can raise a KeyError when currkey doesn't 
exist and a KeyError when newkey already exists.  It can raise a ValueError 
with currkey is equal to newkey.   That is a mess of exceptions that a user 
might need to untangle with exception chaining or custom exceptions.

* One use case for the insert methods is trying to maintain a sort order (such 
as an alphabetical order) but we don't have any efficient search methods such 
as a binary search to find an insertion point.  For example, if I read an 
alphabetically sorted config file of key / value pairs, how would I insert a 
new key/value pair in the proper position?

I also looked at adding an OrderedSet at one point and held-off because:

* there were no feature requests from users
* at the time, I wasn't finding third-party implementations on pypi,
  in the wild, or in the rich toolsets like Enthought's distro.
* it was so easy to build one by inheriting from a MutableSet
  and using an underlying OrderedDict.
* I also put a direct impplementation in a recipe on ASPN
  http://code.activestate.com/recipes/576694/
  to see if there was any uptake
* it was unclear what the ordering semantics should be on the
  various set-to-set operations (it would entail turning off
  some of the current optimizations such as intersection()
  looping over the smaller input set rather than the first
  listed set).
* In Python 3 and 2.7, fromkeys() readily constructs a set
  and the views on keys() and items() already support set
  operations.  AFAICT, nobody uses these even though all the
  desired set functionality is already there.

Since that time, there has been very little interest shown in an ordered set.  
There have been a few upvotes on the ASPN recipe and a little activity on PyPi 
with a C version using Cython (see 
https://pypi.python.org/pypi?%3Aaction=search&term=ordered+set&submit=search ).

Another thing that caused me to hold-off was the possibility that regular sets 
could be made to be ordered with very little overhead (completely eliminating 
the need for a separate type).  I have two different approaches ready if we 
wanted to go down that path.

Now that PyPI has an ordered set offering, there is even less of a need for us 
to put one in the standard library unless it becomes more of an everyday need.

--

___
Python tracker 

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



[issue22089] collections.MutableSet does not provide update method

2014-07-29 Thread Guido van Rossum

Guido van Rossum added the comment:

Oh the joy of duck typing. :-(

If anything, set should be made to behave more like MutableSet by allowing 
arbitrary iterable arguments to the __i**__ methods.

I do not think it is a good idea to add all of the named versions of the 
methods to the ABC (even if it could be done by making then concrete methods 
implemented in terms of the operations).  If you want to work with arbitrary 
MutableSet objects you should restrict yourself to the operations defined by 
MutableSet.

--

___
Python tracker 

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



[issue22104] test_asyncio unstable in refleak mode

2014-07-29 Thread Guido van Rossum

Guido van Rossum added the comment:

Was this always so or did it recently start?  Victor has made a ton of changes.

Anyway, I imagine there may be some objects stuck in cycles and the collection 
may not happen until a random later time, and the tests do timing-specific 
stuff so the number of objects created and deleted varies per run.

Perhaps adding some well-aimed gc.collect() calls to some tearDown() methods 
would make this go away?

--

___
Python tracker 

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



[issue22097] Linked list API for ordereddict

2014-07-29 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Le 29/07/2014 21:15, Raymond Hettinger a écrit :
>
> * One use case for the insert methods is trying to maintain a sort
order (such as an alphabetical order) but we don't have any efficient
search methods such as a binary search to find an insertion point. For
example, if I read an alphabetically sorted config file of key / value
pairs, how would I insert a new key/value pair in the proper position?

You'd certainly prefer a tree for that use case (O(log n) search and 
insertion rather than O(n) search and O(1) insertion).

I hadn't thought about the set operations. The use case here is really 
linked-list-alike, not set-alike.

I'm mildly relieved that, even though O(n), middle-of-list insertions 
are still plenty fast for reasonable sizes, which means Numba shouldn't 
suffer here (even though we do seem to have users generating Python code 
and then JIT-compiling it...).

--

___
Python tracker 

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



[issue22105] Hang during File "Save As"

2014-07-29 Thread Joe Gaspard

New submission from Joe Gaspard:

Python 3.4.1 hang while trying to save a file on  29 July 2014 5Pm.  The 
computer was a "DIY" i7/WIN7-64 bit/INTEL DZ87KLT-75 Motherboard (w/ Intel 
i7-4770-K 3.5 GHz processor).   IDLE was operating on "G:\python.exe 3.4.1 
(v3.4.1:c0e311e010fc, May 18 2014 10:45:13) [MSC v.1600 64 bit (AMD64] on win 
32"
The hang occurred when  a "file save as" operation was attempted.  The file was 
a display of a "print" of a 400,000 line result from a 3-loop nested "while" 
count ".py" program.  NOTE: The "make test" set was run a few days earlier and 
did not result in any messages (all ok).  Thanks - "py" is a great proram and 
excellent docs.   

Description:
  A problem caused this program to stop interacting with Windows.

Problem signature:
  Problem Event Name:   AppHangB1
  Application Name: pythonw.exe
  Application Version:  0.0.0.0
  Application Timestamp:5378731e
  Hang Signature:   7efa
  Hang Type:2048
  OS Version:   6.1.7601.2.1.0.768.3
  Locale ID:1033
  Additional Hang Signature 1:  7efa98bee311c458b7449fe89d922f8b
  Additional Hang Signature 2:  271f
  Additional Hang Signature 3:  271ff7b6e5aa15e9ab2854edd8b040b6
  Additional Hang Signature 4:  7efa
  Additional Hang Signature 5:  7efa98bee311c458b7449fe89d922f8b
  Additional Hang Signature 6:  271f
  Additional Hang Signature 7:  271ff7b6e5aa15e9ab2854edd8b040b6

--
components: IDLE
messages: 224286
nosy: Joe
priority: normal
severity: normal
status: open
title: Hang during File "Save As"
versions: Python 3.4

___
Python tracker 

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



[issue22104] test_asyncio unstable in refleak mode

2014-07-29 Thread Zachary Ware

Zachary Ware added the comment:

I think I'm to blame for exposing this in 4f9f7e0fe1fd.  I have a theory on why 
that exposed it; I think regrtest is holding an extra reference to the 
TestSuite in runtest_inner since it is using a different branch now that 
test_asyncio doesn't have a test_main function.

--
nosy: +zach.ware

___
Python tracker 

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



[issue22029] argparse - CSS white-space: like control for individual text blocks

2014-07-29 Thread paul j3

Changes by paul j3 :


Added file: http://bugs.python.org/file36160/issue22029_2.patch

___
Python tracker 

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