[issue28081] [Patch] timemodule: Complete Autoconf bits for clock_*() functions: make clock_getres() and clock_settime() optional

2016-09-13 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 0ea088671bc2 by Benjamin Peterson in branch '3.6':
more granular configure checks for clock_* functions (closes #28081)
https://hg.python.org/cpython/rev/0ea088671bc2

New changeset 3ce29b2452f0 by Benjamin Peterson in branch 'default':
merge 3.6 (#28081)
https://hg.python.org/cpython/rev/3ce29b2452f0

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

___
Python tracker 

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



[issue28119] Explicit null dereferenced in formatter_unicode.c

2016-09-13 Thread Benjamin Peterson

Benjamin Peterson added the comment:

I think that should take care of it (and also possible double-frees I noticed)?

--
nosy: +benjamin.peterson

___
Python tracker 

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



[issue28119] Explicit null dereferenced in formatter_unicode.c

2016-09-13 Thread Roundup Robot

Roundup Robot added the comment:

New changeset a27cb132e140 by Benjamin Peterson in branch '3.5':
improve type-safe of and prevent double-frees in get_locale_info (#28119)
https://hg.python.org/cpython/rev/a27cb132e140

New changeset 5ab61df1ca96 by Benjamin Peterson in branch '3.6':
merge 3.5 (#28119)
https://hg.python.org/cpython/rev/5ab61df1ca96

--
nosy: +python-dev

___
Python tracker 

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



[issue27482] heap-buffer-overflow on address 0x6250000078ff

2016-09-13 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
assignee:  -> serhiy.storchaka
nosy: +serhiy.storchaka
stage:  -> patch review

___
Python tracker 

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



[issue26171] heap overflow in zipimporter module

2016-09-13 Thread Berker Peksag

Berker Peksag added the comment:

Thanks!

--
nosy: +berker.peksag
resolution:  -> fixed
stage: needs patch -> resolved
status: open -> closed

___
Python tracker 

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



[issue26171] heap overflow in zipimporter module

2016-09-13 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 5ae8756a1ae0 by Berker Peksag in branch '3.3':
Issue #26171: Prevent buffer overflow in get_data
https://hg.python.org/cpython/rev/5ae8756a1ae0

New changeset fa006d671f41 by Berker Peksag in branch '3.4':
Issue #26171: Null merge
https://hg.python.org/cpython/rev/fa006d671f41

New changeset 2fb148cd95a2 by Berker Peksag in branch '3.5':
Issue #26171: Null merge
https://hg.python.org/cpython/rev/2fb148cd95a2

New changeset aa0c49b8edae by Berker Peksag in branch '3.6':
Issue #26171: Null merge
https://hg.python.org/cpython/rev/aa0c49b8edae

New changeset f3df6b16af7d by Berker Peksag in branch 'default':
Issue #26171: Null merge
https://hg.python.org/cpython/rev/f3df6b16af7d

--

___
Python tracker 

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



[issue25895] urllib.parse.urljoin does not handle WebSocket URLs

2016-09-13 Thread Markus Holtermann

Markus Holtermann added the comment:

Thanks for your input. I remove the versionchanged block.

--
Added file: 
http://bugs.python.org/file44649/0001-Enable-WebSocket-URL-schemes-in-urllib.parse.urljoin.patch

___
Python tracker 

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



[issue28131] assert statements missed when loaded by zipimporter

2016-09-13 Thread Berker Peksag

Berker Peksag added the comment:

Thanks for the report and for the reviews!

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

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



[issue28131] assert statements missed when loaded by zipimporter

2016-09-13 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 7bec326972f5 by Berker Peksag in branch '3.5':
Issue #28131: Fix a regression in zipimport's compile_source()
https://hg.python.org/cpython/rev/7bec326972f5

New changeset 7a6c0c4e6072 by Berker Peksag in branch '3.6':
Issue #28131: Merge from 3.5
https://hg.python.org/cpython/rev/7a6c0c4e6072

New changeset 873760b02024 by Berker Peksag in branch 'default':
Issue #28131: Merge from 3.6
https://hg.python.org/cpython/rev/873760b02024

--
nosy: +python-dev

___
Python tracker 

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



[issue28131] assert statements missed when loaded by zipimporter

2016-09-13 Thread Benjamin Peterson

Benjamin Peterson added the comment:

lgtm

--
nosy: +benjamin.peterson

___
Python tracker 

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



[issue28139] Misleading Indentation in C source code

2016-09-13 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 4d91f5c2ef99 by Benjamin Peterson in branch '2.7':
fix misleading indentation (closes #28139)
https://hg.python.org/cpython/rev/4d91f5c2ef99

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

___
Python tracker 

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



[issue28055] pyhash's siphash24 assumes alignment of the data pointer

2016-09-13 Thread Benjamin Peterson

Benjamin Peterson added the comment:

Here's a patch that requires 8-byte alignment. It almost completely works 
except that on ABIs with 32-bit pointers, unicode objects can have their data 
pointers aligned at only 4-bytes. Perhaps we can get away with requiring only 
4-byte alignment on 32-bit platforms because they generally have implement the 
64-bit load as 2 32-bit loads anyway.

--
Added file: http://bugs.python.org/file44648/hash-bytes-alignment.patch

___
Python tracker 

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



[issue28140] Attempt to give better errors for shell commands typed into the REPL

2016-09-13 Thread Nick Coghlan

New submission from Nick Coghlan:

A problem we're starting to see on distutils-sig is folks trying to type pip 
commands into the Python REPL rather than their system shell, and getting 
cryptic syntax errors back:

>>> pip install requests
  File "", line 1
pip install requests
  ^
SyntaxError: invalid syntax
>>> python -m pip install requests
  File "", line 1
python -m pip install requests
^
SyntaxError: invalid syntax

This may be amenable to a similar solution to the one we used to give a custom 
error message for "print ":

>>> print foo
  File "", line 1
print foo
^
SyntaxError: Missing parentheses in call to 'print'

That code currently checks for "print " and "exec ", so it would be a matter of 
adding another special case that looked for "pip install " appearing anywhere 
in the string that's failing to compile (it can't be limited to the start as it 
may be an attempt to invoke pip via "-m")

--
messages: 276373
nosy: ncoghlan
priority: normal
severity: normal
status: open
title: Attempt to give better errors for shell commands typed into the REPL
type: enhancement
versions: Python 3.6, Python 3.7

___
Python tracker 

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



[issue28131] assert statements missed when loaded by zipimporter

2016-09-13 Thread Berker Peksag

Berker Peksag added the comment:

Here is a patch with a test case.

--
keywords: +patch
nosy: +berker.peksag
stage:  -> patch review
type:  -> behavior
Added file: http://bugs.python.org/file44647/issue28131.diff

___
Python tracker 

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



[issue28131] assert statements missed when loaded by zipimporter

2016-09-13 Thread Steve Dower

Changes by Steve Dower :


--
nosy: +larry
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



[issue28131] assert statements missed when loaded by zipimporter

2016-09-13 Thread Steve Dower

Steve Dower added the comment:

Bah, that's meant to be a -1 in that change, not 1. I must have typo'd when 
moving from the default branch to put it in 3.5.

Anyone's welcome to fix it, or I'll get it when I have time for CPython work.

--

___
Python tracker 

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



[issue27482] heap-buffer-overflow on address 0x6250000078ff

2016-09-13 Thread Duane Griffin

Duane Griffin added the comment:

There are a couple of places where the tokenizer code is not correctly handling 
\0 characters occurring at the start of the buffer. Patch attached.

--
keywords: +patch
nosy: +duaneg
Added file: 
http://bugs.python.org/file44646/0001-Issue-27482-handle-nul-characters-while-reading-inpu.patch

___
Python tracker 

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



[issue28131] assert statements missed when loaded by zipimporter

2016-09-13 Thread Xiang Zhang

Xiang Zhang added the comment:

This is introduced in 663a62bcf9c9. The compile optimize flag is opened in the 
change.

--
nosy: +steve.dower, xiang.zhang

___
Python tracker 

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



[issue28118] type-limits warning in PyMem_New() _ssl_locks_count

2016-09-13 Thread Martin Panter

Martin Panter added the comment:

Thanks that works well Christian

--

___
Python tracker 

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



[issue28139] Misleading Indentation in C source code

2016-09-13 Thread ppperry

Changes by ppperry :


--
title: Misleading Indentation -> Misleading Indentation in C source code

___
Python tracker 

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



[issue28139] Misleading Indentation

2016-09-13 Thread Francisco Couzo

New submission from Francisco Couzo:

Fixed the warnings that appear when compiling 2.7 with -Wmisleading-indentation 
(Included in -Wall since GCC 6).

Kinda related, though I don't think there would be too much interest in fixing 
it (all the tabs in Python's C source):
$ find . -name '*.c' -print0 | xargs -0 grep -R $'\t' | wc -l
10407

--
files: misleading_indentation.patch
keywords: patch
messages: 276367
nosy: franciscouzo
priority: normal
severity: normal
status: open
title: Misleading Indentation
versions: Python 2.7
Added file: http://bugs.python.org/file44645/misleading_indentation.patch

___
Python tracker 

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



[issue25868] test_eintr.test_sigwaitinfo() hangs on "AMD64 FreeBSD CURRENT 3.x" buildbot

2016-09-13 Thread Martin Panter

Martin Panter added the comment:

Happened again:
http://buildbot.python.org/all/builders/AMD64%20FreeBSD%209.x%203.x/builds/4990/steps/test/logs/stdio
Timeout (0:10:00)!
Thread 0x000801807400 (most recent call first):
  File 
"/usr/home/buildbot/python/3.x.koobs-freebsd9/build/Lib/test/eintrdata/eintr_tester.py",
 line 420 in test_sigwaitinfo

Perhaps I will have another look at committing my patch. As I recall, it should 
make the test more robust.

--

___
Python tracker 

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



[issue25235] EmailMessage.add_attachment() creates parts with spurious MIME-Version header.

2016-09-13 Thread R. David Murray

R. David Murray added the comment:

Here's patch that only puts the MIME-Version in the output stream and doesn't 
modify the message (permanently, at least).  I like this better.  This patch is 
against 3.5 (the previous one was against 3.6).  Since this stuff is 
provisional in 3.5, I'm thinking I'll make the full change there, including 
deleting MIMEMessage from the docs.

--
stage:  -> patch review
Added file: http://bugs.python.org/file44644/fix_mime_version_headers-2.patch

___
Python tracker 

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



[issue28128] Improve the warning message for invalid escape sequences

2016-09-13 Thread Martin Panter

Martin Panter added the comment:

See also Issue 28028. Serhiy suggested translating warnings to SyntaxWarning in 
general. Looks like that may help narrowing down the location of escaping 
problems.

--

___
Python tracker 

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



[issue28134] socket.socket(fileno=fd) does not work as documented

2016-09-13 Thread Martin Panter

Martin Panter added the comment:

The documentation says that the family, type and proto attributes correspond to 
the constructor arguments. Although it is unfortunate and quirky, I think your 
behaviour does match the documentation.

Do the mismatched settings cause any serious problems with socket methods, or 
just affect the Python-level attributes and repr()?

Even without using fileno=..., you could argue that the proto attribute is not 
ideal:
>>> s = socket()
>>> s.proto
0
>>> s.getsockopt(SOL_SOCKET, SO_PROTOCOL)
6
>>> IPPROTO_TCP
6

Perhaps the way forward is to deprecate fileno=... in favour of Neil’s 
fromfd2() function. That would avoid any confusion about conflicting socket() 
constructor arguments and defaults. I.e. what does socket(AF_INET, SOCK_STREAM, 
fileno=unix_datagram_fd) mean, and is it equivalent to 
socket(filno=unix_datagram_fd)?

--
nosy: +martin.panter

___
Python tracker 

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



[issue28136] RegEx documentation error

2016-09-13 Thread triuan

triuan added the comment:

thanks!

--

___
Python tracker 

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



[issue28055] pyhash's siphash24 assumes alignment of the data pointer

2016-09-13 Thread Guido van Rossum

Changes by Guido van Rossum :


--
nosy:  -gvanrossum

___
Python tracker 

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



[issue26647] ceval: use Wordcode, 16-bit bytecode

2016-09-13 Thread Ryan May

Changes by Ryan May :


--
nosy: +Ryan May

___
Python tracker 

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



[issue26110] Speedup method calls 1.2x

2016-09-13 Thread Ryan May

Changes by Ryan May :


--
nosy: +Ryan May

___
Python tracker 

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



[issue26219] implement per-opcode cache in ceval

2016-09-13 Thread Ryan May

Changes by Ryan May :


--
nosy: +Ryan May

___
Python tracker 

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



[issue28125] identify cross builds by a more generic environment setting.

2016-09-13 Thread Xavier de Gaye

Xavier de Gaye added the comment:

> but not having the existing cross build infrastructure being replaced by some 
> new android concepts.

Running 'hg log' on configure.ac and Makefile.pre.in shows that there is not a 
single change in the cross build infrastructure done for some new android 
concept, whatever that means.

--

___
Python tracker 

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



[issue28131] assert statements missed when loaded by zipimporter

2016-09-13 Thread Gregory P. Smith

Gregory P. Smith added the comment:

from the zip:

>>> dis.dis(mod.test)
  3   0 LOAD_GLOBAL  0 (print)
  2 LOAD_FAST0 (val)
  4 CALL_FUNCTION1
  6 POP_TOP
  8 LOAD_CONST   0 (None)
 10 RETURN_VALUE

from the filesystem:
>>> dis.dis(mod.test)
  2   0 LOAD_FAST0 (val)
  2 POP_JUMP_IF_TRUE 8
  4 LOAD_GLOBAL  0 (AssertionError)
  6 RAISE_VARARGS1

  3 >>8 LOAD_GLOBAL  1 (print)
 10 LOAD_FAST0 (val)
 12 CALL_FUNCTION1
 14 POP_TOP
 16 LOAD_CONST   0 (None)
 18 RETURN_VALUE

--

___
Python tracker 

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



[issue28131] assert statements missed when loaded by zipimporter

2016-09-13 Thread Gregory P. Smith

Gregory P. Smith added the comment:

This shouldn't be happening and makes no sense.  It looks like the assert 
statement was removed at import code compilation time given the pdb trace with 
it from a zip file vs with it outside of a zip file:


>>> pdb.run('mod.test(False)')
> (1)()
(Pdb) n
False
--Return--
> (1)()->None
(Pdb) n
>>> pdb.run('mod.test(False)')
> (1)()->None
(Pdb) s
--Call--
> oss/cpython/build/mod.zip/mod.py(1)test()
-> def test(val):
(Pdb) s
> oss/cpython/build/mod.zip/mod.py(3)test()
-> print(val)
(Pdb) s
False
--Return--
> oss/cpython/build/mod.zip/mod.py(3)test()->None
-> print(val)
(Pdb) s
--Return--
> (1)()->None
(Pdb) s
> oss/cpython/default/Lib/bdb.py(435)run()
-> self.quitting = True
(Pdb) s
>>> 

vs no zip file:

>>> pdb.run('mod.test(False)')
> (1)()
(Pdb) s
--Call--
> oss/cpython/build/mod.py(1)test()
-> def test(val):
(Pdb) s
> oss/cpython/build/mod.py(2)test()
-> assert(val)
(Pdb) s
AssertionError
> oss/cpython/build/mod.py(2)test()
-> assert(val)
(Pdb) s
--Return--
> oss/cpython/build/mod.py(2)test()->None
-> assert(val)
(Pdb) s
AssertionError
> (1)()
(Pdb) s
--Return--
> (1)()->None
(Pdb) s
AssertionError
> oss/cpython/default/Lib/bdb.py(431)run()
-> exec(cmd, globals, locals)
(Pdb) s
> oss/cpython/default/Lib/bdb.py(432)run()
-> except BdbQuit:
(Pdb) s
> oss/cpython/default/Lib/bdb.py(435)run()
-> self.quitting = True
(Pdb) s
Traceback (most recent call last):
  File "", line 1, in 
  File "oss/cpython/default/Lib/pdb.py", line 1568, in run
Pdb().run(statement, globals, locals)
  File "oss/cpython/default/Lib/bdb.py", line 431, in run
exec(cmd, globals, locals)
  File "", line 1, in 
  File "oss/cpython/build/mod.py", line 2, in test
assert(val)
AssertionError

--

___
Python tracker 

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



[issue23591] enum: Add Flags and IntFlags

2016-09-13 Thread Ethan Furman

Ethan Furman added the comment:

I'll respond to the bulk of your comment later.  For now let me assure you your 
feedback has been invaluable.

--

___
Python tracker 

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



[issue28125] identify cross builds by a more generic environment setting.

2016-09-13 Thread Xavier de Gaye

Xavier de Gaye added the comment:

What do you mean ? When cross-compiling, _PYTHON_HOST_PLATFORM is defined as 
$MACHDEP-$_host_cpu, but _PYTHON_SYSCONFIGDATA_NAME is suffixed with 
$(MACHDEP)_$(MULTIARCH) instead.

--

___
Python tracker 

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



[issue27778] PEP 524: Add os.getrandom()

2016-09-13 Thread Martin Panter

Martin Panter added the comment:

I understand it’s already implemented, and Victor just reopened it for more 
documentation.

--

___
Python tracker 

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



[issue28055] pyhash's siphash24 assumes alignment of the data pointer

2016-09-13 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

> IMO, though, we should just require alignment for the argument to 
> _PyHash_Bytes. It's private after all.

And what to do with memoryview? Memoryview data can be not aligned.

> If I understand it correctly, the hash value differs depending on the kernel 
> configuration when the python binary is built, leading to different pickle 
> objects which cannot be shared, making them incompatible .

Hash values shouldn't be leaked in pickle.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue23591] enum: Add Flags and IntFlags

2016-09-13 Thread Vedran Čačić

Vedran Čačić added the comment:

About drama: I don't know how to approach the problem. I tell you about various 
concerns of mine, you seem to agree, and still you do exactly what I was 
warning you about. It could be that you just consider me a boring nag, but then 
saying so would be more useful than this situation.

---

Yes, you solved some problems I did have, and it's great, but still many of 
them remain. This thing is inherently complicated. You are trying to construct 
a discrete Boolean algebra, but without any guarantee of atoms. Imagine if the 
language was different:

class MySets(DiscreteSets):
a = {0, 1}
b = {2}
c = {1, 2}

You'd naturally view {0}, {1} and {2} as atoms, of different "sort" than {0,1} 
and such. That's what's missing here: a clear distinction between atoms and 
"molecules". It could be that the intended usage is for atoms to _always_ be 
constructed with auto(), and for molecules to be constructed from previous 
atoms, but then the documentation ought to say so.

So far, the only thing you say is "then it is on them to do it correctly", but 
you never really tell what "correctly" means. I understand your desire not to 
hard forbid anything, but the docs should tell how your class is _intended_ to 
be used, _AND_ the class should make every reasonable effort to preserve what 
it can of its behavior even in the face of not-quite-intended usage. Look at 
Raymond's collections.Counter's treatment of non-integer values for example.

BTW I'm not aware of any stdlib object whose repr raises ValueError. It surely 
makes debugging a lot harder.

--

___
Python tracker 

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



[issue28137] Windows sys.path file should be renamed

2016-09-13 Thread Steve Dower

Steve Dower added the comment:

Part of the reason it was so cute is that it directly specifies the contents of 
sys.path. But I like __syspath__.path (I'm scared of making it a ".ini" because 
I don't want to parse a more complex format).

--

___
Python tracker 

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



[issue28055] pyhash's siphash24 assumes alignment of the data pointer

2016-09-13 Thread Matthias Klose

Changes by Matthias Klose :


--
nosy: +gvanrossum, ned.deily

___
Python tracker 

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



[issue28055] pyhash's siphash24 assumes alignment of the data pointer

2016-09-13 Thread Matthias Klose

Matthias Klose added the comment:

if the only concern is 32bit sparc, then please let's drop this in 3.6.

Looking at #28027 the new way to obsoleting things seems to be decreeing them 
(sorry about the sarcasm).  If I interpret your concerns correctly you care 
about platforms, which you are not supposed to care about. sparc32 doesn't have 
any use cases now, while ARM32 still has, and will have for some time.

--

___
Python tracker 

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



[issue28125] identify cross builds by a more generic environment setting.

2016-09-13 Thread Matthias Klose

Matthias Klose added the comment:

On 13.09.2016 23:43, Xavier de Gaye wrote:
> 
> Xavier de Gaye added the comment:
> 
> You do not answer my questions and resort to sarcasm instead: "How did you 
> make it more difficult?". I understand that you may be upset because issue 
> 23968 has been dismantled by the recent decision of removing the platdir 
> files, but please keep exchanges on the bug tracker strictly on a technical 
> level.
> 
> I am strongly opposed to this change for the reasons given in my first post.  
> Unless you can explain why this change is needed, please close this issue as 
> rejected.

you do not listen. _PYTHON_HOST_PLATFORM is already defined, and released in
3.5. Why can't you have a look at the code?  Please calm down.  Don't invent new
solutions but instead use the existing ones. You can reach me on irc too, if you
think I offend you (I don't intend to), I'd like to carry on with the cross
builds including android, but not having the existing cross build infrastructure
being replaced by some new android concepts.

Matthias

--

___
Python tracker 

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



[issue28137] Windows sys.path file should be renamed

2016-09-13 Thread Christian Heimes

Christian Heimes added the comment:

I don't want to start a bike-shedding discussion but how about a name that 
can't be confused with a module and attribute? It's hard to distinguish between 
sys.path and sys.path in a discussion. How do you like the idea of a file name 
like __syspath__.path? __omitregistry__.path is even more search engine 
friendly.

--
nosy: +christian.heimes

___
Python tracker 

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



[issue28125] identify cross builds by a more generic environment setting.

2016-09-13 Thread Xavier de Gaye

Xavier de Gaye added the comment:

You do not answer my questions and resort to sarcasm instead: "How did you make 
it more difficult?". I understand that you may be upset because issue 23968 has 
been dismantled by the recent decision of removing the platdir files, but 
please keep exchanges on the bug tracker strictly on a technical level.

I am strongly opposed to this change for the reasons given in my first post.  
Unless you can explain why this change is needed, please close this issue as 
rejected.

--

___
Python tracker 

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



[issue23591] enum: Add Flags and IntFlags

2016-09-13 Thread Ethan Furman

Ethan Furman added the comment:

Vedran:

1) Thank you for the bug report, it's appreciated.

2) I would appreciate it even more if you just kept it to a bug report
   without the, for lack of a better word, drama.

---

>>>> import enum
>>>> class B(enum.Flag):
>b = 3
>c = 4
>d = 6
>>>> B.b | B.c
>Traceback (most recent call last): ...
>ValueError: 7 is not a valid B

This part is correct.  If the programmer wants to use actual values instead of 
auto() then it is on them to do it correctly.  I'd be happy to add a decorator 
to help ensure all bits have names, but I'm not sure what to call it.

---

>>>> t = B.b | B.c
>>>> t
>

>>>> ~B.d
>

These parts are not, and will be fixed.

---

>>>> class C(enum.Enum):
>   a = b = enum.auto() 
>>>> C.a
>
>>>> C.b
>

Bug, will be fixed.

>>>> def f():
>return enum.auto()
>>>> class E(enum.Enum):
>a = b = f()
>c = d = 2
>>>> E.a is E.b
>False

Same as above bug, will be fixed

>>>> E.c is E.d
>True
>>>> E.b is E.c
>True

Same as above bug, will be fixed.  (Had "a" and "b" been given different 
"auto()"s that last True would be correct as "b" would then have had a value of 
2 from auto(), and "c" and "d" also were given values of 2, so all three would 
have been the same.)

--
status: closed -> open

___
Python tracker 

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



[issue28055] pyhash's siphash24 assumes alignment of the data pointer

2016-09-13 Thread Matthias Klose

Matthias Klose added the comment:

... would be to remove the autoconf check and make the selection of the hash 
method unconditional ...

--

___
Python tracker 

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



[issue28055] pyhash's siphash24 assumes alignment of the data pointer

2016-09-13 Thread Christian Heimes

Christian Heimes added the comment:

The main reason for two different hash algorithms was missing support for 64bit 
integer types. Python 3.4 was targeting platforms that had no 64bit integer 
support at all (IIRC SPARC). Nowaday Python requires 64bit ints to compile.

I'm all in favor to remove FVN2 and use SipHash24 on all platforms. Let's 
deprecated it now and remove it in 3.7.

--

___
Python tracker 

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



[issue28055] pyhash's siphash24 assumes alignment of the data pointer

2016-09-13 Thread Matthias Klose

Matthias Klose added the comment:

> I believe the unaligned memory access configure check is supposed to
> prevent siphash from being used, so we might look into why that's not
> working.
> 
> IMO, though, we should just require alignment for the argument to
> _PyHash_Bytes. It's private after all.

If I understand it correctly, the hash value differs depending on the kernel 
configuration when the python binary is built, leading to different pickle 
objects which cannot be shared, making them incompatible .  I think the safest 
thing would be to remove the hash make the selection of the hash method 
unconditional, and to make this hash function working for all cases.

--

___
Python tracker 

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



[issue28138] Windows _sys.path file should allow import site

2016-09-13 Thread Steve Dower

New submission from Steve Dower:

Windows's _sys.path file (being renamed from sys.path in b1) currently disable 
the initial "import site; site.main()" call. However, there are legitimate 
cases where you may want to opt-in to this while still controlling the search 
paths.

We should support "import site" as a line in this file that indicates that 
Py_NoSite should *not* be set. We deliberately do not want arbitrary code 
execution from this file - there's a reason it's '.path' and not '.pth'

(While I or someone else is here, we should also handle blank lines and lines 
starting with '#' specially, so that files can be formatted more nicely.)

--
assignee: steve.dower
components: Windows
messages: 276344
nosy: paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
stage: needs patch
status: open
title: Windows _sys.path file should allow import site
type: behavior
versions: Python 3.6, Python 3.7

___
Python tracker 

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



[issue28137] Windows sys.path file should be renamed

2016-09-13 Thread Steve Dower

New submission from Steve Dower:

The Windows getpath implementation gained the ability to find and read a 
sys.path file to skip reading the registry.

While the name is cute, it really ought to start with a leading underscore 
(i.e. "_sys.path") to indicate that it is very at-your-own-risk. The docs 
should be updated to indicate that its behavior may be changed in later 
versions of Python (though it's guaranteed to only change backwards-compatibly 
for 3.6).

Since the file is only used with a specific installation of Python 
(specifically the embedded distro), this shouldn't be an issue as nobody is 
meant to upgrade Python without removing/replacing this file.

--
assignee: steve.dower
components: Windows
messages: 276343
nosy: paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
stage: needs patch
status: open
title: Windows sys.path file should be renamed
type: behavior
versions: Python 3.6, Python 3.7

___
Python tracker 

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



[issue28125] identify cross builds by a more generic environment setting.

2016-09-13 Thread Matthias Klose

Matthias Klose added the comment:

On 13.09.2016 16:40, Xavier de Gaye wrote:
> 
> Xavier de Gaye added the comment:
> 
>> Plus the abi flags should not be set by hand, you'll get in trouble at least 
>> for naming extensions, or building extensions for the wrong abi flags. This 
>> was an explicit decision when I first started adding the cross-build changes.
> 
> What do you mean ? The abi flags are set by configure and not by hand.
> In which issue is this explicit decision taken, and where is it motivated ?

please try to build extension modules with mismatching abi flags (pydebug is the
relevant one). Post your results for both mismatch cases.

>> So proposing instead to base a cross build on a _PYTHON_MULTIARCH 
>> environment variable and deriving the sysconfigdata name on that.
> 
> The _PYTHON_SYSCONFIGDATA_NAME environment variable as the merit to document 
> its purpose with its name. The CPython cross-compilation system is difficult 
> enough to understand that this is a significant advantage.  What are the 
> advantages of introducing this new _PYTHON_MULTIARCH environment variable 
> instead, where else would it be used ?

No, at least it was not difficult when it was created. How did you make it more
difficult?

If we can derive the name, we should do it, not having more special environment
variables when we find the need for it.

--

___
Python tracker 

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



[issue28128] Improve the warning message for invalid escape sequences

2016-09-13 Thread Emanuel Barry

Emanuel Barry added the comment:

Hello, and thanks! I'll work on a patch this week, or at most next week. I will 
make it so that it's completely uncontroversial to apply it to 3.6 as well 
(won't change the actual feature, only prettify the error message), so no need 
to worry about that :)

--
assignee:  -> ebarry
components:  -Library (Lib)
nosy: +ebarry
stage:  -> needs patch

___
Python tracker 

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



[issue28136] RegEx documentation error

2016-09-13 Thread SilentGhost

Changes by SilentGhost :


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

___
Python tracker 

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



[issue28136] RegEx documentation error

2016-09-13 Thread Christian Heimes

Christian Heimes added the comment:

The documentation is correct. It explains the difference between a default 
match (greedy) and a non-greedy match.

>>> re.match('(a{3,5})', 'a').group(1)
'a'
>>> re.match('(a{3,5}?)', 'a').group(1)
'aaa'

--
nosy: +christian.heimes

___
Python tracker 

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



[issue28048] Adjust class-build method of Enum so final ordered dict more closely resembles definition order

2016-09-13 Thread Ethan Furman

Ethan Furman added the comment:

__definition_order__ was dropped from PEP520, so this issue is moot.

--
resolution:  -> rejected
stage: test needed -> resolved
status: open -> closed

___
Python tracker 

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



[issue10673] multiprocess.Process join method - timeout indistinguishable from success

2016-09-13 Thread ppperry

Changes by ppperry :


--
assignee:  -> docs@python
components: +Documentation
nosy: +docs@python

___
Python tracker 

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



[issue28136] RegEx documentation error

2016-09-13 Thread triuan

triuan added the comment:

https://docs.python.org/2/library/re.html

error:
...string 'aa', a{3,5} will match 5 'a' characters...

suggest correction 2:
...string 'aa', a{3, 5} will match 3 to 5 'a' characters...

--

___
Python tracker 

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



[issue27908] del _limbo[self] KeyError

2016-09-13 Thread Dima Tisnek

Dima Tisnek added the comment:

Your logic is accurate; _started is in fact separate from _limbo.

As such taking a lock for "test-then-set" only would suffice.

Now when you bring the other primitive under this lock in one place, it would 
look cleaner if it was also brought in the other.



There's one more issue with proposed change:

Before the change, if "already started" exception is ever raised for a given 
Thread object, then it's guaranteed that that object was started successfully.

With the change, it is possible that exception is raised, and thread fails to 
start, leaving the object in initial state.


If it were up to me, I would buy this limitation as price of safety.
Someone may disagree.

--

___
Python tracker 

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



[issue28136] RegEx documentation error

2016-09-13 Thread triuan

New submission from triuan:

https://docs.python.org/2/library/re.html

error:
...string 'aa', a{3,5} will match 5 'a' characters...

suggest correction:
...string 'aa', a{5} will match 5 'a' characters...

--
assignee: docs@python
components: Documentation
messages: 276336
nosy: docs@python, triuan
priority: normal
severity: normal
status: open
title: RegEx documentation error

___
Python tracker 

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



[issue23591] enum: Add Flags and IntFlags

2016-09-13 Thread Vedran Čačić

Vedran Čačić added the comment:

Now that I actually had the chance to play with the implementation, I see most 
of my worst fears were justified. :-( Look:

>>> import enum
>>> class B(enum.Flag):
b = 3
c = 4
d = 6
>>> B.b | B.c
Traceback (most recent call last): ...
ValueError: 7 is not a valid B
>>> t = B.b | B.c
>>> t

>>> B.b | B.c
>>> B.b | B.c

>>> ~B.d


Do you really find this behavior acceptable?? I see at least three bugs here.

At least you did say in the documentation

> Individual flags should have values that are powers of two (1, 2, 4, 8, ...)

but it seems to me it's not prominent enough.

---

Also, auto, despite parentheses, works exactly as it shouldn't.

>>> class C(enum.Enum):
a = b = enum.auto() 
>>> C.a

>>> C.b


>>> def f():
return enum.auto()
>>> class E(enum.Enum):
a = b = f()
c = d = 2
>>> E.a is E.b
False
>>> E.c is E.d
True
>>> E.b is E.c
True

In my opinion, this is simply horrible. Even _you_ said 
(http://bugs.python.org/issue23591#msg275093) this would be unacceptable. I'm 
really, really sad.

--

___
Python tracker 

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



[issue28135] assertRaises should return the exception in its simple form

2016-09-13 Thread Facundo Batista

New submission from Facundo Batista:

So, you could do:

  exc = self.assertRaises(ValueError, somefunc, someargs)

And then, explore "exc" as will. 

Yes, you can get the exception if you use assertRaises as a context manager, 
but that leads to more cumbersome code:

  with self.assertRaises(ValueError) as cm:
  somefunc(someargs)
  exc = cm.exception

--
messages: 276334
nosy: facundobatista
priority: normal
severity: normal
status: open
title: assertRaises should return the exception in its simple form

___
Python tracker 

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



[issue27908] del _limbo[self] KeyError

2016-09-13 Thread Brett Cannon

Changes by Brett Cannon :


--
nosy:  -brett.cannon
versions: +Python 3.7

___
Python tracker 

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



[issue27908] del _limbo[self] KeyError

2016-09-13 Thread Brett Cannon

Changes by Brett Cannon :


--
components:  -Extension Modules

___
Python tracker 

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



[issue27908] del _limbo[self] KeyError

2016-09-13 Thread Maciej Urbański

Maciej Urbański added the comment:

@Dima.Tisnek, only reason for having both of these conditions together is so I 
won't have to repeat the same error message in the code at little price of the 
performance in this edge case (trying to start the same thread multiple times).

Unless I'm missing something there should be no way how it would make this lock 
required for setting `self._started`.

--

___
Python tracker 

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



[issue15369] pybench and test.pystone poorly documented

2016-09-13 Thread Marc-Andre Lemburg

Marc-Andre Lemburg added the comment:

Please add notes to the Tools/README pointing users to the performance suite.

I'd also like to request that you reword this dismissive line in the 
performance package's readme:

"""
pybench - run the standard Python PyBench benchmark suite. This is considered 
an unreliable, unrepresentative benchmark; do not base decisions off it. It is 
included only for completeness.
"""

I suppose this was taken from the Unladden Swallow list of benchmarks and 
completely misses the point of what pybench is all about: it's a benchmark to 
run performance tests for individual parts of CPython's VM implementation. It 
never was intended to be representative. The main purpose is to be able to tell 
whether an optimization in CPython has an impact on individual areas of the 
interpreter or not.

Thanks.

--

___
Python tracker 

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



[issue27908] del _limbo[self] KeyError

2016-09-13 Thread Dima Tisnek

Dima Tisnek added the comment:

@rooter, if you go this way, you should also `self._started.set()` with lock 
held, together with removing thread from `_limbo`

--

___
Python tracker 

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



[issue28134] socket.socket(fileno=fd) does not work as documented

2016-09-13 Thread R. David Murray

R. David Murray added the comment:

See also issue 27377?

--
nosy: +r.david.murray

___
Python tracker 

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



[issue28134] socket.socket(fileno=fd) does not work as documented

2016-09-13 Thread Christian Heimes

Christian Heimes added the comment:

I expected that socket.socket(fileno) would fill in all socket options like my 
own implementation 
https://github.com/tiran/socketfromfd/blob/master/socketfromfd.py

--

___
Python tracker 

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



[issue5396] os.read not handling O_DIRECT flag

2016-09-13 Thread Michael Mol

Michael Mol added the comment:

I need to remember not to try to write quick programs in Python that need 
O_DIRECT.

My use case: I'm attempting to write a program that forces the disk to seek to 
a particular place, as part of burning in the disk.

My algorithm goes:

1. Seek to the beginning of the disk
2. Write to the disk
3. Seek to the end of the disk
4. Write to the disk
5. Seek to the beginning of the disk
6. Read from the disk
7. Seek to the end of the disk
8. Read from the disk

It then repeats with offsets, leading the seek distance to shrink until the two 
positions overlap at the center of the disk, and then expand as the positions 
diverge to the opposite end of the disk from where they began.

It's straightforward, and can be done using mmap and os.write as far as the 
writing side of things goes, but it does not work on the reading side, as even 
this workaround does not work:

d = os.open(disk_file_path, os.O_RDWR | os.O_DIRECT | os.O_SYNC | os.O_DSYNC)
readbuf = mmap.mmap(-1, 4096)
os.lseek(d, 0, os.SEEK_SET)
fo = os.fdopen(d, 'rb')
fo.readinto(readbuf)

... I get errno 22 on the final line. Apparently, code similar to that used to 
work, but no longer does.

--
nosy: +Michael Mol

___
Python tracker 

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



[issue28134] socket.socket(fileno=fd) does not work as documented

2016-09-13 Thread Christian Heimes

Changes by Christian Heimes :


--
stage:  -> needs patch
type:  -> behavior

___
Python tracker 

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



[issue28134] socket.socket(fileno=fd) does not work as documented

2016-09-13 Thread Christian Heimes

New submission from Christian Heimes:

Documentation of socket.socket(fileno) 
https://docs.python.org/3/library/socket.html#socket.socket says:

> If fileno is specified, the other arguments are ignored, causing the socket 
> with the specified file descriptor to return.

The feature does not work. fileno does not infer the values for family, type 
and proto from the fd. Instead if uses the other arguments. I don't see how 
this feature should have ever worked on POSIX. There are no calls to 
getsockopt() with SO_DOMAIN, SO_TYPE and SO_PROTOCOL.

$ ./python 
Python 3.7.0a0 (default:6bcedf96d25f, Sep 13 2016, 20:48:50) 
[GCC 6.1.1 20160621 (Red Hat 6.1.1-3)] on linux
Type "help", "copyright", "credits" or "license" for more information.

>>> import socket
>>> uds = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
>>> uds

>>> s = socket.socket(fileno=uds.fileno())
>>> s

>>> s.family == uds.family
False
>>> s2 = socket.socket(type=socket.SOCK_DGRAM, fileno=uds.fileno())
>>> s2


--
messages: 276327
nosy: christian.heimes
priority: normal
severity: normal
status: open
title: socket.socket(fileno=fd) does not work as documented
versions: Python 3.5, Python 3.6, Python 3.7

___
Python tracker 

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



[issue28133] spam

2016-09-13 Thread SilentGhost

Changes by SilentGhost :


--
nosy:  -gukaar77
title: really and truly -> spam

___
Python tracker 

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



[issue28128] Improve the warning message for invalid escape sequences

2016-09-13 Thread R. David Murray

R. David Murray added the comment:

The error can't be a SyntaxError, it must be a DeprecationWarning.  If you can 
improve the deprecation warning text, I'd be in favor of calling that a fix to 
the original feature and put it in 3.6.  The deprecation warning can even say 
that this will be a SyntaxError some time in the future.

--

___
Python tracker 

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



[issue28133] spam

2016-09-13 Thread SilentGhost

Changes by SilentGhost :


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



[issue28133] spam

2016-09-13 Thread SilentGhost

Changes by SilentGhost :


--
Removed message: http://bugs.python.org/msg276324

___
Python tracker 

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



[issue27908] del _limbo[self] KeyError

2016-09-13 Thread Maciej Urbański

Maciej Urbański added the comment:

Successfully reproduced on 2.7.12 and 3.5.2 .
Currently there seems to be no protection against starting the same thread 
twice at the same time. What was checked was only if start operation already 
finished once.

Attached patch makes it so limbo, our starting threads' waiting room, is 
checked first.

--
keywords: +patch
nosy: +rooter
versions: +Python 2.7, Python 3.5
Added file: http://bugs.python.org/file44643/issue27908.patch

___
Python tracker 

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



[issue28133] really and truly

2016-09-13 Thread Gukas Artunyan

New submission from Gukas Artunyan:

Hello! 

I wanted to share with you something important , I guess I really and truly am 
in love this  time!  Take a  look at some pics of us  


Be well, gukaar77

--
messages: 276324
nosy: gukaar77
priority: normal
severity: normal
status: open
title: really and truly

___
Python tracker 

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



[issue27778] PEP 524: Add os.getrandom()

2016-09-13 Thread Christian Heimes

Christian Heimes added the comment:

3.6 is in beta phase. Are you interested to add the feature to 3.7?

--
nosy: +christian.heimes
versions: +Python 3.7 -Python 3.6

___
Python tracker 

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



[issue28118] type-limits warning in PyMem_New() _ssl_locks_count

2016-09-13 Thread Christian Heimes

Christian Heimes added the comment:

Fixed in 9e8e15993aae

--
resolution:  -> fixed
stage: needs patch -> resolved
status: open -> closed

___
Python tracker 

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



[issue28118] type-limits warning in PyMem_New() _ssl_locks_count

2016-09-13 Thread Christian Heimes

Christian Heimes added the comment:

I have an even better solution that gets rid of the warning and the extra 
memset() call:

diff -r bedce61ae0a0 Modules/_ssl.c
--- a/Modules/_ssl.cTue Sep 13 20:22:02 2016 +0200
+++ b/Modules/_ssl.cTue Sep 13 20:45:46 2016 +0200
@@ -5073,13 +5073,12 @@
 
 if (_ssl_locks == NULL) {
 _ssl_locks_count = CRYPTO_num_locks();
-_ssl_locks = PyMem_New(PyThread_type_lock, _ssl_locks_count);
+_ssl_locks = PyMem_Calloc(_ssl_locks_count,
+  sizeof(PyThread_type_lock));
 if (_ssl_locks == NULL) {
 PyErr_NoMemory();
 return 0;
 }
-memset(_ssl_locks, 0,
-   sizeof(PyThread_type_lock) * _ssl_locks_count);
 for (i = 0;  i < _ssl_locks_count;  i++) {
 _ssl_locks[i] = PyThread_allocate_lock();
 if (_ssl_locks[i] == NULL) {

--

___
Python tracker 

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



[issue28122] email.header.decode_header can not decode string with quotation

2016-09-13 Thread R. David Murray

R. David Murray added the comment:

Note, however, that python3 will compensate for this bug in the input, and 
register a defect for it:

>>> import email
>>> import email.policy
>>> msg = email.message_from_string('To: "=?gb18030?B?bWFpbGZvcnRlc3R0?=" 
>>> <2070776...@qq.com>\n\ntest body', policy=email.policy.default)
>>> print(msg)
To: "=?gb18030?B?bWFpbGZvcnRlc3R0?=" <2070776...@qq.com>

test body
>>> msg['To']
'mailfortestt <2070776...@qq.com>'
>>> msg['To'].defects
(InvalidHeaderDefect('encoded word inside quoted string',),)

--
resolution:  -> out of date
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



[issue28126] Py_MEMCPY: Use memcpy on Windows?

2016-09-13 Thread Roundup Robot

Roundup Robot added the comment:

New changeset bedce61ae0a0 by Christian Heimes in branch '3.6':
Issue #28126: Replace Py_MEMCPY with memcpy(). Visual Studio can properly 
optimize memcpy().
https://hg.python.org/cpython/rev/bedce61ae0a0

New changeset f5d32ed0f9c2 by Christian Heimes in branch 'default':
Issue #28126: Replace Py_MEMCPY with memcpy(). Visual Studio can properly 
optimize memcpy().
https://hg.python.org/cpython/rev/f5d32ed0f9c2

--
nosy: +python-dev

___
Python tracker 

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



[issue28126] Py_MEMCPY: Use memcpy on Windows?

2016-09-13 Thread Christian Heimes

Changes by Christian Heimes :


--
resolution:  -> fixed
stage: needs patch -> resolved
status: open -> closed

___
Python tracker 

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



[issue28132] impossible to uninstall python3.6.0b1-amd64 from windows 10

2016-09-13 Thread Big Stone

Big Stone added the comment:

okay is successfukky repaired, then uninstalled by clicking twice on the 
installer.exe. 

this never worked by using the "application and functionalities" menu of 
windows 109.

--

___
Python tracker 

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



[issue28115] Use argparse for the zipfile module

2016-09-13 Thread R. David Murray

R. David Murray added the comment:

Note that a key part of doing a translation like this is to write tests for the 
CLI, as comprehensively as possible, so that we have some assurance we didn't 
break anything in the translation.  But experience tells us that we *will* 
break something, since we have in every one of the translations to argparse 
that we've done so far :)

--
nosy: +r.david.murray

___
Python tracker 

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



[issue27883] Update sqlite version for Windows build

2016-09-13 Thread Big Stone

Big Stone added the comment:

well, json extension is not included in 3.6.0b1 . not a drama, yet a small 
deception

--

___
Python tracker 

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



[issue28116] Error in what's new - PEP 515

2016-09-13 Thread Brett Cannon

Brett Cannon added the comment:

the author meant "integer literals" when he said "integers" which is accurate 
as the hex literal isn't quite the same (e.g. uses different parse rules, 
etc.). If you would still like to propose different wording then you can submit 
a pull request at github.com/python/peps for consideration.

--
nosy: +brett.cannon
resolution:  -> third party
status: open -> closed

___
Python tracker 

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



[issue28126] Py_MEMCPY: Use memcpy on Windows?

2016-09-13 Thread Christian Heimes

Christian Heimes added the comment:

As I said, I'm going to keep Py_MEMCPY around but replace it everywhere else.

/* Py_MEMCPY is kept for backwards compatibility,
 * see https://bugs.python.org/issue28126 */
#define Py_MEMCPY memcpy

--

___
Python tracker 

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



[issue28126] Py_MEMCPY: Use memcpy on Windows?

2016-09-13 Thread STINNER Victor

STINNER Victor added the comment:

The macro looks public, you cannot remove it.

Make it an alias to memcpy(), but explain that it's only kept for backward
compatibility with a reference to this issue.

--

___
Python tracker 

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



[issue27322] test_compile_path fails when python has been installed

2016-09-13 Thread Brett Cannon

Brett Cannon added the comment:

That seems reasonable to me. There is a context manager in 
test.test_importlib.util which can help with changing sys.path temporarily.

--

___
Python tracker 

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



[issue28131] assert statements missed when loaded by zipimporter

2016-09-13 Thread Brett Cannon

Brett Cannon added the comment:

I've added Greg and Thomas in case they have any ideas as they have looked at 
zipimport more recently than I have.

--
nosy: +gregory.p.smith, twouters

___
Python tracker 

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



[issue28126] Py_MEMCPY: Use memcpy on Windows?

2016-09-13 Thread Christian Heimes

Christian Heimes added the comment:

Behold the power of Unix! :)

$ find -name '*.[ch]' | xargs sed -i s/Py_MEMCPY/memcpy/g

Victor, are you fine with the change? I'm going to keep Py_MEMCPY around.

--

___
Python tracker 

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



[issue28126] Py_MEMCPY: Use memcpy on Windows?

2016-09-13 Thread Steve Dower

Steve Dower added the comment:

I'm okay with removing it completely, if you're willing to change that much 
code. (Most of my additions already uses memcpy or memcpy_s directly, since I 
wasn't even aware of this macro :) )

--

___
Python tracker 

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



[issue28132] impossible to uninstall python3.6.0b1-amd64 from windows 10

2016-09-13 Thread Big Stone

Big Stone added the comment:

what I found in temp (user temp)

--
Added file: http://bugs.python.org/file44642/temp_info.zip

___
Python tracker 

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



[issue22798] time.mktime doesn't update time.tzname

2016-09-13 Thread Alexander Belopolsky

Alexander Belopolsky added the comment:

I ran the attached test-mktime.c program on Linux and MacOS X with the 
following results (TZ=America/New_York):

$ cat test-mktime.c
#include 
#include 
static void
print_globals(struct tm *tm)
{
  printf("%04d-%02d: %s/%s (%s) %d %ld (%ld)\n",
 1900 + tm->tm_year, 1 + tm->tm_mon,
 tzname[0], tzname[1], tm->tm_zone?tm->tm_zone:"NULL",
 daylight, timezone, -tm->tm_gmtoff);
}

int main() {
  struct tm tm = {0, 0, 0, 1, 0, -100};
  print_globals();
  tzset();
  print_globals();
  mktime();
  print_globals();
  tm.tm_year = 43;
  mktime();
  print_globals();
  tm.tm_year = 45;
  tm.tm_mon = 8;
  mktime();
  print_globals();
}

Linux:

$ gcc test-mktime.c && ./a.out
1800-01: GMT/GMT (NULL) 0 0 (0)
1800-01: EST/EDT (NULL) 1 18000 (0)
1800-01: LMT/EDT (LMT) 1 18000 (17762)
1943-01: EST/EWT (EWT) 1 18000 (14400)
1945-09: EST/EPT (EPT) 1 18000 (14400)


MacOS X:

$ clang test-mktime.c && ./a.out
1800-01: WILDABBR/WILDABBR (NULL) 0 0 (0)
1800-01: EST/EDT (NULL) 1 18000 (0)
1800-01: EST/EDT (NULL) 1 18000 (0)
1943-01: EST/EWT (EWT) 1 18000 (14400)
1945-09: EST/EPT (EPT) 1 18000 (14400)

Indeed, mktime changes tzname as a side effect, but the result is system 
dependent (see LMT/EDT vs. EST/EDT in the third line).

Furthermore, the values of daylight and timezone variables do not get updated, 
resulting in an inconsistent state.  For this reason, I don't think Python 
should expose the new values of tzname.  People who really need access to those 
can use ctypes.

--
resolution:  -> wont fix
stage: patch review -> resolved
status: open -> closed
Added file: http://bugs.python.org/file44641/test-mktime.c

___
Python tracker 

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



[issue28126] Py_MEMCPY: Use memcpy on Windows?

2016-09-13 Thread Christian Heimes

Christian Heimes added the comment:

Perfect, thanks! Should we keep the Py_MEMCPY() macro for now and define it to 
memcpy()? Or should I get rid of it and just define it for b/w compatibility?

--

___
Python tracker 

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



[issue28132] impossible to uninstall python3.6.0b1-amd64 from windows 10

2016-09-13 Thread Steve Dower

Steve Dower added the comment:

You should have some log files in your %TEMP% directory. Can you zip up the 
most recent set and attach them here?

FWIW, I just installed with that command and uninstall was fine, though Repair 
certainly had some issues that I'll investigate.

--
nosy: +steve.dower

___
Python tracker 

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



[issue28114] Crash in unicodeobject.c find_maxchar_surrogates on python-3.6.0b1 for Windows

2016-09-13 Thread Steve Dower

Steve Dower added the comment:

Whoops, yeah that's my fault. I'll get to it before b2, but I need to catch up 
on my day job the next week or two, so if someone else wants to apply a fix 
(and add a test - test_crashers, presumably?) then go for it!

--

___
Python tracker 

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



[issue28115] Use argparse for the zipfile module

2016-09-13 Thread Jaysinh shukla

Jaysinh shukla added the comment:

I'm working on this. :)

--
nosy: +jaysinh.shukla

___
Python tracker 

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



[issue28132] impossible to uninstall python3.6.0b1-amd64 from windows 10

2016-09-13 Thread Big Stone

Big Stone added the comment:

small detail: installed via non-default mean:

python-3.6.0b1-amd64.exe 
TargetDir=C:\WinPython\basedir36\winpython-3.6.0b1-amd64\python-3.6.0b1.amd64 
/quiet  InstallAllUsers=0 Include_launcher=0 InstallLauncherAllUsers=0 
Include_test=0  AssociateFiles=0 Shortcuts=0

--

___
Python tracker 

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



  1   2   3   >