[issue23220] Documents input/output effects of how IDLE runs user code

2015-09-28 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Issue #21995 discussed same issue from cause side, as opposed to result. The 
new section is partly based on what I wrote above.  I am not satisfied with it 
yet.

New changeset ac6ade0c5927 by Terry Jan Reedy in branch '2.7':
Issue 21995: Explain some differences between IDLE and console Python.
https://hg.python.org/cpython/rev/ac6ade0c5927

New changeset ca6c9cc77c20 by Terry Jan Reedy in branch '3.4':
Issue 21995: Explain some differences between IDLE and console Python.
https://hg.python.org/cpython/rev/ca6c9cc77c20

--
assignee: docs@python -> terry.reedy
stage: patch review -> needs patch

___
Python tracker 

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



[issue21995] Idle: pseudofiles have no buffer attribute.

2015-09-28 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Related #23220 has draft of part of what pushed.  I want to do more on the 
subject.

--
assignee: docs@python -> terry.reedy

___
Python tracker 

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



[issue25262] Issues with BINUNICODE8 and BINBYTES8 opcodes in pickle

2015-09-28 Thread Serhiy Storchaka

New submission from Serhiy Storchaka:

There are issues with BINUNICODE8 and BINBYTES8 opcodes in pickle.

1. Unpickling BINBYTES8 is not implemented in Python implementation.

2. Highest 32 bits of 64-bit size are silently ignored in C implementation on 
32-bit platforms.

3. There are no tests for BINUNICODE8 and BINBYTES8.

Proposed patch fixes these issues.

--
assignee: serhiy.storchaka
components: Extension Modules, Library (Lib), Tests
files: pickle_binbytes8.patch
keywords: patch
messages: 251823
nosy: alexandre.vassalotti, pitrou, serhiy.storchaka
priority: normal
severity: normal
stage: patch review
status: open
title: Issues with BINUNICODE8 and BINBYTES8 opcodes in pickle
type: behavior
versions: Python 3.4, Python 3.5, Python 3.6
Added file: http://bugs.python.org/file40615/pickle_binbytes8.patch

___
Python tracker 

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



[issue24028] Idle: add doc subsection on calltips

2015-09-28 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 395d363e34e1 by Terry Jan Reedy in branch '2.7':
Issue #24028: Add subsection about Idle calltips.
https://hg.python.org/cpython/rev/395d363e34e1

New changeset 8103dadb9ef7 by Terry Jan Reedy in branch '3.4':
Issue #24028: Add subsection about Idle calltips.
https://hg.python.org/cpython/rev/8103dadb9ef7

New changeset 3481c466926a by Terry Jan Reedy in branch '3.5':
Merge with 3.4, Issue #24028: Add subsection about Idle calltips.
https://hg.python.org/cpython/rev/3481c466926a

New changeset e025bdffd71c by Terry Jan Reedy in branch 'default':
Merge with 3.5, Issue #24028: Add subsection about Idle calltips.
https://hg.python.org/cpython/rev/e025bdffd71c

--
nosy: +python-dev

___
Python tracker 

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



[issue24028] Idle: add doc subsection on calltips

2015-09-28 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
resolution:  -> fixed
stage: needs patch -> resolved
status: open -> closed
versions: +Python 3.6

___
Python tracker 

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



[issue25258] HtmlParser doesn't handle void element tags correctly

2015-09-28 Thread Xiang Zhang

Xiang Zhang added the comment:

>From the specification, void element has no end tag, so I think this
behaviour can not be called incorrect. For void element, only
handle_starttag is called.

And for start tag ends with '/>', actually HTMLParser calls
handle_startendtag, which invokes handle_starttag and
handle_endtag.

I think there are two solutions, filter void elements in the library
and then invoke handle_startendtag, or filter void elements in the
application in handle_starttag and then invoke handle_endtag.

--
nosy: +xiang.zhang

___
Python tracker 

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



[issue25091] Windows Installer uses small font

2015-09-28 Thread Steve Dower

Changes by Steve Dower :


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



[issue21506] Windows MSI installer should mklink (symlink) python.exe to python2.7.exe

2015-09-28 Thread Steve Dower

Steve Dower added the comment:

The file is so small that a second copy is just as cheap - literally everything 
is in the DLL. It could certainly be added to 3.6, and I'll probably get to it 
eventually, but right now I'm still focused on 3.5.

--

___
Python tracker 

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



[issue25261] Incorrect Return Values for any() and all() Built-in Functions

2015-09-28 Thread Zachary Ware

Changes by Zachary Ware :


--
components: +Library (Lib) -Build
status: open -> closed

___
Python tracker 

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



[issue25250] AttributeError: 'MSVCCompiler' object has no attribute '_MSVCCompiler__version'

2015-09-28 Thread Steve Dower

Steve Dower added the comment:

if sys.version_info[:2] >= (3, 3):
# MSVC version is >= 9.0

Alternatively:

if sys.version_info[:2] >= (3, 5):
# MSVC version is >= 14.0, or
# _msvccompiler.MSVCCompiler does not have __version

or

if self.compiler.compiler_type == "msvc" and int(getattr(self.compiler, 
'_MSVCCompiler__version'), 10) <= 9:
# MSVC version is >= 9.0

--

___
Python tracker 

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



[issue24773] Implement PEP 495 (Local Time Disambiguation)

2015-09-28 Thread Tim Peters

Changes by Tim Peters :


--
nosy: +tim.peters

___
Python tracker 

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



[issue25261] Incorrect Return Values for any() and all() Built-in Functions

2015-09-28 Thread Tim Peters

Tim Peters added the comment:

You wholly consume the iterator after the first time you apply `list()` to it.  
Therefore both `any()` and `all()` see an empty iterator, and return the 
results appropriate for an empty sequence:

>>> multiples_of_6 = (not (i % 6) for i in range(1, 10))
>>> list(multiples_of_6)
[False, False, False, False, False, True, False, False, False]
>>> list(multiples_of_6)  # note:  the iterator is exhausted!
[]
>>> any([])
False
>>> all([])
True

--
nosy: +tim.peters
resolution:  -> not a bug
stage:  -> resolved

___
Python tracker 

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



[issue25261] Incorrect Return Values for any() and all() Built-in Functions

2015-09-28 Thread Steven D'Aprano

Steven D'Aprano added the comment:

Not a bug. You have used a generator expression, so it is exhausted once 
you have run over it once using list(). Then, you run over it again with 
any() and all(), but they don't see any values so return the default 
value.

Change the generator expression to a list comprehension [ ... ] and you 
will get the results you want.

--
nosy: +steven.daprano

___
Python tracker 

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



[issue25261] Incorrect Return Values for any() and all() Built-in Functions

2015-09-28 Thread Sreenivasulu Saya

New submission from Sreenivasulu Saya:

The results displayed by the any() and all() is incorrect (differs from what is 
documented and what makes sense).

Here is the code:
-
multiples_of_6 = (not (i % 6) for i in range(1, 10))

print("List: ", list(multiples_of_6 ), "\nAny: ", any(multiples_of_6),
"\nAll: ", all(multiples_of_6))
---

The distribution in use is:
Python 3.5.0 (v3.5.0:374f501f4567, Sep 13 2015, 02:27:37) [MSC v.1900 64 bit 
(AMD64)] on win32

Here is the output on Windows7:
---
List:  [False, False, False, False, False, True, False, False, False]
Any:  False< This should be True
All:  True < This should be False

--
components: Build
messages: 251816
nosy: Sreenivasulu Saya
priority: normal
severity: normal
status: open
title: Incorrect Return Values for any() and all() Built-in Functions
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



[issue25233] AssertionError from asyncio Queue get

2015-09-28 Thread Guido van Rossum

Changes by Guido van Rossum :


--
assignee:  -> gvanrossum
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



[issue24773] Implement PEP 495 (Local Time Disambiguation)

2015-09-28 Thread Alexander Belopolsky

Changes by Alexander Belopolsky :


Added file: http://bugs.python.org/file40614/issue24773-s3.diff

___
Python tracker 

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



[issue9334] argparse does not accept options taking arguments beginning with dash (regression from optparse)

2015-09-28 Thread Memeplex

Memeplex added the comment:

What's missing for this patch to be applied? Can I help somehow?

--
nosy: +memeplex

___
Python tracker 

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



[issue9051] Improve pickle format for timezone aware datetime instances

2015-09-28 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

> I think we will still need to maintain _utc global indefinitely to keep the 
> old pickles readable.

We have no need to maintain _utc global indefinitely if don't add it.

> On the other hand, it looks like support for qualnames is only available with 
> pickle protocol 4,

No, support for qualnames now is available with all pickle protocols.

--

___
Python tracker 

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



[issue25258] HtmlParser doesn't handle void element tags correctly

2015-09-28 Thread Josh Rosenberg

Josh Rosenberg added the comment:

The example for Parsing an element with a few attributes and a title:" in 
https://docs.python.org/2/library/htmlparser.html#examples demonstrates this as 
expected behavior, so I'm not sure it can be changed:

>>> parser.feed('')
Start tag: img
 attr: ('src', 'python-logo.png')
 attr: ('alt', 'The Python logo')
>>>
>>> parser.feed('Python')
Start tag: h1
Data : Python
End tag  : h1

--
nosy: +josh.r

___
Python tracker 

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



[issue9051] Improve pickle format for timezone aware datetime instances

2015-09-28 Thread Alexander Belopolsky

Alexander Belopolsky added the comment:

> there is a risk that the "_utc" variable can be renamed
> and this will break pickle compatibility.

I think we will still need to maintain _utc global indefinitely to keep the old 
pickles readable.

On the other hand, it looks like support for qualnames is only available with 
pickle protocol 4, so I don't see any downside from from storing the full 
qualname other than an 8-byte increase in the size of the pickle.

I guess my position on this will be +0:  I'll accept a patch if someone will 
submit it, but I am unlikely to do it myself.

--

___
Python tracker 

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



[issue9051] Improve pickle format for timezone aware datetime instances

2015-09-28 Thread Alexander Belopolsky

Changes by Alexander Belopolsky :


--
nosy: +tim.peters

___
Python tracker 

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



[issue24773] Implement PEP 495 (Local Time Disambiguation)

2015-09-28 Thread Alexander Belopolsky

Alexander Belopolsky added the comment:

Changing the title to reference PEP 495.

--
stage:  -> needs patch
title: Add local time disambiguation flag to datetime -> Implement PEP 495 
(Local Time Disambiguation)

___
Python tracker 

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



[issue25259] readline macros can segfault Python

2015-09-28 Thread STINNER Victor

STINNER Victor added the comment:

Python uses an user handler "rlhandler()" which calls 
rl_callback_handler_remove(). Is it safe to call rl_callback_handler_remove() 
in an user handler?

Traceback on the crash:

Program received signal SIGSEGV, Segmentation fault.
0x in ?? ()
(gdb) where
#0  0x in ?? ()
#1  0x003d0c22d67e in rl_callback_read_char () at ../callback.c:238
#2  0x7149ce85 in readline_until_enter_or_signal 
(prompt=prompt@entry=0x717ef598 "(Cmd) ", 
signal=signal@entry=0x7fffd52c)
at /home/haypo/prog/python/default/Modules/readline.c:1143
#3  0x7149cfaa in call_readline (sys_stdin=0x3cecfba8e0 
<_IO_2_1_stdin_>, sys_stdout=0x3cecfbb620 <_IO_2_1_stdout_>, 
prompt=0x717ef598 "(Cmd) ")
at /home/haypo/prog/python/default/Modules/readline.c:1231
#4  0x005ae97a in PyOS_Readline (sys_stdin=0x3cecfba8e0 
<_IO_2_1_stdin_>, sys_stdout=0x3cecfbb620 <_IO_2_1_stdout_>, 
prompt=0x717ef598 "(Cmd) ")
at Parser/myreadline.c:211
#5  0x0052ec57 in builtin_input_impl 
(module=module@entry=0x7189bc58, prompt=) at 
Python/bltinmodule.c:1924
#6  0x0052f054 in builtin_input (module=0x7189bc58, args=) at Python/clinic/bltinmodule.c.h:546
(...)


Other trace with source code of readline:

Program received signal SIGSEGV, Segmentation fault.
0x in ?? ()
Missing separate debuginfos, use: dnf debuginfo-install 
ncurses-libs-5.9-18.20150214.fc22.x86_64
(gdb) up
#1  0x003d0c22d67e in rl_callback_read_char () at ../callback.c:238
238   (*rl_linefunc) (line);
(gdb) print rl_linefunc
$1 = (rl_vcpfunc_t *) 0x0

--
nosy: +haypo

___
Python tracker 

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



[issue25260] python -m test --coverage doesn't work on Windows

2015-09-28 Thread STINNER Victor

STINNER Victor added the comment:

Ooops, copy/paste failure. The right diff is:

Changeset 294f8aeb4d4b: "Implemented PEP 405 (Python virtual environments)."

-tracer = trace.Trace(ignoredirs=[sys.prefix, sys.exec_prefix,
+tracer = trace.Trace(ignoredirs=[sys.base_prefix, sys.base_exec_prefix,
  tempfile.gettempdir()],
  trace=False, count=True)

--

___
Python tracker 

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



[issue25260] python -m test --coverage doesn't work on Windows

2015-09-28 Thread STINNER Victor

STINNER Victor added the comment:

Changes on ignoredirs:

Changeset 294f8aeb4d4b: "Implemented PEP 405 (Python virtual environments)."

-tracer = trace.Trace(ignoredirs=[sys.prefix, sys.exec_prefix, libpath],
- trace=0, count=1)
+tracer = trace.Trace(ignoredirs=[sys.base_prefix, sys.base_exec_prefix,
+ libpath], trace=0, count=1)


Changeset b43f14c103bb: "#5656: detect correct encoding of files when reporting 
coverage in trace.py, and ignore files in the temporary direct"

-import trace
-tracer = trace.Trace(ignoredirs=[sys.prefix, sys.exec_prefix],
+import trace, tempfile
+tracer = trace.Trace(ignoredirs=[sys.prefix, sys.exec_prefix,
+ tempfile.gettempdir()],

Changeset 308c193f51e3: "adds -T option for code coverage.  The implementation 
is a fairly simpleminded adaptation of Zope3's test.py -T flag."

+tracer = trace.Trace(ignoredirs=[sys.prefix, sys.exec_prefix],
+ trace=False, count=True)

--

___
Python tracker 

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



[issue25260] python -m test --coverage doesn't work on Windows

2015-09-28 Thread Ned Batchelder

Ned Batchelder added the comment:

What version of coverage.py is this?

--
nosy: +nedbat

___
Python tracker 

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



[issue25220] Enhance and refactor test.regrtest (convert regrtest.py to a package)

2015-09-28 Thread Roundup Robot

Roundup Robot added the comment:

New changeset a9fe8cd339b1 by Victor Stinner in branch 'default':
Fix test_regrtest.test_tools_buildbot_test()
https://hg.python.org/cpython/rev/a9fe8cd339b1

--

___
Python tracker 

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



[issue25260] python -m test --coverage doesn't work on Windows

2015-09-28 Thread STINNER Victor

STINNER Victor added the comment:

I added a new test for "-m test --coverage" in test_regrtest, but I skipped the 
test on Windows.

--

___
Python tracker 

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



[issue25260] python -m test --coverage doesn't work on Windows

2015-09-28 Thread STINNER Victor

New submission from STINNER Victor:

"python -m test --coverage" doesn't work on Windows because the tracer ignores 
the root directory of Python source code.

The code works on Linux because sys.base_prefix and sys.base_exec_prefix don't 
point to the Python source code, but to /usr/local.

I'm not sure why sys.base_prefix and sys.base_exec_prefix are ignored.

--
components: Tests, Windows
messages: 251804
nosy: haypo, paul.moore, r.david.murray, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: python -m test --coverage doesn't work on Windows
versions: Python 3.6

___
Python tracker 

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



[issue25220] Enhance and refactor test.regrtest (convert regrtest.py to a package)

2015-09-28 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 3393d86c3bb2 by Victor Stinner in branch 'default':
Issue #25220: Add functional tests to test_regrtest
https://hg.python.org/cpython/rev/3393d86c3bb2

--

___
Python tracker 

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



[issue9917] resource max value represented as signed when should be unsigned

2015-09-28 Thread Arnon Yaari

Arnon Yaari added the comment:

I'm submitting a patch for review. I tested this and verified the values on 
Redhat and Unbuntu (both x86 and x64), Mac OS X (x64) and AIX (32-bit process 
on ppc64).
'configure' and 'pyconfig.h.in' were auto-generated with autoconf and 
autoheader, respectively.
A test for this patch (along with a fix for a different test failure) is in 
msg117130

--
keywords: +patch
Added file: http://bugs.python.org/file40613/issue9917.diff

___
Python tracker 

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



[issue25255] Security of CPython Builds

2015-09-28 Thread R. David Murray

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



[issue25255] Security of CPython Builds

2015-09-28 Thread phelix

phelix added the comment:

Thank you all for your responses.

> Having read your link [2] above (at least briefly), it seems the aim is to 
> compare hashes of builds from multiple people to verify that nobody 
> maliciously modified the binaries.
Exactly. Also it might protect the people actually doing the builds from 
extortion and accusations from backdoor victims (e.g. in case of hacked build 
system).

> That isn't going to work for Windows because we cryptographically sign the 
> binaries. The only people who could produce bit-for-bit identical builds are 
> those trusted by the PSF, and not independent people. So if you don't trust 
> the PSF and implicitly the people trusted by the PSF, you can't actually do 
> anything besides building your own version and using that.
Joseph tried just that but ran into issues.

> However, the rest of the build is so automated that other personal variations 
> will not occur. As I mentioned above, I have exactly one batch file to build 
> the full span of releases for Windows, and I just run that. It's public and 
> in the repo, so anyone else can also run it, they just won't get bit-for-bit 
> identical builds because of timestamps, embedded paths, and certificates.
Timestamps and paths should be handled by the Gitian secure build system (cross 
compile).

>From my point this issue can be closed as my questions are answered. We will 
>take another look at building reproducibly. If we run into problems I will 
>create another issue here in the hope you can help again. :)

--

___
Python tracker 

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



[issue25259] readline macros can segfault Python

2015-09-28 Thread Tim Chase

New submission from Tim Chase:

Attempting to use a readline macro (use "C-x (" to start recording, "C-x )" to 
stop recording, and "C-x e" to playback) with more than one newline in it will 
cause a segfault.  The behavior also presents in the [`rlwrap` 
tool](https://github.com/hanslub42/rlwrap/issues/36) but not in `bash`.  I've 
tested and reproduced with Python 2.[4-6] and 3.4, but I don't see any similar 
bug-reports that would suggest that the problem doesn't also exist in all 3.x 
series releases.  To reproduce, in a `readline`-enabled Python:

$ python
…
>>> import cmd
>>> cmd.Cmd().cmdloop()  
(Cmd) # do "C-x (   C-x ) C-x e" and it segfaults

The author of `rlwrap` is working to create a minimum working example, and I'm 
not sure whether this is a problem with the underlying `libreadline` or just 
how it's being used by `rlwrap` and Python.

--
components: Library (Lib)
messages: 251800
nosy: gumnos
priority: normal
severity: normal
status: open
title: readline macros can segfault Python
type: crash
versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4, Python 3.5, Python 3.6

___
Python tracker 

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



[issue25257] In subject line email library inserts unwanted space after a thousands comma in a number

2015-09-28 Thread Bob Hossley

Bob Hossley added the comment:

Thank you R. David Murray.

I look forward to being able to move my application to Python 3.

--

___
Python tracker 

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



[issue25233] AssertionError from asyncio Queue get

2015-09-28 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 58695845e159 by Guido van Rossum in branch 'default':
Issue #25233: Rewrite the guts of Queue to be more understandable and correct. 
(Merge 3.5->default.)
https://hg.python.org/cpython/rev/58695845e159

--

___
Python tracker 

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



[issue25252] Hard-coded line ending in asyncio.streams.StreamReader.readline

2015-09-28 Thread Eric V. Smith

Eric V. Smith added the comment:

I'm closing this as unneeded.

--
resolution:  -> rejected
stage:  -> resolved

___
Python tracker 

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



[issue25255] Security of CPython Builds

2015-09-28 Thread Steve Dower

Steve Dower added the comment:

Having read your link [2] above (at least briefly), it seems the aim is to 
compare hashes of builds from multiple people to verify that nobody maliciously 
modified the binaries.

That isn't going to work for Windows because we cryptographically sign the 
binaries. The only people who could produce bit-for-bit identical builds are 
those trusted by the PSF, and not independent people. So if you don't trust the 
PSF and implicitly the people trusted by the PSF, you can't actually do 
anything besides building your own version and using that.

However, the rest of the build is so automated that other personal variations 
will not occur. As I mentioned above, I have exactly one batch file to build 
the full span of releases for Windows, and I just run that. It's public and in 
the repo, so anyone else can also run it, they just won't get bit-for-bit 
identical builds because of timestamps, embedded paths, and certificates.

--

___
Python tracker 

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



[issue25255] Security of CPython Builds

2015-09-28 Thread Steve Dower

Steve Dower added the comment:

I do need to contribute some PEP 101 updates at some point, since the Windows 
build no longer resembles what is described there, but it's mostly about 
configuration.

* Install x, y, z
* Obtain extra externals
* Install signing certificate
* Configure non-default settings
* Check out correct repo/branch
* Run tools/msi/buildrelease.cmd
(Optional: install x, configure SSH key, run tools/msi/uploadrelease.cmd)

Since I can't release the PSF signing key or my own GPG key, there's only so 
automated this configuration can be. The "correct repo/branch/changeset" varies 
depending on the RM, and not all of the build tests are automatically verified 
(high chance of false positives that require manual inspection).

Probably the first thing I should do is put the extra externals (binutils, gpg, 
htmlhelp, redist and wix) onto svn.python.org with the others and grab them 
automatically. I can add checks for configuration (things like the eol 
extension not being enabled, for example) and the default build doesn't need a 
signing certificate, so that's optional too.

But the overriding point is, these things aren't required for most people, and 
automating them is going to be pretty restrictive. For example, I would have to 
automate it by detecting VS 2015 and failing if it's not there - otherwise you 
don't have repeatability - and that's going to prevent people using earlier or 
later versions of VS for their own uses. HTML Help is basically stable (a.k.a. 
dead), but gpg and binutils are frequently updated and locking them down is 
also restrictive. Also, people may want to use their own MinGW or GPG installs, 
while I don't want to do that, so the model I use for building would be 
restrictive there too.

Finally, so few people actually want to produce builds that I can do plenty of 
work to make it easy, and there may be major issues that are never discovered 
because nobody else uses it.

--

___
Python tracker 

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



[issue25125] "Edit with IDLE" does not work for shortcuts

2015-09-28 Thread eryksun

eryksun added the comment:

> Does notepad handle clicking "edit" on a shortcut to a batch file? 
> Maybe subcommands don't have exactly the same semantics as regular 
> verbs...

In Windows 7 SP1 a regular verb works fine from a shortcut, but apparently not 
a subcommand. OTOH, Windows 10 seems to have no problem with this.

I just tested the following subcommand for editing .bat files with notepad:

reg add 
HKCU\Software\Classes\batfile\shell\editother\shell\editwithnotepad\command
reg add HKCU\Software\Classes\batfile\shell\editother /v MUIVerb /d "Edit 
Other"
reg add HKCU\Software\Classes\batfile\shell\editother /v Subcommands
reg add HKCU\Software\Classes\batfile\shell\editother\shell\editwithnotepad 
/v MUIVerb /d "Edit With Notepad"
reg add 
HKCU\Software\Classes\batfile\shell\editother\shell\editwithnotepad\command /ve 
/d "C:\Windows\notepad.exe %1"

When accessed from the file itself, this works fine in both Windows 7 SP1 and 
Windows 10 RTM. When accessed from a shortcut, the command works in Windows 10 
but does nothing in Windows 7. This independently confirms the issue reported 
by Thijs as a Windows 7 bug/limitation.

--

___
Python tracker 

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



[issue23600] tizinfo.fromutc changed for tzinfo wih StdOffset=0, DstOffset=1

2015-09-28 Thread Tim Peters

Tim Peters added the comment:

Thank you for your persistence and patience, Peter!  It shouldn't have been 
this hard for you :-(

--

___
Python tracker 

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



[issue25258] HtmlParser doesn't handle void element tags correctly

2015-09-28 Thread R. David Murray

Changes by R. David Murray :


--
nosy: +ezio.melotti

___
Python tracker 

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



[issue25258] HtmlParser doesn't handle void element tags correctly

2015-09-28 Thread Chenyun Yang

New submission from Chenyun Yang:

For void elements such as (, ), there doesn't need to have xhtml 
empty end tag. HtmlParser which relies on the XHTML empty end syntax failed to 
handle this situation. 

from HTMLParser import HTMLParser

# create a subclass and override the handler methods
class MyHTMLParser(HTMLParser):
def handle_starttag(self, tag, attrs):
print "Encountered a start tag:", tag
def handle_endtag(self, tag):
print "Encountered an end tag :", tag
def handle_data(self, data):
print "Encountered some data  :", data

>>> parser.feed('')
Encountered a start tag: link
Encountered a start tag: img
>>> parser.feed('')
Encountered a start tag: link
Encountered an end tag : link
Encountered a start tag: img
Encountered an end tag : img


Reference:
https://github.com/python/cpython/blob/bdfb14c688b873567d179881fc5bb67363a6074c/Lib/html/parser.py
http://www.w3.org/TR/html5/syntax.html#void-elements

--
components: Library (Lib)
messages: 251792
nosy: Chenyun Yang
priority: normal
severity: normal
status: open
title: HtmlParser doesn't handle void element tags correctly
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



[issue25247] Tkinter modules built successfully but removed because they could not be imported

2015-09-28 Thread Abrantes Araujo Silva Filho

Abrantes Araujo Silva Filho added the comment:

I tried with LD_RUN_PATH, but the same compile error still there.

--

___
Python tracker 

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



[issue25255] Security of CPython Builds

2015-09-28 Thread R. David Murray

R. David Murray added the comment:

Well, making the build process more automated would help us, so if someone 
wants to help make that kind of thing happen it will probably be well received. 
 The platform installer builds (OSX, Windows) are tricky things, though, and a 
fair amount of knowledge is unfortunately locked up (currently) in Steve and 
Ned's brains.  It would indeed be good to make that not so (bus factor, if 
nothing else), so support from additional people willing to put in effort on 
installer builds will (I'm assuming) be welcome. But, since anything along 
those lines would require additional time from Steve and Ned, it isn't obvious 
how best to go about it.

I haven't looked at your linked article, but there might be alternate pathways 
to your goal based on starting from the source and producing your own 
installers or embedded python installation.

--
assignee: docs@python -> 
nosy: +ned.deily, r.david.murray

___
Python tracker 

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



[issue25125] "Edit with IDLE" does not work for shortcuts

2015-09-28 Thread Steve Dower

Steve Dower added the comment:

Does notepad handle clicking "edit" on a shortcut to a batch file? Maybe 
subcommands don't have exactly the same semantics as regular verbs...

--

___
Python tracker 

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



[issue25257] In subject line email library inserts unwanted space after a thousands comma in a number

2015-09-28 Thread R. David Murray

R. David Murray added the comment:

This is fixed in Python3.  The fix was part of a large change to the header 
folding algorithm, and I'm not sure it is appropriate to backport it.  I'm 
guessing we would, though, if someone wants to do the work for the backport.  
The relevant issue is issue 11492.

--

___
Python tracker 

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



[issue25125] "Edit with IDLE" does not work for shortcuts

2015-09-28 Thread eryksun

eryksun added the comment:

> I don't believe %1 is necessarily correct here either, but maybe 
> with %* it's redundant anyway

%0, %1, or %L is lpFile. On older systems "%L" guarantees using the long 
filename, but this is pointless nowadays. %* (i.e. %2 through %9) is 
lpParameters, which is unusual to have in an edit command. Here's the edit 
command for .bat files:

C:\>reg query hklm\software\classes\batfile\shell\edit\command

HKEY_LOCAL_MACHINE\software\classes\batfile\shell\edit\command
(Default)REG_EXPAND_SZ%SystemRoot%\System32\NOTEPAD.EXE %1

It seems using quotes around "%1" is optional.

--

___
Python tracker 

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



[issue25255] Security of CPython Builds

2015-09-28 Thread phelix

phelix added the comment:

@Brett: Thanks for the info, I had not noticed PEP 101 had been updated.

@Paul: Ah, I had not found PCBuild/readme.txt yet. I did look at the devguide 
but I got the impression it was mostly meant for debug builds.

> Basically through trusting the people who produce the builds.
I assume these builders are very experienced and well known developers (thanks 
btw I like Python very much). I would trust them a very long way.

But it is not their integrity that is in question. Python is so popular that 
there might be large monetary (and other) incentives to force builders into 
something. Just for Bitcoin alone probably millions of dollars.

I was only recently made aware about this from Namecoin team members (and this 
[1] video about reproducible builds from CCC14) but as far as I see it now 
there is a very valid core in their argumentation. 

Our well respected team member Joseph Bisch has looked into reproducible builds 
of CPython and concluded that it might a difficult thing to do with a project 
as large as Python [2]. But maybe there are other ways to make builds more 
secure? I realize it is a lot I am asking here but build security will 
certainly get more and more important with time. Could things be improved by 
getting several developers together to create a secure VM as a starting point 
that make reproducible builds easier?

[1] 
https://media.ccc.de/browse/congress/2014/31c3_-_6240_-_en_-_saal_g_-_201412271400_-_reproducible_builds_-_mike_perry_-_seth_schoen_-_hans_steiner.html#video&t=18
[2] https://forum.namecoin.info/viewtopic.php?p=15869#p15869

--

___
Python tracker 

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



[issue23600] tizinfo.fromutc changed for tzinfo wih StdOffset=0, DstOffset=1

2015-09-28 Thread Peter Law

Peter Law added the comment:

Awesome, thanks for fixing this.

--
nosy: +PeterJCLaw

___
Python tracker 

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



[issue21872] LZMA library sometimes fails to decompress a file

2015-09-28 Thread kenorb

kenorb added the comment:

The same with this attached file. It fails with Python 3.5 (small buffers like 
128, 255, 1023, etc.) , but it seems to work in Python 3.4 with 
lzma._BUFFER_SIZE = 1023. So it looks like something regressed.

--
nosy: +kenorb
Added file: http://bugs.python.org/file40612/02h_ticks.bi5

___
Python tracker 

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



[issue25185] Inconsistency between venv and site

2015-09-28 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

I thought that pyvenv.cfg was used by venv's predecessor virtualenv. Now I see 
that I was wrong and your idea is right.

--
stage:  -> needs patch

___
Python tracker 

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



[issue25257] In subject line email library inserts unwanted space after a thousands comma in a number

2015-09-28 Thread Bob Hossley

New submission from Bob Hossley:

In my function makeMsg(), there is:

msg = email.mime.nonmultipart.MIMENonMultipart('text',
'plain', charset='utf-8')
msg['Subject'] = email.header.Header(subject, 'utf-8')

subject has no space after the thousands comma:

u'1,010 words - "The Blackmail Caucus, a.k.a. the Republican Party" By Paul 
Krugman'


But

msg['Subject'].__str__()

'1, 010 words - "The Blackmail Caucus,\n a.k.a. the Republican Party" By Paul 
Krugman'

has a space after the thousands comma and the email message later generated has 
a space after the thousands comma.

This is objectionable.

Note that the email library also inserts a newline after the comma that is 
followed by a space.  Since I see no effect of this newline on the email 
generated, I have no objection to the newline.

--
components: email
messages: 251782
nosy: SegundoBob, barry, r.david.murray
priority: normal
severity: normal
status: open
title: In subject line email library inserts unwanted space after a thousands 
comma in a number
type: behavior
versions: Python 2.7

___
Python tracker 

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



[issue25185] Inconsistency between venv and site

2015-09-28 Thread Vinay Sajip

Vinay Sajip added the comment:

> I suspect that this can break backward compatibility.

But since venv writes it out as UTF-8 already, it should be read in UTF-8, and 
if it isn't, isn't that the cause of the error which led to this bug we're 
talking about?

If we now write it with locale encoding, anything that previously assumed we 
were writing it in UTF-8 might break. While I'm not aware of any specific 
software which reads pyvenv.cfg other than the site.py code, there could well 
be third party code which does so.

--

___
Python tracker 

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



[issue23600] tizinfo.fromutc changed for tzinfo wih StdOffset=0, DstOffset=1

2015-09-28 Thread Alexander Belopolsky

Changes by Alexander Belopolsky :


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



[issue25220] Enhance and refactor test.regrtest (convert regrtest.py to a package)

2015-09-28 Thread STINNER Victor

STINNER Victor added the comment:

regrtest_class.patch: Convert the long and complex main() function into a new 
Regrtest class using attributes and methods.

* Convert main() variables to Regrtest attributes: see the __init__() method. I 
documented some attributes

* Convert accumulate_result() function to a method

* Create setup_python() and setup_regrtest() methods. Maybe both methods should 
be merged, but for the first change I preferred to keep almost the same 
instruction order (not move code too much).

* Import gc at top level: the --threshold command line option is now ignored if 
the gc module is missing.

* Move resource.setrlimit() and the code to make the module paths absolute into 
the new setup_python() method. So this code is no more executed when the module 
is imported, only when main() is executed. We have a better on when the setup 
is done.

* Move textwrap import from printlist() to the top level.

* Some other minor cleanup.

--
Added file: http://bugs.python.org/file40611/regrtest_class.patch

___
Python tracker 

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



[issue25125] "Edit with IDLE" does not work for shortcuts

2015-09-28 Thread Steve Dower

Steve Dower added the comment:

Creating a "dumb" item was discussed and rejected.

I don't see how passing the subkey is an issue if it works. The name of the 
verb is considered public API surface, so we can't easily change it anyway.

What may be the issue is the use of "%L", which I recall being told I should 
use at some point but I don't remember the exact reason. It may be that links 
are not resolved for %L while using another character (I don't believe %1 is 
necessarily correct here either, but maybe with %* it's redundant anyway).

--

___
Python tracker 

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



[issue24164] Support pickling objects with __new__ with keyword arguments with protocol 2+

2015-09-28 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
versions: +Python 3.6 -Python 3.5

___
Python tracker 

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



[issue22609] Constructors of some mapping classes don't accept `self` keyword argument

2015-09-28 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Ping.

--

___
Python tracker 

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



[issue24483] Avoid repeated hash calculation in C implementation of functools.lru_cache()

2015-09-28 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Ping.

--

___
Python tracker 

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



[issue25185] Inconsistency between venv and site

2015-09-28 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

I suspect that this can break backward compatibility.

--

___
Python tracker 

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



[issue25255] Security of CPython Builds

2015-09-28 Thread Paul Moore

Paul Moore added the comment:

Also, the Windows build process is documented in PCBuild/readme.txt - see 
https://hg.python.org/cpython/file/tip/PCbuild/readme.txt

More generally the devguide documents how to build CPython - 
https://docs.python.org/devguide/setup.html#compiling

--

___
Python tracker 

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



[issue25255] Security of CPython Builds

2015-09-28 Thread Brett Cannon

Brett Cannon added the comment:

And just as an FYI, while PEP 101 was created 14 years ago, it has been updated 
regularly (last edit was 13 days ago): 
https://hg.python.org/peps/log/tip/pep-0101.txt

--
nosy: +brett.cannon

___
Python tracker 

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



[issue25255] Security of CPython Builds

2015-09-28 Thread Steve Dower

Steve Dower added the comment:

Basically through trusting the people who produce the builds.

You can also verify the hg changeset by looking at sys.version and matching it 
to the tagged release. If there are any differences between the tagged commit 
and the one used to build, there will be a "+" in the version (though honestly, 
there are ways to avoid showing that if someone really wants to hide it, so it 
isn't a guarantee).

--

___
Python tracker 

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



[issue678264] test_resource fails when file size is limited

2015-09-28 Thread Arnon Yaari

Arnon Yaari added the comment:

This issue is still relevant and can be reproduced by running:

ulimit -Hf 1000
./python Lib/test/test_resource.py

(On AIX, the default hard limit is not RLIM_INFINITY so it reproduces on that 
operating system without the first line)

The patch is still relevant and fixes the issue.
It looks like it's doing the right thing, but it can't be committed until #9917 
will be fixed - otherwise the tests will break on Linux, where RLIM_INFINITY is 
-1 and not greater than 0.

--
nosy: +wiggin15

___
Python tracker 

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



[issue9917] resource max value represented as signed when should be unsigned

2015-09-28 Thread Arnon Yaari

Arnon Yaari added the comment:

getrlimit still returns -1 as 'max' when limit is unlimited and for 
RLIM_INFINITY because rlim_t is considered signed.

The zshell project decides whether rlim_t is signed/unsigned (and also whether 
it is long or long long) in the configure step: 
https://github.com/zsh-users/zsh/blob/8b84419f45298ee564bd6fa2b531c8991b2a1983/configure.ac#L1859

On Linux, rlim_t is unisnged long long so the conversion should be done using 
PyLong_FromUnsignedLongLong (for RLIM_INFINITY) and using 'KK' instead of 'LL' 
in 'rlimit2py'.

IMHO the best way to fix this is to add configure steps like in zsh and then 
adding ifdefs to resource.c - in rlimit2py and near PyModule_AddObject of 
RLIM_INFINITY

--
nosy: +wiggin15

___
Python tracker 

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



[issue25220] Enhance and refactor test.regrtest (convert regrtest.py to a package)

2015-09-28 Thread Arfrever Frehtes Taifersar Arahesis

Changes by Arfrever Frehtes Taifersar Arahesis :


--
nosy: +Arfrever

___
Python tracker 

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



[issue23640] int.from_bytes() is broken for subclasses

2015-09-28 Thread Arfrever Frehtes Taifersar Arahesis

Changes by Arfrever Frehtes Taifersar Arahesis :


--
nosy: +Arfrever

___
Python tracker 

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



[issue25233] AssertionError from asyncio Queue get

2015-09-28 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 1ea306202d5d by Guido van Rossum in branch '3.4':
Issue #25233: Rewrite the guts of Queue to be more understandable and correct.
https://hg.python.org/cpython/rev/1ea306202d5d

New changeset a48d90049ae2 by Guido van Rossum in branch '3.5':
Issue #25233: Rewrite the guts of Queue to be more understandable and correct. 
(Merge 3.4->3.5.)
https://hg.python.org/cpython/rev/a48d90049ae2

--
nosy: +python-dev

___
Python tracker 

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



[issue25256] Add sys.is_debug_build() public function to check if Python was compiled in debug mode

2015-09-28 Thread Ezio Melotti

Changes by Ezio Melotti :


--
nosy: +ezio.melotti
stage:  -> patch review
type:  -> enhancement

___
Python tracker 

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



[issue25256] Add sys.is_debug_build() public function to check if Python was compiled in debug mode

2015-09-28 Thread Stéphane Wirtel

Stéphane Wirtel added the comment:

Victor, I have tested your patch with the default branch (3.6), works fine on 
OSX Yosemite. In release and debug modes.

--

___
Python tracker 

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



[issue25079] Tokenize generates NL instead of NEWLINE for comments

2015-09-28 Thread Optimal BPM

Optimal BPM added the comment:

Ok, I'll work around that then. 
Thanks for your response!

--

___
Python tracker 

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



[issue25256] Add sys.is_debug_build() public function to check if Python was compiled in debug mode

2015-09-28 Thread Stéphane Wirtel

Stéphane Wirtel added the comment:

In your Python unittest, could you change the comment, it's ambiguous.

Thanks

--
nosy: +matrixise

___
Python tracker 

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



[issue25256] Add sys.is_debug_build() public function to check if Python was compiled in debug mode

2015-09-28 Thread STINNER Victor

STINNER Victor added the comment:

I wrote this patch while working on new tests for Lib/test/regrtest.py: issue 
#25220. The Windows scripts PCbuild/rt.bat (and Tools/buildbot/test.bat) 
requires a "-d" command line option if the Python was compiled in debug mode. 
The flag is used to choose the name of the Python executable: python.exe or 
python_d.exe. In my patch, I used:

Py_DEBUG = hasattr(sys, 'getobjects')

--

___
Python tracker 

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



[issue25256] Add sys.is_debug_build() public function to check if Python was compiled in debug mode

2015-09-28 Thread STINNER Victor

Changes by STINNER Victor :


--
nosy: +alex, brett.cannon

___
Python tracker 

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



[issue25256] Add sys.is_debug_build() public function to check if Python was compiled in debug mode

2015-09-28 Thread STINNER Victor

New submission from STINNER Victor:

Attached patch adds the sys.is_debug_build() public function and replaces 
hasattr(sys, xxx) tests to check for debug mode with sys.is_debug_build().

+.. function:: is_debug_build()
+
+   Return :const:`True` if the Python executable was compiled in debug mode,
+   return :const:`False` if it was compiled in release mode.
+
+   The debug mode is enabled with ``#define Py_DEBUG``, or with
+   ``./configure --with-pydebug``.
+
+   .. versionadded:: 3.6

I would like to add an obvious way to check if Python was compiled in debug 
mode, instead of having hacks/tips to check it.

For example, 3 different checks are proposed on StackOverflow and only one 
looks portable:

http://stackoverflow.com/questions/646518/python-how-to-detect-debug-interpreter

I don't think that we need to mark the function as an implementation detail or 
specific to CPython. Other implementations of Python would probably benefit 
from such flag. If they don't care, they can simply return False.

Alternative: Add a new sys.implementation.debug_build flag.

Note: I chose the "is_debug_build" name using the existing 
sysconfig.is_python_build(). There is a sys.flags.debug flag, so "is_debug()" 
can be confusing. I prefer to attach the "build" suffix.

--
components: Library (Lib)
files: is_debug_build.patch
keywords: patch
messages: 251765
nosy: haypo
priority: normal
severity: normal
status: open
title: Add sys.is_debug_build() public function to check if Python was compiled 
in debug mode
versions: Python 3.6
Added file: http://bugs.python.org/file40610/is_debug_build.patch

___
Python tracker 

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



[issue25122] test_eintr randomly fails on FreeBSD

2015-09-28 Thread Roundup Robot

Roundup Robot added the comment:

New changeset e48ec5f5b82b by Victor Stinner in branch 'default':
Issue #25122: Remove verbose mode of test_eintr
https://hg.python.org/cpython/rev/e48ec5f5b82b

--

___
Python tracker 

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



[issue25220] Enhance and refactor test.regrtest (convert regrtest.py to a package)

2015-09-28 Thread STINNER Victor

STINNER Victor added the comment:

test_regrtest-3.patch: I added a test on PCbuild\rt.bat and fixed the test on 
Tools/buildbot/test.bat (Windows only tests).

--
Added file: http://bugs.python.org/file40609/test_regrtest-3.patch

___
Python tracker 

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



[issue25249] Unneeded and unsafe mkstemp replacement in test_subprocess.py

2015-09-28 Thread Berker Peksag

Berker Peksag added the comment:

Thanks for the patch, Nir. Just fixed a small typo(fd -> f) in the 2.7 patch.

--
nosy: +berker.peksag
resolution:  -> fixed
stage:  -> resolved
status: open -> closed
versions: +Python 3.4, Python 3.5

___
Python tracker 

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



[issue25249] Unneeded and unsafe mkstemp replacement in test_subprocess.py

2015-09-28 Thread Roundup Robot

Roundup Robot added the comment:

New changeset ea91991c7db5 by Berker Peksag in branch '2.7':
Issue #25249: Remove unneeded mkstemp helper in test_subprocess
https://hg.python.org/cpython/rev/ea91991c7db5

--

___
Python tracker 

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



[issue25111] Broken compatibility in FrameSummary equality

2015-09-28 Thread Berker Peksag

Berker Peksag added the comment:

LGTM

+self.assertEqual(f, tuple(f))
+self.assertEqual(tuple(f), f)

It would be good to add a comment to explain why we test both variants, but 
it's not really important.

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



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

2015-09-28 Thread eryksun

eryksun added the comment:

> some code that uses it will need updating (due to API changes 
> since VC9/VC10)

For example, I discovered that the stdio exports don't include printf, etc. 
Using __stdio_common_vfprintf to implement printf relies on calling 
__acrt_iob_func to get stdout and (in general) dynamically building a va_list 
argument list. Of course, relying on either operation is a bad idea.

--

___
Python tracker 

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



[issue25251] Unknown MS Compiler version 1900

2015-09-28 Thread Matt Hickford

Matt Hickford added the comment:

Here's a patch that helped on my computer

On 28 September 2015 at 00:29, Zachary Ware  wrote:

>
> Changes by Zachary Ware :
>
>
> --
> components: +Windows
> nosy: +paul.moore, steve.dower, tim.golden, zach.ware
> type: crash -> behavior
>
> ___
> Python tracker 
> 
> ___
>

--
keywords: +patch
Added file: http://bugs.python.org/file40608/patch.diff

___
Python tracker 

___--- cygwinccompiler.py
+++ cygwinccompiler.py
@@ -82,7 +82,18 @@ def get_msvcr():
 elif msc_ver == '1600':
 # VS2010 / MSVC 10.0
 return ['msvcr100']
+elif msc_ver == '1700':
+# Visual Studio 2012 / Visual C++ 11.0
+return ['msvcr110']
+elif msc_ver == '1800':
+# Visual Studio 2013 / Visual C++ 12.0
+return ['msvcr120']
+elif msc_ver == '1900':
+# Visual Studio 2015 / Visual C++ 14.0
+# "msvcr140.dll no longer exists" 
http://blogs.msdn.com/b/vcblog/archive/2014/06/03/visual-studio-14-ctp.aspx
+return ['vcruntime140']
 else:
+# to do: can we make this futureproof?
 raise ValueError("Unknown MS Compiler version %s " % msc_ver)
 
 
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25249] Unneeded and unsafe mkstemp replacement in test_subprocess.py

2015-09-28 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 23f4daf7a211 by Berker Peksag in branch '3.4':
Issue #25249: Remove unneeded mkstemp helper in test_subprocess
https://hg.python.org/cpython/rev/23f4daf7a211

New changeset 4cd3027ffc34 by Berker Peksag in branch '3.5':
Issue #25249: Remove unneeded mkstemp helper in test_subprocess
https://hg.python.org/cpython/rev/4cd3027ffc34

New changeset e863c8760501 by Berker Peksag in branch 'default':
Issue #25249: Remove unneeded mkstemp helper in test_subprocess
https://hg.python.org/cpython/rev/e863c8760501

--
nosy: +python-dev

___
Python tracker 

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



[issue25253] AttributeError: 'Weather' object has no attribute 'dom'

2015-09-28 Thread Berker Peksag

Berker Peksag added the comment:

Thanks for the report, but this looks like a bug in the cfw project. Please 
report it to the ctw bug tracker.

--
nosy: +berker.peksag
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed
type: crash -> behavior

___
Python tracker 

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



[issue24972] IDLE: revisit text highlighting for inactive windows on win32

2015-09-28 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 45955adc2ed2 by Terry Jan Reedy in branch '2.7':
Issue #24972: New option is only valid in tk 8.5+.
https://hg.python.org/cpython/rev/45955adc2ed2

New changeset 460e6e6fb09a by Terry Jan Reedy in branch '3.4':
Issue #24972: New option is only valid in tk 8.5+.
https://hg.python.org/cpython/rev/460e6e6fb09a

--

___
Python tracker 

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



[issue24972] IDLE: revisit text highlighting for inactive windows on win32

2015-09-28 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
assignee:  -> terry.reedy
resolution:  -> fixed
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



[issue24972] IDLE: revisit text highlighting for inactive windows on win32

2015-09-28 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 2445750029df by Terry Jan Reedy in branch '3.4':
Issue #24972: Inactive selection background now matches active selection
https://hg.python.org/cpython/rev/2445750029df

--

___
Python tracker 

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



[issue25255] Security of CPython Builds

2015-09-28 Thread phelix bitcoin

New submission from phelix bitcoin:

A description of the build and release process for CPython binaries (e.g. for 
Windows) would be great. Maybe I am missing something? I could not find any 
information other than the 14 years old PEP 101 which says: "Notify the experts 
that they can start building binaries." 

E.g. how is it ensured there are no backdoors in the binaries?

Background: For the Namecoin project we are currently discussing the potential 
necessity of reproducible builds.

--
assignee: docs@python
components: Build, Devguide, Documentation, Windows
messages: 251753
nosy: docs@python, ezio.melotti, paul.moore, phelix bitcoin, steve.dower, 
tim.golden, willingc, zach.ware
priority: normal
severity: normal
status: open
title: Security of CPython Builds
type: enhancement

___
Python tracker 

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



[issue25220] Enhance and refactor test.regrtest (convert regrtest.py to a package)

2015-09-28 Thread STINNER Victor

STINNER Victor added the comment:

test_regrtest-2.patch: add tests for -u, -r, --randseed and --fromfile command 
line options.

--
Added file: http://bugs.python.org/file40607/test_regrtest-2.patch

___
Python tracker 

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



[issue23640] int.from_bytes() is broken for subclasses

2015-09-28 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Here is simplified Bruno's patch with additional tests for float, int, bool and 
enum. But I'm not sure that correct solution is so simple.

--
Added file: 
http://bugs.python.org/file40606/0002-int.from_bytes-calls-constructor-for-subclasses.patch

___
Python tracker 

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



[issue23640] int.from_bytes() is broken for subclasses

2015-09-28 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

There are similar issues with Decimal.from_float() (C implementation only), 
chain.from_iterable(), epoll.fromfd() and kqueue.fromfd(). All these 
alternative constructors don't call __new__ or __init__.

But float.fromhex() calls the constructor.

>>> import enum
>>> class M(float, enum.Enum):
... PI = 3.14
... 
>>> M.PI

>>> M.fromhex((3.14).hex())

>>> M.fromhex((2.72).hex())
Traceback (most recent call last):
File "", line 1, in 
File "/home/serhiy/py/cpython/Lib/enum.py", line 241, in __call__
return cls.__new__(cls, value)
File "/home/serhiy/py/cpython/Lib/enum.py", line 476, in __new__
raise ValueError("%r is not a valid %s" % (value, cls.__name__))
ValueError: 2.72 is not a valid M

And this behavior looks correct to me.

--
nosy: +facundobatista, mark.dickinson, rhettinger, skrah

___
Python tracker 

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