[issue23738] Clarify documentation of positional-only default values

2015-12-29 Thread Ezio Melotti

Ezio Melotti added the comment:

One thought that occurred to me is that we could make the * and / in the 
signature links that point to a relevant section of the documentation.
I believe this is doable with Sphinx, even though I'm not sure how complex it 
is and if it's worth it.  If we do this, people will be able to find out easily 
what they mean (especially considering that it's hard to search for them).

--

___
Python tracker 

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



[issue24682] Add Quick Start: Communications section to devguide

2015-12-29 Thread Ezio Melotti

Ezio Melotti added the comment:

FWIW when I added the quickstart (#13228), its main target wasn't newbies, but 
devs that already have experience with other open source projects and want to 
contribute to CPython.
These people just need to know where is the repo and the bug tracker, how to 
build Python, and how to run the tests.

OTOH, the quickstart is also useful to newbies as it provides a concise list of 
steps and additional links that cover them in greater detail.

So there are at least two targets here:
* experienced devs: they know what they want and they are looking for specific 
steps that will bring them there.  They also tend to skip wordy sections (so no 
important info should be hidden in a wall of text).
* newbies: they might not know what they want and/or what to do and need more 
guidance in a more verbose fashion.

I would leave the quickstart as is, and possibly add a separate introduction as 
R. David suggested.

--

___
Python tracker 

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



[issue25863] ISO-2022 seeking forgets state

2015-12-29 Thread John Walker

John Walker added the comment:

Here is Martin's message as a unit test. It checks utf-8 and the iso-2022 
family except iso-2022-cn and iso-2022-cn-ext because they are not supported. 
The errors occur with all iso-2022 charsets.

--
keywords: +patch
Added file: http://bugs.python.org/file41451/25863-unittest.patch

___
Python tracker 

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



[issue25194] Opt-in motivations & affiliations page for core contributors

2015-12-29 Thread Ezio Melotti

Changes by Ezio Melotti :


--
resolution:  -> fixed
stage: commit review -> resolved
status: open -> pending

___
Python tracker 

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



[issue6766] Cannot modify dictionaries inside dictionaries using Managers from multiprocessing

2015-12-29 Thread Davin Potts

Changes by Davin Potts :


--
assignee: jnoller -> davin

___
Python tracker 

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



[issue6766] Cannot modify dictionaries inside dictionaries using Managers from multiprocessing

2015-12-29 Thread Davin Potts

Davin Potts added the comment:

Two core issues are compounding one another here:
1. An un-pythonic, inconsistent behavior currently exists with how managed 
lists and dicts return different types of values.
2. Confusion comes from reading what is currently in the docs regarding the 
expected behavior of nested managed objects (e.g. managed dict containing other 
managed dicts).

As Terrence described, it is RebuildProxy where the decision is made to not 
return a proxy object but a new local instance (copy) of the managed object 
from the Server.  Unfortunately there are use cases where Terrence's proposed 
modification won't work such as a managed list that contains a reference to 
itself or more generally a managed list/dict that contains a reference to 
another managed list/dict when an attempt is made to delete the outer managed 
list/dict before the inner.  The reference counting implementation in 
multiprocessing.managers.Server obtains a lock before decrementing reference 
counts and any deleting of objects whose count has dropped to zero.  In fact, 
when an object's ref count drops to zero, it deletes the object synchronously 
and won't release the lock until it's done.  If that object contains a 
reference to another proxy object (managed by the same Manager and Server), it 
will follow a code path that leads it to wait forever for that same lock to be 
released
  before it can decref that managed object.

I agree with Jesse's earlier assessment that the current behavior (returning a 
copy of the managed object and not a proxy) is unintended and has unintended 
consequences.  There are hints in Richard's (sbt's) code that also suggest this 
is the case.  Merely better documenting the current behavior does nothing to 
address the lack of or at least limited utility suggested in the comments here 
or the extra complications described in issue20854.  As such, I believe this is 
behavior that should be addressed in 2.7 as well as 3.x.

My proposed patch makes the following changes:
1. Changes RebuildProxy to always return a proxy object (just like Terrence).
2. Changes Server's decref() to asynchronously delete objects after their ref 
counts drop to 0.
3. Updates the documentation to clarify the expected behavior and clean up the 
terminology to hopefully minimize potential for confusion or misinterpretation.
4. Adds tests to validate this expected behavior and verify no lock contention.

Concerned about performance, I've attempted applying the #2 change without the 
others and put it through stress tests on a 4.0GHz Core i7-4790K in a 
iMac-Retina5K-late2014 OS X system and discovered no degradation in execution 
speed or memory overhead.  If anything with #2 applied it was slightly faster 
but the differences are too small to be regarded as anything more significant 
than noise.
In separate tests, applying the #1 and #2 changes together has no noteworthy 
impact when stress testing with non-nested managed objects but when stress 
testing the use of nested managed objects does result in a slowdown in 
execution speed corresponding to the number of nested managed objects and the 
requisite additional communication surrounding them.



These proposed changes enable the following code to execute and terminate 
cleanly:
import multiprocessing
m = multiprocessing.Manager()
a = m.list()
b = m.list([4, 5])
a.append(b)
print(str(a))
print(str(b))
print(repr(a[0]))
a[0].append(6)
print(str(b))


To produce the following output:
[]
[4, 5]

[4, 5, 6]


Justin: I've tested the RLock values I've gotten back from my managed lists too 
-- just didn't have that in the example above.


Patches to be attached shortly (after cleaning up a bit).

--
versions: +Python 3.4, Python 3.5, Python 3.6 -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



[issue25979] String functions lstrip are not working properly when you have escape sequence

2015-12-29 Thread Ethan Furman

Ethan Furman added the comment:

lstrip() works by removing any of the characters in its argument, in any order; 
for example:

'catchy'.lstrip('cat')
# 'hy'

'actchy'.lstrip('tac')
# 'hy'

is stripping, from the left, all 'c's and all 'a's and all 't's -- not just the 
first three, and order does not matter.

The docs: 
https://docs.python.org/3/library/stdtypes.html?highlight=lstrip#str.lstrip

--
nosy: +ethan.furman
resolution:  -> not a bug
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



[issue25979] String functions lstrip are not working properly when you have escape sequence

2015-12-29 Thread Kiran Kotari

Kiran Kotari added the comment:

In this python code I am collecting list of folders present in the given 
location path with parent folder and print the folder names (output went wrong 
due to escape sequence values with lstrip.)
Note :
"\a \b \f \r \v \0 \1" are working fine. 
"\c \e \n \ne \t \te" went wrong.

Python Code :
import glob as g

class Folders:
def __init__(self, path, parent_folder_name):
self.path = path + parent_folder_name + '\\'
self.parent_folder_name = parent_folder_name

def showFolders(self):
folders = [lst.lstrip(self.path) for lst in  g.glob(self.path + '*')]
print('Path: '+self.path+ ', List: ',folders)
pass

if __name__ == "__main__":
obj = Folders(path='.\\', parent_folder_name='parent')
obj.showFolders()

Folder Structure : 
parent ->
  cat
  eat
  east
  next
  nest
  test

Wrong Output :
Path: .\parent\, List:  ['cat', 'st', '', 'st', 'xt', 'st']

--

___
Python tracker 

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



[issue25979] String functions lstrip are not working properly when you have escape sequence

2015-12-29 Thread Kiran Kotari

Changes by Kiran Kotari :


Removed file: http://bugs.python.org/file41450/string_fun_error.py

___
Python tracker 

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



[issue25979] String functions lstrip are not working properly when you have escape sequence

2015-12-29 Thread Kiran Kotari

New submission from Kiran Kotari:

In this python code I am collecting list of folders present in the given 
location path with parent folder and print the folder names (output went wrong 
due to escape sequence values with lstrip.)
Note :
"\a \b \f \r \v \0 \1" are working fine. 
"\c \e \n \ne \t \te" went wrong.

Folder Structure : 
parent ->
  cat
  eat
  east
  next
  nest
  test

Wrong Output :
Path: .\parent\, List:  ['cat', 'st', '', 'st', 'xt', 'st']

--
components: 2to3 (2.x to 3.x conversion tool)
files: string_fun_error.py
messages: 257223
nosy: Kiran Kotari
priority: normal
severity: normal
status: open
title: String functions lstrip are not working properly when you have escape 
sequence
type: behavior
versions: Python 3.5
Added file: http://bugs.python.org/file41450/string_fun_error.py

___
Python tracker 

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



[issue25978] escape sequence r'\' giving compilation error

2015-12-29 Thread R. David Murray

R. David Murray added the comment:

https://docs.python.org/3/faq/design.html?highlight=raw%20strings#why-can-t-raw-strings-r-strings-end-with-a-backslash

--
nosy: +r.david.murray
resolution:  -> not a bug
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



[issue25978] escape sequence r'\' giving compilation error

2015-12-29 Thread Kiran Kotari

New submission from Kiran Kotari:

>>> '\test'.lstrip(r'\')
   
SyntaxError: EOL while scanning string literal

--
components: 2to3 (2.x to 3.x conversion tool)
messages: 257221
nosy: Kiran Kotari
priority: normal
severity: normal
status: open
title: escape sequence r'\' giving compilation error
type: compile error
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



[issue25977] Typo fixes in Lib/tokenize.py

2015-12-29 Thread John Walker

John Walker added the comment:

You're welcome, have a happy new year. :)

--

___
Python tracker 

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



[issue25863] ISO-2022 seeking forgets state

2015-12-29 Thread John Walker

Changes by John Walker :


--
nosy: +johnwalker

___
Python tracker 

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



[issue25977] Typo fixes in Lib/tokenize.py

2015-12-29 Thread Berker Peksag

Berker Peksag added the comment:

Thanks for the patch, John.

--
nosy: +berker.peksag
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



[issue25977] Typo fixes in Lib/tokenize.py

2015-12-29 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 9057e3857119 by Berker Peksag in branch '3.5':
Issue #25977: Fix typos in Lib/tokenize.py
https://hg.python.org/cpython/rev/9057e3857119

New changeset 5b43d7984a63 by Berker Peksag in branch 'default':
Issue #25977: Fix typos in Lib/tokenize.py
https://hg.python.org/cpython/rev/5b43d7984a63

--
nosy: +python-dev

___
Python tracker 

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



[issue25977] Typo fixes in Lib/tokenize.py

2015-12-29 Thread SilentGhost

Changes by SilentGhost :


--
nosy: +meador.inge

___
Python tracker 

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



[issue25977] Typo fixes in Lib/tokenize.py

2015-12-29 Thread John Walker

New submission from John Walker:

Minor fixes to comments and a docstring in Lib/tokenize.py I found while 
looking for more important bugs.

afer -> after
alternately -> alternatively
intput -> input
argment -> argument

--
assignee: docs@python
components: Documentation
files: tokenize-fixes.patch
keywords: patch
messages: 257217
nosy: docs@python, johnwalker
priority: normal
severity: normal
status: open
title: Typo fixes in Lib/tokenize.py
type: enhancement
versions: Python 3.5, Python 3.6
Added file: http://bugs.python.org/file41449/tokenize-fixes.patch

___
Python tracker 

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



[issue25971] Optimize converting float and Decimal to Fraction

2015-12-29 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Thank you all for your review.

--
assignee:  -> serhiy.storchaka
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



[issue25971] Optimize converting float and Decimal to Fraction

2015-12-29 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 284026a8af9e by Serhiy Storchaka in branch 'default':
Issue #25971: Optimized creating Fractions from floats by 2 times and from
https://hg.python.org/cpython/rev/284026a8af9e

--
nosy: +python-dev

___
Python tracker 

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



[issue25637] Move non-collections-related ABCs out of collections.abc

2015-12-29 Thread Terry J. Reedy

Terry J. Reedy added the comment:

That looks like a good list to me.

--

___
Python tracker 

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



[issue25971] Optimize converting float and Decimal to Fraction

2015-12-29 Thread Stefan Krah

Stefan Krah added the comment:

Serhiy: to me, the patch also looks good, we can certainly change
any error messages later.


Back to the bikeshedding:

Poly/ML:


> f;
Error-Value or constructor (f) has not been declared   Found near f
Static errors (pass2)


ghci

Prelude> f

:2:1: Not in scope: `f'



OCaml
=

# f;;
Error: Unbound value f



SML/NJ
==

- f;
stdIn:1.2 Error: unbound variable or constructor: f



Basically the European languages start in uppercase after the
first relevant colon (or hyphen in the case of Poly/ML).

--

___
Python tracker 

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



[issue25971] Optimize converting float and Decimal to Fraction

2015-12-29 Thread R. David Murray

R. David Murray added the comment:

I wonder if it is a (programming) language specific thing.  On the other hand, 
I don't know what those langauges error messages look like, but Python's 
normally follow a colon (ValueError: ) where not having the message 
capitalized is more natural (whether or not there is a full stop at the end), 
at least in American English.

--
nosy: +r.david.murray

___
Python tracker 

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



[issue25971] Optimize converting float and Decimal to Fraction

2015-12-29 Thread Stefan Krah

Stefan Krah added the comment:

Sorry for the bikeshedding, but I find this interesting:

Poly/ML (Cambridge), ghci (Glasgow) and OCaml (INRIA) appear to
use error messages without a full stop but starting in uppercase.

SML/NJ (Bell Labs) uses lowercase (and no full stop).


Perhaps this is a British/European vs. American issue?


Regarding int/-inf: I don't think it's important to distiguish
between them.

--

___
Python tracker 

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



[issue25974] Fix statistics.py after the Decimal.as_integer_ratio() change

2015-12-29 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

I believe the current code is well-weighed compromise that optimize different 
cases ranged for their frequency of occurrence (floats, ints, decimals, 
fractions, subclasses of int, float, etc and independed numeric types). And new 
addition unlikely will change the balance too much, but we have to be aware. If 
Steven have no something to add, the patch LGTM.

--

___
Python tracker 

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



[issue25971] Optimize converting float and Decimal to Fraction

2015-12-29 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

The question is wherever we should distinguish different sorts of infinities 
and NaNs (I think this is not needed).

--

___
Python tracker 

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



[issue25971] Optimize converting float and Decimal to Fraction

2015-12-29 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Yes, this already was discussed in issue22364. The lowercase form wins with the 
score 4:1 (see msg226790, error messages use not only double quotes).

--

___
Python tracker 

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



[issue25971] Optimize converting float and Decimal to Fraction

2015-12-29 Thread Stefan Krah

Stefan Krah added the comment:

>From my non-native speaker's point of view, I'd use lowercase if
the sentence doesn't end with a full stop, uppercase otherwise.

When I started here I was told that error messages in Python
usually don't have a full stop. ;)

--

___
Python tracker 

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



[issue25971] Optimize converting float and Decimal to Fraction

2015-12-29 Thread Stefan Krah

Stefan Krah added the comment:

Both versions are fine with me. The lowercase "cannot do ..." is more
pervasive in the source tree:

$ grep -R '"cannot' | wc -l
293
$ grep -R '"Cannot' | wc -l
150


If we change it, let's change all occurrences in _pydecimal and
_decimal/docstrings.h to uppercase (e.g. in __floor__, __round__,
__ceil__).

--

___
Python tracker 

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



[issue25971] Optimize converting float and Decimal to Fraction

2015-12-29 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

> Any particular reason for the lower-casing of "Cannot" to "cannot" in the 
> exception messages?

Only for matching current messages in C implementation of 
Decimal.as_integer_ratio(). As well as non-distinguishing positive and negative 
infinities, NaN and sNaN. If this is desirable, exception messages in C 
implementation of Decimal.as_integer_ratio() should be changed too.

--

___
Python tracker 

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



[issue25637] Move non-collections-related ABCs out of collections.abc

2015-12-29 Thread Brett Cannon

Brett Cannon added the comment:

I brought this topic up on python-ideas and both Nick Coghlan and MA Lemburg 
suggested the abc module like Yury did. So the proposal becomes to put 
syntax-related ABCs into the abc module and domain-specific ones in their 
respective stdlib modules.

Nick suggested the following ABCs get pulled out of collections.abc and put 
into the abc module:

Callable - function calls
Iterable - for loops, comprehensions
Iterator - for loops, comprehensions
Generator - generators, generator expressions
Awaitable - await expressions
Coroutine - async def
AsyncIterable - async for
AsyncIterator  - async for

--

___
Python tracker 

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



[issue19475] Add timespec optional flag to datetime isoformat() to choose the precision

2015-12-29 Thread Alessandro Cucci

Alessandro Cucci added the comment:

Berker, thank you. 
In the last patch, I removed details about timespec options in Python and C 
docstrings, corrected the rst quotes, and checked PEP7 in the c file.

The only problem now is about versionchanged vs versionadded. I leave it as it 
was, as Silent and the official doc say, if you want to change it, i'll leave 
it to you. 

Again, many many thanks to all. This was my first issue here, I learnt a lot!

--
Added file: http://bugs.python.org/file41448/issue19475_v11.patch

___
Python tracker 

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



[issue19475] Add timespec optional flag to datetime isoformat() to choose the precision

2015-12-29 Thread Alessandro Cucci

Alessandro Cucci added the comment:

what about the comment left by SilentGhost about versionadded?

--

___
Python tracker 

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



[issue25971] Optimize converting float and Decimal to Fraction

2015-12-29 Thread Mark Dickinson

Mark Dickinson added the comment:

Any particular reason for the lower-casing of "Cannot" to "cannot" in the 
exception messages?

Otherwise, LGTM.

--

___
Python tracker 

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



[issue22662] subprocess.Popen.communicate causing local tty terminal settings to change inconsistently

2015-12-29 Thread Jan Spurny

Jan Spurny added the comment:

(The video file must exist for this to work)

--

___
Python tracker 

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



[issue22662] subprocess.Popen.communicate causing local tty terminal settings to change inconsistently

2015-12-29 Thread Jan Spurny

Jan Spurny added the comment:

I'm probably experiencing the same problem - and I've found a way to 
demonstrate it (almost) reliably:

import multiprocessing
import subprocess
import os

def x():
fn = '/tmp/somevideo.avi'
p = subprocess.Popen('mplayer -identify -frames 0 ' + fn, shell=True,
 stderr=subprocess.PIPE, stdout=subprocess.PIPE)
stdout, stderr = p.communicate('')

os.system('stty -a > 1.txt')
processes = []
for i in xrange(2):
p = multiprocessing.Process(target=x)
p.start()
processes.append(p)

for p in processes:
p.join()

os.system('stty -a > 2.txt')
os.system('diff 1.txt 2.txt')

The result is:

< isig icanon iexten echo echoe echok -echonl -noflsh -xcase -tostop 
-echoprt
---
> isig -icanon iexten -echo echoe echok -echonl -noflsh -xcase -tostop 
-echoprt


when I replace the Popen call with:

p = subprocess.Popen(['mplayer', '-identify', '-frames', '0', fn], 
shell=False,

the problem is no longer there (diff prints nothing).

It's clear that the problem is caused by mplayer, which usualy runs
interactively and captures user's input.. but I'm pretty sure it's still a bug.

I'm using Debian 8.2, amd64, python2.7.9

--
nosy: +JanSpurny
Added file: http://bugs.python.org/file41447/a.py

___
Python tracker 

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



[issue24955] webbrowser broken on Mac OS X when using the BROWSER variable

2015-12-29 Thread Erwann Mest

Erwann Mest added the comment:

+1

I've got like 3 apps which are broken.


- https://github.com/mkdocs/mkdocs/issues/465
- https://bugzilla.mozilla.org/show_bug.cgi?id=1012443

--
nosy: +_kud

___
Python tracker 

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



[issue25973] Segmentation fault with nonlocal and two underscores

2015-12-29 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 4fa8c0c69ee9 by Benjamin Peterson in branch '3.5':
make recording and reporting errors and nonlocal and global directives more 
robust (closes #25973)
https://hg.python.org/cpython/rev/4fa8c0c69ee9

New changeset c64e68d703cf by Benjamin Peterson in branch 'default':
merge 3.5 (#25973)
https://hg.python.org/cpython/rev/c64e68d703cf

--
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



[issue19475] Add timespec optional flag to datetime isoformat() to choose the precision

2015-12-29 Thread Berker Peksag

Berker Peksag added the comment:

Thanks for the patch, Alessandro. I left some comments about documentation part 
of the patch, but I can fix them myself if you don't have time.

--
stage: commit review -> patch review

___
Python tracker 

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



[issue19475] Add timespec optional flag to datetime isoformat() to choose the precision

2015-12-29 Thread SilentGhost

Changes by SilentGhost :


--
stage: patch review -> commit review

___
Python tracker 

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



[issue21815] imaplib truncates some untagged responses

2015-12-29 Thread R. David Murray

R. David Murray added the comment:

When you think a patch is ready for commit, you can move it to commit review, 
which will put it in my queue (not that I've been getting to that very fast 
lately, but I'm going to try to be better about it...)

--

___
Python tracker 

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



[issue25976] telnetlib SyntaxError: invalid syntax

2015-12-29 Thread SilentGhost

SilentGhost added the comment:

The host ip needs to be supplied as a string:

telnetlib.Telnet(host='192.168.1.15', port=3490, timeout=5)

--
nosy: +SilentGhost
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed
type:  -> behavior

___
Python tracker 

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



[issue25976] telnetlib SyntaxError: invalid syntax

2015-12-29 Thread Mark McDonnell

New submission from Mark McDonnell:

I'm trying to use telnetlib in a simple script similar to the example show in 
the documentation. I get an error saying SyntaxError: invalid syntax. This is 
true with Windows 10, and XP, both using Python 2.7.11 32 bit.

Here's what happens in IDLE:
>>> import sys
>>> import telnetlib
>>> tn = telnetlib.Telnet(host=192.168.1.15, port=3490, timeout=5)
SyntaxError: invalid syntax
>>> tn = telnetlib.Telnet(192.168.1.15, 3490, 5)
SyntaxError: invalid syntax
>>> tn = telnetlib.Telnet(192.168.1.15)
SyntaxError: invalid syntax
>>> tn = telnetlib.Telnet(host=192.168.1.15, port=3490, timeout=5)

--
components: Windows
messages: 257193
nosy: Mark McDonnell, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: telnetlib SyntaxError: invalid syntax
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



[issue25975] Weird multiplication

2015-12-29 Thread Alex

Alex added the comment:

Wow. Thanks!

--

___
Python tracker 

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



[issue25961] Disallow the null character in type name

2015-12-29 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Because tp_name is a pointer to null-terminated C string and there is no way to 
distinguish the name containg the null byte from the name terminated by null 
byte. tp_name is used for example in error messages.

>>> t = type('B\0C', (), {})
>>> t.__name__
'B\x00C'
>>> t() + 0
Traceback (most recent call last):
  File "", line 1, in 
TypeError: unsupported operand type(s) for +: 'B' and 'int'

--

___
Python tracker 

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



[issue25974] Fix statistics.py after the Decimal.as_integer_ratio() change

2015-12-29 Thread Stefan Krah

Stefan Krah added the comment:

The clear winner for float and Decimal is hasattr(x, 'as_integer_ratio').
The other types are a bit disadvantaged if the lookup fails, but they
go through additional try/excepts anyway.

--

___
Python tracker 

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



[issue25961] Disallow the null character in type name

2015-12-29 Thread ppperry

ppperry added the comment:

Why are null bytes being excluded from type names in the first place?

--
nosy: +ppperry

___
Python tracker 

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



[issue25975] Weird multiplication

2015-12-29 Thread Stefan Krah

Changes by Stefan Krah :


--
resolution:  -> not a bug
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



[issue25975] Weird multiplication

2015-12-29 Thread Jacek Kołodziej

Jacek Kołodziej added the comment:

LCK: it's a trait of float point arithmetic in computing: 
https://docs.python.org/3.5/tutorial/floatingpoint.html . It's not a bug.

--
nosy: +Unit03

___
Python tracker 

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



[issue25975] Weird multiplication

2015-12-29 Thread Alex

New submission from Alex:

Hi!
I'm nube and just learning, but found weird thing
5 * 1.1 equals 55000.001, but that's not wright.
I'm using 3.5.1 Shell. My friend checked - his got the same result.
So is it a bug or a feature?

--
components: IDLE, Windows
messages: 257187
nosy: LCK, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: Weird multiplication
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



[issue25974] Fix statistics.py after the Decimal.as_integer_ratio() change

2015-12-29 Thread Stefan Krah

Stefan Krah added the comment:

No, I haven't done any benchmarks. In a quick test type(x) == float
does not seem any faster than isinstance(x, float), so perhaps we
could reduce the try/except complexity.

--

___
Python tracker 

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



[issue25973] Segmentation fault with nonlocal and two underscores

2015-12-29 Thread Konstantin Enchant

Konstantin Enchant added the comment:

Yes. Case:

# ---
class A:
def f(self):
nonlocal __x
# ---

must raises SyntaxError like case:

# ---
class A:
def f(self):
nonlocal x

>> SyntaxError: no binding for nonlocal 'x' found
# ---

but doesn't crash with SegFault as it is now.

--

___
Python tracker 

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



[issue25974] Fix statistics.py after the Decimal.as_integer_ratio() change

2015-12-29 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

LGTM.

I haven't tested that "type(x) is float or type(x) is Decimal" is faster than 
alternatives ("type(x) in (float, Decimal)", or "isinstance(x, (float, 
Decimal))", or "hasattr(x, 'as_integer_ratio')") and believe you have tested 
this.

--
stage:  -> commit review

___
Python tracker 

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



[issue25973] Segmentation fault with nonlocal and two underscores

2015-12-29 Thread Alessandro Cucci

Alessandro Cucci added the comment:

quoting the docs:

The statement [nonlocal] allows encapsulated code to rebind variables outside 
of the local scope BESIDES the global (module) scope.

--

___
Python tracker 

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



[issue25973] Segmentation fault with nonlocal and two underscores

2015-12-29 Thread Konstantin Enchant

Konstantin Enchant added the comment:

The problem happens only when "nonlocal __something" in a class method. In your 
case f2() isn't class method.

More interesting behavior with underscores - 
https://gist.github.com/sirkonst/6eff694c4546700417ea

--

___
Python tracker 

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



[issue25940] SSL tests failed due to expired svn.python.org SSL certificate

2015-12-29 Thread Stefan Krah

Stefan Krah added the comment:

Setting to blocker because I've disabled the offending tests.

--
nosy: +georg.brandl, larry, skrah
priority: high -> release blocker

___
Python tracker 

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



[issue25973] Segmentation fault with nonlocal and two underscores

2015-12-29 Thread Alessandro Cucci

Alessandro Cucci added the comment:

I don't think the problem is about the underscores, since this work...

class Foo:
def f1(self):
__obj = object()
def f2():
nonlocal __obj
__obj = []
f2()
return isinstance(__obj, list)

f = Foo()
print(f.f1())

--
nosy: +acucci

___
Python tracker 

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



[issue25928] Add Decimal.as_integer_ratio()

2015-12-29 Thread Stefan Krah

Stefan Krah added the comment:

I've opened #25974 for the statistics.py issues.

--
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



[issue25974] Fix statistics.py after the Decimal.as_integer_ratio() change

2015-12-29 Thread Stefan Krah

New submission from Stefan Krah:

Here's a fix for the fallout from #25928.  I've set it to
release blocker to make sure we don't forget.

--
assignee: steven.daprano
components: Library (Lib)
files: statistics_as_integer_ratio.diff
keywords: 3.5regression, patch
messages: 257178
nosy: belopolsky, johnwalker, mark.dickinson, python-dev, rhettinger, 
serhiy.storchaka, skrah, steven.daprano, terry.reedy
priority: release blocker
severity: normal
status: open
title: Fix statistics.py after the Decimal.as_integer_ratio() change
type: behavior
versions: Python 3.6
Added file: http://bugs.python.org/file41446/statistics_as_integer_ratio.diff

___
Python tracker 

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



[issue25973] Segmentation fault with nonlocal and two underscores

2015-12-29 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

I get a crash when just compile the example.

--
Added file: http://bugs.python.org/file41445/test_issue25973.py

___
Python tracker 

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



[issue19873] There is a duplicate function in Lib/test/test_pathlib.py

2015-12-29 Thread NAVNEET SUMAN

NAVNEET SUMAN added the comment:

Thanks.. Finally after two years the patch got submitted. :D

--

___
Python tracker 

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



[issue25824] 32-bit 2.7.11 installer creates registry keys that are incompatible with the installed python27.dll

2015-12-29 Thread Christian Brabandt

Christian Brabandt added the comment:

Note this issue breaks Vim compiled with python support (issue: 
https://github.com/vim/vim/issues/526) and ci.appveyor.com tests (e.g. 
https://ci.appveyor.com/project/chrisbra/vim/build/211)

--
nosy: +Christian Brabandt

___
Python tracker 

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



[issue25973] Segmentation fault with nonlocal and two underscores

2015-12-29 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
nosy: +benjamin.peterson, brett.cannon, georg.brandl, ncoghlan, 
serhiy.storchaka, yselivanov

___
Python tracker 

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



[issue25973] Segmentation fault with nonlocal and two underscores

2015-12-29 Thread SilentGhost

Changes by SilentGhost :


--
components: +Interpreter Core
versions: +Python 3.5, Python 3.6 -Python 3.4

___
Python tracker 

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



[issue25973] Segmentation fault with nonlocal and two underscores

2015-12-29 Thread Konstantin Enchant

New submission from Konstantin Enchant:

Code:
# ---
__obj = object()

class Foo:
def f1(self):
nonlocal __obj

f = Foo()
f.f1()  # <-- segmentation fault
# ---

--
messages: 257174
nosy: Konstantin Enchant
priority: normal
severity: normal
status: open
title: Segmentation fault with nonlocal and two underscores
type: crash
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



[issue25918] AssertionError in lib2to3 on 2.7.11 Windows

2015-12-29 Thread Marc Schlaich

Marc Schlaich added the comment:

Not sure. Somehow I got these corrupted files just by upgrading to 2.7.11. It 
might be that they are not getting updated when installing 2.7.11 over an 
existing 2.7.10. So maybe it's worth to investigate further as others could be 
affected, too.

--

___
Python tracker 

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



[issue21815] imaplib truncates some untagged responses

2015-12-29 Thread Maciej Szulik

Maciej Szulik added the comment:

I've checked the patch: it looks good, applies cleanly to latest default and 
passes all the tests. I'm ok with merging this as is.

--

___
Python tracker 

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



[issue25856] The __module__ attribute of non-heap classes is not interned

2015-12-29 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


Removed file: http://bugs.python.org/file41443/intern_and_cache___module__.patch

___
Python tracker 

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



[issue25856] The __module__ attribute of non-heap classes is not interned

2015-12-29 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


Added file: http://bugs.python.org/file41444/intern_and_cache___module__.patch

___
Python tracker 

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