[issue23611] Pickle nested names with protocols 4

2015-03-08 Thread Serhiy Storchaka

New submission from Serhiy Storchaka:

Proposed patch allows Python implementation of the pickle module to pickle 
nested names (e.g. methods) with protocols  4. Pickled data is compatible with 
old releases.

If this is good I'll write C implementation.

--
components: Library (Lib)
files: pickle_nested_names.patch
keywords: patch
messages: 237548
nosy: alexandre.vassalotti, pitrou, serhiy.storchaka
priority: normal
severity: normal
stage: patch review
status: open
title: Pickle nested names with protocols  4
type: enhancement
versions: Python 3.5
Added file: http://bugs.python.org/file38390/pickle_nested_names.patch

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



[issue23309] Hang on interpreter shutdown if daemon thread prints to stdout

2015-03-08 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Attached patch is stricter and dumps a fatal error after the grace period.

--
Added file: 
http://bugs.python.org/file38392/bufio_lock_finalizing_fatal_error.patch

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



[issue22980] C extension naming doesn't take bitness into account

2015-03-08 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 25356d34b79b by Antoine Pitrou in branch 'default':
Issue #22980: Under Linux, C extensions now include bitness in the file name,
https://hg.python.org/cpython/rev/25356d34b79b

--

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



[issue22980] C extension naming doesn't take bitness into account

2015-03-08 Thread Antoine Pitrou

Antoine Pitrou added the comment:

I've pushed the patch for Linux. I'm keeping this issue open in case other 
platforms may (want to) benefit.

--

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



[issue23612] 3.5.0a2 Windows installer does not remove 3.5.0a1

2015-03-08 Thread Steve Dower

Steve Dower added the comment:

Looks like the way I was calculating the version number of the installer didn't 
take into account a2 and a3 - we had 3.5.0.10 for 3.5.0a*.

I think switching to $(Major).$(Minor).$(Field3Value).0 is correct here - this 
should give us 3.5.100.0, 3.5.101.0, 3.5.102.0 for 3.5.0a1-3, then 3.5.1100.0 
for 3.5.1a1, etc.

--

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



[issue23309] Hang on interpreter shutdown if daemon thread prints to stdout

2015-03-08 Thread Antoine Pitrou

Antoine Pitrou added the comment:

(note that trying to print a warning or raise an error only makes things worse 
if the stream subject to deadlock is stderr)

--

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



[issue23613] searchindex.js is annoying

2015-03-08 Thread Antoine Pitrou

Antoine Pitrou added the comment:

That's a good question :) Making it a normal multiline file would be good 
enough.

--

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



[issue23613] searchindex.js is annoying

2015-03-08 Thread Georg Brandl

Georg Brandl added the comment:

And what do you suggest to do about it?

--
nosy: +georg.brandl

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



[issue23612] 3.5.0a2 Windows installer does not remove 3.5.0a1

2015-03-08 Thread Steve Dower

New submission from Steve Dower:

Currently, 3.5.0a1 needs to be manually removed either before or after 
installing 3.5.0a2 (after *should* be okay, but before is preferable).

Installing a later version should detect and remove the earlier one. This is 
obviously an installer bug.

--
assignee: steve.dower
components: Windows
messages: 237556
nosy: steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: 3.5.0a2 Windows installer does not remove 3.5.0a1
versions: Python 3.5

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



[issue12916] Add inspect.splitdoc

2015-03-08 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

I support Yury.

--

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



[issue23309] Hang on interpreter shutdown if daemon thread prints to stdout

2015-03-08 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Your analysis sounds right to me.

--
nosy: +tim.peters

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



[issue23613] searchindex.js is annoying

2015-03-08 Thread Georg Brandl

Georg Brandl added the comment:

Well, that's not useful in a generated file.  I propose you exclude the doc 
build tree from your search, or use a grepping tool like ag that ignores files 
ignored by the vcs.

--

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



[issue23613] searchindex.js is annoying

2015-03-08 Thread Georg Brandl

Georg Brandl added the comment:

 How about we respond to all Windows-specific issues with switch to Linux?

How about we don't respond to strawman arguments?

--

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



[issue20613] Wrong line information in bytecode generated by compiler module

2015-03-08 Thread Mark Lawrence

Mark Lawrence added the comment:

Am I correct in assuming that we'd need to fix a regression in 2.7 owing to its 
extended life span, or would the compiler being deprecated make this not worth 
the trouble, or what?

--
nosy: +BreamoreBoy

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



[issue23611] Pickle nested names with protocols 4

2015-03-08 Thread Serhiy Storchaka

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


Removed file: http://bugs.python.org/file38390/pickle_nested_names.patch

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



[issue23614] Opaque error message on UTF-8 decoding to surrogates

2015-03-08 Thread Chris Angelico

New submission from Chris Angelico:

 b\xed\xb4\x80.decode(utf-8)
Traceback (most recent call last):
  File stdin, line 1, in module
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xed in position
0: invalid continuation byte

The actual problem here is that this byte sequence would decode to U+DD00, 
which, being a surrogate, is invalid for the encoding. It's correct to raise 
UnicodeDecodeError, but the text of the message is a bit obscure. I'm not sure 
whether the invalid continuation byte is talking about the 0xed in position 
0 or about one of the others; 0xED is not a continuation byte, it's a start 
byte - and a perfectly valid one:

 b\xed\x9f\xbf.decode(utf-8)
'\ud7ff'

Pike is more explicit about what the problem is:

 utf8_to_string(\xed\xb4\x80);
UTF-8 sequence beginning with 0xed 0xb4 at index 0 would decode to a
UTF-16 surrogate character.

Is this something worth fixing?

Tested on 3.4.2 and a recent build of 3.5, probably applies to most 3.x 
versions. (2.7 actually permits this, which is a bigger bug, but one with 
backward-compatibility issues.)

--
components: Interpreter Core, Unicode
messages: 237572
nosy: Rosuav, ezio.melotti, haypo
priority: normal
severity: normal
status: open
title: Opaque error message on UTF-8 decoding to surrogates
versions: Python 3.4, Python 3.5

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



[issue23081] Document PySequence_List(o) as equivalent to list(o)

2015-03-08 Thread Georg Brandl

Georg Brandl added the comment:

+1

--
nosy: +georg.brandl

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



[issue23613] searchindex.js is annoying

2015-03-08 Thread Antoine Pitrou

New submission from Antoine Pitrou:

Since I get hit by this at least once a week, I thought I'd finally report a 
bug. The Doc/build/html/searchindex.js file is extremely annoying when grepping 
through the source tree (and especially when grepping in the docs), because 
it's very likely to match your search *and* it seems made of a huge single line 
of text, meaning the grep output now fills your terminal with junk.

--
assignee: docs@python
components: Documentation
messages: 237557
nosy: docs@python, pitrou
priority: normal
severity: normal
status: open
title: searchindex.js is annoying
type: behavior
versions: Python 3.4, Python 3.5

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



[issue23611] Pickle nested names with protocols 4

2015-03-08 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Interesting. I have only skimmed through the patch, but +1 on the principle.

--

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



[issue12916] Add inspect.splitdoc

2015-03-08 Thread Martin Panter

Martin Panter added the comment:

Serhiy, would you be in favour of making it public in the pydoc module, as 
originally suggested by Yury in https://bugs.python.org/issue12916#msg216238, 
or some other module, or are you saying to reject this completely?

--

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



[issue23546] Windows, 'Edit withIDLE', and multplie installed versions

2015-03-08 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Sorry.  That has to be py -3 ...  unless you have configured 'py' to run 3.x, 
or py -m idlelib.idle ... for 2.7.

--

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



[issue23309] Hang on interpreter shutdown if daemon thread prints to stdout

2015-03-08 Thread Antoine Pitrou

Antoine Pitrou added the comment:

A possible solution is to tweak the IO lock acquire on shutdown: only wait for 
a grace period instead of waiting indefinitely. Attached patch demonstrates the 
solution (and solves the deadlock issue in your script).

--
keywords: +patch
nosy: +neologix
stage:  - patch review
Added file: http://bugs.python.org/file38391/bufio_lock_finalizing.patch

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



[issue23588] Errno conflicts in ssl.SSLError

2015-03-08 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Theoretically, SSLError could stop inheriting from OSError. Practically, it may 
break a lot of code (though in a rather noisy way that is easy to spot).

Otherwise, the best effort fix is to make our SSL error codes start at a high 
number, e.g. 2000 (but not too high, so as not to overlap with Windows' socket 
error codes, which start at 1 IIRC). See the py_ssl_error enum at the 
beginning of _ssl.c.

--
stage:  - needs patch

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



[issue23612] 3.5.0a2 Windows installer does not remove 3.5.0a1

2015-03-08 Thread Mark Lawrence

Changes by Mark Lawrence breamore...@yahoo.co.uk:


--
nosy: +BreamoreBoy

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



[issue23613] searchindex.js is annoying

2015-03-08 Thread Antoine Pitrou

Antoine Pitrou added the comment:

 Well, that's not useful in a generated file.

Well, here's a case where it's useful... Asking me to change tools is quite 
obvious and quite pointless at the same time. How about we respond to all 
Windows-specific issues with switch to Linux?

--

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



[issue23613] searchindex.js is annoying

2015-03-08 Thread Marc-Andre Lemburg

Marc-Andre Lemburg added the comment:

On 08.03.2015 20:57, Antoine Pitrou wrote:
 
 Antoine Pitrou added the comment:
 
 Well, that's not useful in a generated file.
 
 Well, here's a case where it's useful... Asking me to change tools is quite 
 obvious and quite pointless at the same time. How about we respond to all 
 Windows-specific issues with switch to Linux?

Georg suggested excluding the file from your search. That's a very
reasonable answer.

You don't have to change your tools for this,
just configure them to not look in .js files or perhaps not look
in this particular file if it returns false positives for you.

I'd suggest to close this as wont fix.

--
nosy: +lemburg

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



[issue23611] Pickle nested names with protocols 4

2015-03-08 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Fixed few bugs and added C implementation.

--
Added file: http://bugs.python.org/file38393/pickle_nested_names_2.patch

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



[issue23137] Python 2.7.9 test_gdb fails on CentOS 7

2015-03-08 Thread SilentGhost

Changes by SilentGhost ghost@gmail.com:


--
nosy: +benjamin.peterson, haypo

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



[issue22227] Simplify tarfile iterator

2015-03-08 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

The patch doesn't fix a bug and doesn't add new feature. It just rewrites the 
code in more clear manner (in my eyes). So I leave applying or rejecting the 
patch on Lars.

--
assignee:  - lars.gustaebel

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



[issue23003] traceback.{print_exc, print_exception, format_exc, format_exception}: Potential AttributeError

2015-03-08 Thread Berker Peksag

Berker Peksag added the comment:

This is no longer an issue after issue 17911.

--
resolution:  - out of date
stage: patch review - resolved
status: open - closed

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



[issue23602] Implement __format__ for Fraction

2015-03-08 Thread Eric V. Smith

Eric V. Smith added the comment:

I'm not sure it needs fixing: it follows from the definition of using 
Decimal(num) / Decimal(denom). Plus, it's controllable with a decimal context:

 from decimal import localcontext
 with localcontext() as ctx:
...   ctx.prec = 100
...   format(F(1, 3), '.30f')
...
'0.33'


For all of the tests, I suggest using format(value, str) instead of 
''.format(value). It more directly tests Fraction.__format__.

In general I think adding Fraction.__format__ is a good idea, and I think 
converting to Decimal is reasonable for the specified codes. My only question 
is what to do when natively formatting Fractions themselves. We might want to 
support field widths, padding, etc.

--

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



[issue23602] Implement __format__ for Fraction

2015-03-08 Thread Martin Panter

Martin Panter added the comment:

I’ve never actually used the Fraction class, but I doubt its behaviour should 
depend on whatever settings are in the current decimal context. Maybe you can 
extract the precision out of the format string, and base the internal decimal 
object on that.

--

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



[issue23137] Python 2.7.9 test_gdb fails on CentOS 7

2015-03-08 Thread Mark Lawrence

Mark Lawrence added the comment:

Frankly I've no idea who should be looking at this issue.

--
nosy: +BreamoreBoy
type:  - behavior

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



[issue23159] argparse: Provide equivalent of optparse.OptionParser.{option_groups, option_list, get_option}

2015-03-08 Thread Mark Lawrence

Changes by Mark Lawrence breamore...@yahoo.co.uk:


--
nosy: +bethard, paul.j3

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



[issue22928] HTTP header injection in urrlib2/urllib/httplib/http.client

2015-03-08 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

May be not drop folding support, but just deprecate the putheader() 
multi-argument mode? And of course add sanity checks for separate putheader() 
arguments.

--

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



[issue23602] Implement __format__ for Fraction

2015-03-08 Thread Tuomas Suutari

Tuomas Suutari added the comment:

Serhiy Storchaka wrote:
 from fractions import Fraction as F
 format(F(1, 3), '.30f')
 '0.00'

Good catch! I'll try to fix this and add some more test cases.

--

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



[issue11705] sys.excepthook doesn't work in imported modules

2015-03-08 Thread Claudiu Popa

Changes by Claudiu Popa pcmantic...@gmail.com:


--
resolution:  - not a bug
stage:  - resolved
status: open - closed

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



[issue10805] traceback.print_exception throws AttributeError when exception is None

2015-03-08 Thread Claudiu Popa

Claudiu Popa added the comment:

This was recently fixed in 3.5 by 73afda5a4e4c.

--
nosy: +Claudiu.Popa
resolution:  - fixed
stage:  - resolved
status: open - closed

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




[issue23027] test_warnings fails with -Werror

2015-03-08 Thread Mark Lawrence

Mark Lawrence added the comment:

This can be reproduced with 3.5 on Windows 8.1.

--
nosy: +BreamoreBoy

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



[issue21619] Cleaning up a subprocess with a broken pipe

2015-03-08 Thread Serhiy Storchaka

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


--
status: open - closed

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



[issue23612] 3.5.0a2 Windows installer does not remove 3.5.0a1

2015-03-08 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 97e01e107591 by Steve Dower in branch 'default':
Issue #23612: Fixes upgrade code and version for Windows installer.
https://hg.python.org/cpython/rev/97e01e107591

--
nosy: +python-dev

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



[issue23610] -m arg behavior

2015-03-08 Thread Josh Rosenberg

Josh Rosenberg added the comment:

This is intentional and documented behavior: 
https://docs.python.org/3/library/__main__.html

--
nosy: +josh.r

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



[issue20257] test_socket fails if using tipc module and SELinux enabled

2015-03-08 Thread Mark Lawrence

Mark Lawrence added the comment:

LGTM so can we have a formal patch review please, thanks.

--
nosy: +BreamoreBoy
versions: +Python 3.5 -Python 3.3

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



[issue23496] Steps for Android Native Build of Python 3.4.2

2015-03-08 Thread Ryan Gonzalez

Ryan Gonzalez added the comment:

I'm getting a weird error message building python:

ryan@DevPC-LX:~/stuff/cpydroid$ make
_PYTHON_PROJECT_BASE=/home/ryan/stuff/cpython _PYTHON_HOST_PLATFORM=linux-arm 
PYTHONPATH=./Lib:./Lib/plat-linux python3 -S -m sysconfig --generate-posix-vars 
;\
if test $? -ne 0 ; then \
echo generate-posix-vars failed ; \
rm -f ./pybuilddir.txt ; \
exit 1 ; \
fi
Could not import runpy module
Traceback (most recent call last):
  File ./Lib/runpy.py, line 15, in module
import importlib.util
  File ./Lib/importlib/util.py, line 6, in module
from ._bootstrap import module_from_spec
ImportError: cannot import name 'module_from_spec'
generate-posix-vars failed
make: *** [pybuilddir.txt] Error 1
ryan@DevPC-LX:~/stuff/cpydroid$ 


I'm trying to build for generic ARM Linux before I attempt updating the 
changes. Makes sense theoretically.

Then again, when using autotools, NOTHING ever makes sense. I'm probably 
looking in the wrong direction...

--

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



[issue21295] Python 3.4 gives wrong col_offset for Call nodes returned from ast.parse

2015-03-08 Thread Mark Shannon

Mark Shannon added the comment:

You are on the nosy list. You should have got sent an email.

This bug is the regression.
https://hg.python.org/cpython/rev/7c5c678e4164/ resulted in incorrect column 
offsets for many compound expressions.

--

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



[issue2292] Missing *-unpacking generalizations

2015-03-08 Thread Neil Girdhar

Changes by Neil Girdhar mistersh...@gmail.com:


Added file: http://bugs.python.org/file38395/starunpack36.diff

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



[issue20617] test_ssl does not use mock

2015-03-08 Thread Mark Lawrence

Changes by Mark Lawrence breamore...@yahoo.co.uk:


--
keywords: +patch
versions: +Python 3.5 -Python 3.4
Added file: http://bugs.python.org/file38396/issue20617.diff

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



[issue23614] Opaque error message on UTF-8 decoding to surrogates

2015-03-08 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

UTF-8 codec can't decode byte 0xed because 0xed is not valid UTF-8 sequence and 
following byte is not expected valid continuation byte.

UTF-8 codec can produce errors of three types:

* invalid start byte. When the byte is not start byte of UTF-8 sequence 
(%x00-7F, %xC2-F4).
* invalid continuation byte.  When the byte that follow unfinished UTF-8 
sequence is not valid continuation byte (the validity depends on previous byte).
* unexpected end of data. When the there are no bytes after unfinished UTF-8 
sequence.

--
nosy: +serhiy.storchaka

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



[issue23602] Implement __format__ for Fraction

2015-03-08 Thread Martin Panter

Martin Panter added the comment:

Regarding sharing fractions._parse_format_specifier(), perhaps have a look at 
_pydecimal._parse_format_specifier()

--

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



[issue21295] Python 3.4 gives wrong col_offset for Call nodes returned from ast.parse

2015-03-08 Thread Sven Brauch

Sven Brauch added the comment:

Hmm, strange, I did not receive any emails.

Incorrect by what definition of incorrect? The word does not really help to 
clarify the issue you see with this change, since the behaviour was changed on 
purpose. What is the (preferably real-world) application which is broken by 
this change?

--

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



[issue23615] Reloading tokenize breaks tokenize.open()

2015-03-08 Thread Thomas Kluyver

New submission from Thomas Kluyver:

Issue #22599 changed tokenize.open() from using builtins.open() to having a 
module-level reference to _builtin_open, stored by doing _builtin_open = open. 
However, on reloading the module, _builtin_open is pointed to tokenize.open 
from the last execution of the code, breaking tokenize.open():

 import tokenize
 tokenize.open
function open at 0x7f15b660fc80
 tokenize._builtin_open
built-in function open
 import imp; imp.reload(tokenize)
module 'tokenize' from 
'/home/takluyver/miniconda3/envs/py34/lib/python3.4/tokenize.py'
 tokenize.open
function open at 0x7f15b660fbf8
 tokenize._builtin_open
function open at 0x7f15b660fc80
 tokenize.open('foo.py')
Traceback (most recent call last):
  File stdin, line 1, in module
  File /home/takluyver/miniconda3/envs/py34/lib/python3.4/tokenize.py, line 
438, in open
buffer = _builtin_open(filename, 'rb')
TypeError: open() takes 1 positional argument but 2 were given

The actual case where I'm seeing this error is nose logging a failure in a test 
suite, so it's not clear what is reloading tokenize, but it appears that 
something is. This just started failing when our Windows test system updated to 
Python 3.4.3.

--
components: Library (Lib)
messages: 237588
nosy: haypo, takluyver
priority: normal
severity: normal
status: open
title: Reloading tokenize breaks tokenize.open()
versions: Python 3.4, Python 3.5

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



[issue22341] Python 3 crc32 documentation clarifications

2015-03-08 Thread Martin Panter

Martin Panter added the comment:

Posting a new patch that also removes the masking from the gzip, zipfile, 
tarfile, and test_zlib modules. I removed the comment about signedness in 
tarfile; let me know if you saw any others.

--
versions: +Python 3.5 -Python 3.4
Added file: http://bugs.python.org/file38398/crc-sign.v2.patch

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



[issue19610] setup.py does not allow a tuple for classifiers

2015-03-08 Thread Éric Araujo

Éric Araujo added the comment:

I think the change is acceptable.

--

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



[issue23613] searchindex.js is annoying

2015-03-08 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Lib/pydoc_data/topics.py was extremely annoying to me for the same reason. I 
even didn't know about Doc/build/html/searchindex.js because it has different 
extension. Finally I had written few scripts like:

$ cat ~/bin/findpy
#!/bin/sh
find * -name '*.py' ! -path '*Lib/pydoc_data/topics.py' ! -path '*Lib/plat-*' 
-exec egrep -n --color $@ '{}' +

and similar for *.[ch] and *.rst, and forgot about this problem.

--
nosy: +serhiy.storchaka

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



[issue21295] Python 3.4 gives wrong col_offset for Call nodes returned from ast.parse

2015-03-08 Thread Sven Brauch

Sven Brauch added the comment:

Why did you not CC me in this discussion? It is not very nice to have this 
behaviour changed back from what I relied upon in a minor version without 
notice.

Which regression was effectively caused by this patch, except for the 
documentation being out of date?

--
nosy: +scummos

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



[issue23612] 3.5.0a2 Windows installer does not remove 3.5.0a1

2015-03-08 Thread Steve Dower

Steve Dower added the comment:

Two parts to this - first that I was using the wrong version, but also the 
wrong upgrade code for the bundle. Those are both fixed now, but it does mean 
that both 3.5.0a1 and a2 will need to be manually uninstalled.

It is possible to add a list of the upgrade codes that have already been 
released and remove those too, but since they are only alphas I'm not worried 
about requiring manual uninstall of those versions.

--

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



[issue23529] Limit decompressed data when reading from LZMAFile, BZ2File, GzipFile

2015-03-08 Thread Martin Panter

Martin Panter added the comment:

I have decided not to reuse the same _DecompressReader for the gzip module. 
This is because the code for parsing the gzip header pulls in data by calling 
read(), and I would have to adapt this code to accept whatever data is pushed 
to it via a decompress() method. However I have rewritten the “gzip” module to 
use BufferedReader, removing its own readline() etc implementations.

I have split the BaseStream and DecompressReader classes into a new file called 
Lib/_compression.py. Let me know if there is anything else to be done to add a 
new file in the Lib/ directory, or if you have any better ideas where these 
classes should live.

Other changes in the new patch (LZMAFile-etc.v4.patch):
* Fix documented GzipFile.peek(n) signature to match implementation
* Removed unused and inconsistent code paths in gzip._PaddedFile
* New code assumes zlib.decompressobj().flush() returns a limited amount of 
data, since it has no “max_length” parameter. In reality I think flush() does 
not do anything at all and should be deprecated or removed; see Issue 23200.

I hope that the patch does not need any more major changes, so it should be 
ready for review. There are a few more suggested enhancements that I have not 
implemented. While they would be nice, I would prefer to handle them in 
separate bugs and patches. I believe strengthening Python against gzip bombs is 
important, and any extra refactoring of the code will probably make things 
harder to review, more likely to break, and less likely to make it into 3.5.

Some possible enhancements I did not do:
* Support open(buffering=...) parameter, passing through to the 
[...]File(buffer_size=...) parameter
* open(buffering=0) returning an unbuffered reader object, probably just a 
direct DecompressReader instance
* detach() method on the BufferedIOBase file classes
* Further factoring out of a common CompressedFile base class
* Apply the buffer size parameter to write mode
* Rewrite the gzip module to use the common DecompressReader base class

--
title: Limit decompressed data when reading from LZMAFile and BZ2File - Limit 
decompressed data when reading from LZMAFile, BZ2File, GzipFile
Added file: http://bugs.python.org/file38397/LZMAFile-etc.v4.patch

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



[issue23602] Implement __format__ for Fraction

2015-03-08 Thread Tuomas Suutari

Tuomas Suutari added the comment:

Eric V. Smith wrote:
 I'm not sure it needs fixing: it follows from the definition of using 
 Decimal(num) / Decimal(denom). Plus, it's controllable with a decimal context:

Hmm... Even though it's tempting to agree with you and just ignore the
precision bug, but to be honest I have to agree with Martin Panter
here. Depending on the current decimal context is not the way of
Least Surprise when formatting Fractions.

 For all of the tests, I suggest using format(value, str) instead of 
 ''.format(value). It more directly tests Fraction.__format__.

I agree. Will change those.

 In general I think adding Fraction.__format__ is a good idea, and I think 
 converting to Decimal is reasonable for the specified codes. My only question 
 is what to do when natively formatting Fractions themselves. We might want 
 to support field widths, padding, etc.

Thanks! Actually I already tried to support field widths, padding and
such. (See the test cases.) Or what do you mean?

--

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



[issue23602] Implement __format__ for Fraction

2015-03-08 Thread Tuomas Suutari

Tuomas Suutari added the comment:

Here's the next round of the patch.

For formatting fractions with any given precision I had to parse the precision 
from format specifier and at this point it seemed easier to just create a 
general parser for the Format Specification Mini-Language.  In this patch it is 
implemented in fractions._parse_format_specifier function, but maybe this kind 
of general function should be moved to better place and be documented and 
exported. What do you think?

--
Added file: http://bugs.python.org/file38394/issue23602v2.patch

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



[issue23613] searchindex.js is annoying

2015-03-08 Thread Martin Panter

Martin Panter added the comment:

My own one-liner kicking around in my Bash history that uses GNU Grep options 
to avoid specific files and directories:

grep -r . --exclude-dir={.git,.hg} --exclude={refcounts.dat,*.js} -nIwe 
PIPE_MAX_SIZE

--
nosy: +vadmium

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



[issue22928] HTTP header injection in urrlib2/urllib/httplib/http.client

2015-03-08 Thread Demian Brecht

Demian Brecht added the comment:

After a chat with David and getting my head wrapped more around backwards 
compatibility, I also agree that the changes in the patch are far too strict. 
It's much more important to preserve backwards compatibility than to strictly 
conform to the RFC.

I've updated the patch to allow for (what should be) anything that was 
previously allowed as header name/value pairs minus carriage returns not 
immediately followed by a tab or space (obs-fold: CRLF 1*( SP / HTAB )). This 
change fixes the reported issue but should not otherwise affect backwards 
compatibility.

Additionally, even though line folding is deprecated by RFC 7230, I don't think 
it's necessarily an issue to support line folding until proven to be a problem 
in practice. With the current implementation, users have the ability to conform 
to the target server/proxy requirements, based on errors (if obs-fold isn't 
transparently dealt with as suggested) yielded by each as defined in the RFC. 
In light of that, I don't think that it's even worthwhile to start deprecating 
multi-parameter putheader at this point (but I'm open to argument on that one).

One note on the deprecation is that if we deprecate multi-parameter, we should 
also add a warning if an embedded line fold is detected in a single headers 
value.

--
Added file: http://bugs.python.org/file38399/issue22928_4.patch

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



[issue23546] Windows, 'Edit withIDLE', and multplie installed versions

2015-03-08 Thread Zachary Ware

Zachary Ware added the comment:

Terry J. Reedy added the comment:
 Sorry.  That has to be py -3 ...  unless you have configured 'py' to
run 3.x, or py -m idlelib.idle ... for 2.7.


Any reason not to add idlelib.__main__ to 2.7? It works the same in either
version, as far as I can tell.

--

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



[issue23610] -m arg behavior

2015-03-08 Thread Zachary Ware

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


--
resolution:  - not a bug
stage:  - resolved
status: open - closed

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



[issue23603] Embedding Python3.4 - PyUnicode_Check fails (MinGW-W64)

2015-03-08 Thread Ashish Sadanandan

Ashish Sadanandan added the comment:

Thanks for the reply. MSVC does produce the expected results, I forgot to 
mention that earlier.

So I guess this means I can't realistically expect anyone to look into this 
problem? I can switch to MSVC but the spotty C++11/14 support is irritating to 
have to live with.

--

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



[issue23103] Reduce memory usage for ipaddress object instances

2015-03-08 Thread Nick Coghlan

Nick Coghlan added the comment:

For the record, I don't think the weakref support is likely to be particularly 
useful either, and if we'd used __slots__ from the beginning, I expect we would 
have left it out.

It's specifically the idea of *taking weakref support away* when weakrefs 
currently work that seems dubious to me.

It may be worth asking the question on Python dev, as it's possible I'm being 
overly cautious, and it would be reasonable to drop the weakref support in 
3.5.0, while mentioning in the 3.5 porting notes that we'd be open to the idea 
of adding weakref support back in a 3.5.x maintenance release if anyone reports 
its removal as a regression from 3.4.

--

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



[issue23103] Reduce memory usage for ipaddress object instances

2015-03-08 Thread Antoine Pitrou

Antoine Pitrou added the comment:

-1 on dropping weakref support. It's a feature, and it costs almost nothing.

--

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



[issue23608] ssl.VERIFY_X509_TRUSTED_FIRST: Incorrect value for versionadded

2015-03-08 Thread Arfrever Frehtes Taifersar Arahesis

New submission from Arfrever Frehtes Taifersar Arahesis:

Commit bb6fb47e0141 added .. versionadded:: 3.4.5 in documentation of 
ssl.VERIFY_X509_TRUSTED_FIRST, but next version of Python 3.4 will be 3.4.4.

--
assignee: benjamin.peterson
components: Documentation
messages: 237531
nosy: Arfrever, alex, benjamin.peterson, christian.heimes, dstufft, 
giampaolo.rodola, janssen, pitrou
priority: normal
severity: normal
status: open
title: ssl.VERIFY_X509_TRUSTED_FIRST: Incorrect value for versionadded
versions: Python 3.4, Python 3.5

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



[issue23606] ctypes.util.find_library(c) no longer makes sense

2015-03-08 Thread Steve Dower

Steve Dower added the comment:

That was my original thought, but it's going to lose all of its named exports 
and effectively become useless for this.

--

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



[issue18173] Add MixedTypeKey to reprlib

2015-03-08 Thread Berker Peksag

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


--
nosy: +berker.peksag

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



[issue23608] ssl.VERIFY_X509_TRUSTED_FIRST: Incorrect value for versionadded

2015-03-08 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 8264652bce68 by Benjamin Peterson in branch '3.4':
indicate correct version (closes #23608)
https://hg.python.org/cpython/rev/8264652bce68

New changeset ce67f965a37d by Benjamin Peterson in branch 'default':
merge 3.4 (#23608)
https://hg.python.org/cpython/rev/ce67f965a37d

--
nosy: +python-dev
resolution:  - fixed
stage:  - resolved
status: open - closed

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



[issue18173] Add MixedTypeKey to reprlib

2015-03-08 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

See also issue22721.

--
nosy: +serhiy.storchaka

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



[issue23607] Inconsistency in datetime.utcfromtimestamp(Decimal)

2015-03-08 Thread Serhiy Storchaka

New submission from Serhiy Storchaka:

First, datetime.utcfromtimestamp() drops fractional part of Decimal argument:

 import datetime
 from decimal import Decimal as D
 datetime.datetime.utcfromtimestamp(1425808327.307651)
datetime.datetime(2015, 3, 8, 9, 52, 7, 307651)
 datetime.datetime.utcfromtimestamp(D(1425808327.307651))
datetime.datetime(2015, 3, 8, 9, 52, 7)

Second, it works only with C implementation. With Python implementation 
Decimals are not supported at all.

 del sys.modules['datetime']
 sys.modules['_datetime'] = None
 import datetime
 datetime.datetime.utcfromtimestamp(D(1425808327.307651))
Traceback (most recent call last):
  File stdin, line 1, in module
  File /usr/lib/python3.4/datetime.py, line 1374, in utcfromtimestamp
t, frac = divmod(t, 1.0)
TypeError: unsupported operand type(s) for divmod(): 'decimal.Decimal' and 
'float'

In 2.7 Decimals are accepted and are not truncated.

 import datetime
 from decimal import Decimal as D
 datetime.datetime.utcfromtimestamp(D(1425808327.307651))
datetime.datetime(2015, 3, 8, 9, 52, 7, 307651)

So this can be considered as a regression.

--
components: Library (Lib)
messages: 237527
nosy: belopolsky, lemburg, serhiy.storchaka
priority: normal
severity: normal
status: open
title: Inconsistency in datetime.utcfromtimestamp(Decimal)
type: behavior
versions: Python 3.4, Python 3.5

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



[issue23591] Add IntFlags

2015-03-08 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

I choose repr() so that for single flag it looks as for IntEnum instance. Other 
variants except Perm.R|Perm.W: 3 have different format. Perm.R|Perm.W: 3 is 
too verbose, it repeats the same class name multiple times.

But I don't like current repr.

Other operators are not overridden for purpose. IntFlags is int and can be used 
in all cases when int is used, but not in all cases the result should preserve 
the type. FLAG1 + FLAG2 works as if flags would be ints, but it should be 
rewritten to FLAG1 | FLAG2 to got the benefit from using IntFlags.

However I forgot to override the exclusive-or operator. It should be overridden.

Updated patch changes str and repr, override the exclusive-or operator and adds 
some documentation.

--
Added file: http://bugs.python.org/file38387/intflags_2.patch

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



[issue11957] re.sub confusion between count and flags args

2015-03-08 Thread Serhiy Storchaka

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


--
dependencies: +Add IntFlags

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



[issue23144] html.parser.HTMLParser: setting 'convert_charrefs = True' leads to dropped text

2015-03-08 Thread Ezio Melotti

Ezio Melotti added the comment:

 A context manager here would seem a bit strange.

I still haven't thought this through, but I can't see any problem with it right 
now.  This would be similar to:

  from contextlib import closing
  with closing(MyHTMLParser()) as parser:
  parser.feed(html)

and this already seems to work fine, including with OP's case.

 If an exception is raised inside the context manager,
 should close() be called (like for file objects), or not?

The parser is guaranteed to never raise parsing-related errors during parsing, 
so this shouldn't be an issue.  I will open a new issue after fixing this so we 
can keep discussing there.

--

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



[issue19989] Error while sending function code over queue (multiprocessing)

2015-03-08 Thread Davin Potts

Davin Potts added the comment:

While the mockup of the code that you provided is of some help, it is still 
unclear whether the problem could originate from your hand-rolled 
serialization/de-serialization implementation or somewhere else.  The traceback 
you shared could even suggest an unrelated problem in your project's code.  
Without more information or, ideally, a runnable example of the problem that 
can be shared, there does not appear to be a way to take this forward.

Can more information be shared or a more complete example triggering the 
described behavior?

--
nosy: +davin
status: open - pending
type: crash - behavior

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



[issue23491] PEP 441 - Improving Python Zip Application Support

2015-03-08 Thread Berker Peksag

Berker Peksag added the comment:

I left a couple of minor comments on Rietveld.

--
nosy: +berker.peksag
stage:  - patch review

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



[issue21505] cx_freeze multiprocessing bug

2015-03-08 Thread Davin Potts

Davin Potts added the comment:

Can the OP provide a runnable example to help us understand what they are 
actually trying to do?

There is simply not enough information for us to go on here -- Torsten's 
suggestion is a good one but we need more information to help any further.

--
nosy: +davin
status: open - pending

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



[issue23309] Hang on interpreter shutdown if daemon thread prints to stdout

2015-03-08 Thread Mark Lawrence

Changes by Mark Lawrence breamore...@yahoo.co.uk:


--
nosy: +pitrou

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



[issue23331] Add non-interactive version of Bdb.runcall

2015-03-08 Thread Mark Lawrence

Changes by Mark Lawrence breamore...@yahoo.co.uk:


--
nosy: +georg.brandl

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



[issue23279] test_site/test_startup_imports fails when mpl_toolkit or logilab based modules installed

2015-03-08 Thread Brett Cannon

Brett Cannon added the comment:

Python's startup performance is very sensitive to what modules get imported for 
all Python programs. The tests that are failing for you make sure that a core 
developer doesn't accidentally introduce a new startup dependency and thus slow 
startup times without doing so purposefully. So the tests are working as 
intended, you unfortunately just happen to have a startup environment thanks to 
those .pth files which trigger the failures.

--
resolution:  - not a bug
status: open - closed

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



[issue23609] Export PyModuleObject in moduleobject.h

2015-03-08 Thread Hristo Venev

New submission from Hristo Venev:

Please export PyModuleObject in moduleobject.h.

It's useful for subclassing module in C.

--
components: Interpreter Core
messages: 237543
nosy: h.venev
priority: normal
severity: normal
status: open
title: Export PyModuleObject in moduleobject.h
versions: Python 3.4

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



[issue12916] Add inspect.splitdoc

2015-03-08 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

I doubt that inspect is better place for splitdoc() than pydoc. So count my 
voice against moving splitdoc().

--
nosy: +serhiy.storchaka

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



[issue5527] multiprocessing won't work with Tkinter (under Linux)

2015-03-08 Thread Davin Potts

Davin Potts added the comment:

Unable to reproduce on Ubuntu 12.04.5 with Python 2.7.8 and current libtk8.5 
and libtcl8.5 releases using the attached hanger.py example.

Key findings to-date:
1. Posts to this issue have concluded that there exists a problem with thread- 
and process-safety in specific parts of Tcl library routines and that this 
known issue is addressed in more recent releases.
2. For those affected versions of the Tcl libraries, there is a workaround for 
in building those libraries to prevent the issue.
3. The Python Tkinter module (nor other standard library modules) does not 
appear to be a source of the described behaviors.  Furthermore, Richard offers 
yet another workaround through multiprocessing's spawn.


The question was raised whether there should be a note added to the Tkinter 
module's docs about this situation.  Because this issue is the result of 
particular versions on particular platforms built in a particular way and the 
issue appears addressed in current releases of those third party libraries, it 
probably makes good sense to track this sort of issue in the Tcl/Tk projects 
themselves and not in the Tkinter module's docs.  If others encountering this 
issue in the future feel it is still too easy to end up with the right (wrong) 
combination of platform+tcl_version+build, they are encouraged to please open a 
new issue requesting a note be added to the documentation for Tkinter.

Closing this issue, marking it as third party.

--
nosy: +davin
resolution:  - third party
stage: needs patch - resolved
status: open - closed

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



[issue23607] Inconsistency in datetime.utcfromtimestamp(Decimal)

2015-03-08 Thread SilentGhost

SilentGhost added the comment:

Here is the python-only fix that eliminates TypeError and produces correct 
number of milliseconds. The problem with C implementation lies in 
_PyTime_ObjectToDenominator function where there is an explicit check for a 
float. This check could be relaxed to include decimals as the rest of the code 
seem to work fine with decimal. I'm not entirely sure how that could be done 
though.

--
keywords: +patch
nosy: +SilentGhost
stage:  - needs patch
Added file: http://bugs.python.org/file38388/issue23607_python.diff

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



[issue23491] PEP 441 - Improving Python Zip Application Support

2015-03-08 Thread Paul Moore

Paul Moore added the comment:

New patch incorporating Berker's comments

--
Added file: http://bugs.python.org/file38389/pep-441.v5.patch

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



[issue23008] pydoc enum.{,Int}Enum fails

2015-03-08 Thread Mark Lawrence

Changes by Mark Lawrence breamore...@yahoo.co.uk:


--
type:  - behavior

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



[issue23081] Document PySequence_List(o) as equivalent to list(o)

2015-03-08 Thread Mark Lawrence

Mark Lawrence added the comment:

LGTM, can we have a formal review please.

--
nosy: +BreamoreBoy

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



[issue23546] Windows, 'Edit withIDLE', and multplie installed versions

2015-03-08 Thread Liam Marsh

Liam Marsh added the comment:

the py -m idlelib -e file command failed!
(issue 23610 created)

otherwise, yes, different versions of the edit with idle command sounds 
better.

--

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



[issue23610] -m arg behavior

2015-03-08 Thread Liam Marsh

New submission from Liam Marsh:

hello!

trying the solutions proposed by the 23546'th issue, i found that the -m 
argument, for packages (like tkinter, or idlelib; not io or socket), trys to 
find the __main__ file, not the __init__ file, which is the main file of 
any package.

is that a problem?

thank you for reading this, and have a nice day/evening!

--
components: Interpreter Core, Library (Lib)
messages: 237546
nosy: Liam.Marsh
priority: normal
severity: normal
status: open
title: -m arg behavior
type: behavior

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



[issue23384] urllib.proxy_bypass_registry slow down under Windows if website has no reverse DNS and Fiddler is runing

2015-03-08 Thread Mark Lawrence

Changes by Mark Lawrence breamore...@yahoo.co.uk:


--
components: +Library (Lib)
nosy: +orsenthil

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