[issue28829] Tkinter messagebox cx_freeze Python 3.4

2016-11-29 Thread Parviz Karimli

New submission from Parviz Karimli:

Tkinter messagebox doesn't work when trying to make an exectuable by cx_freeze 
in Python 3.4. It works fine with Python 3.4 alone. But after I create an exe 
of this file, the messagebox does not pop up.

--
components: Tkinter
files: messagebox cx_freeze python 3.4.py
messages: 281961
nosy: ParvizKarimli
priority: normal
severity: normal
status: open
title: Tkinter messagebox cx_freeze Python 3.4
type: behavior
versions: Python 3.4
Added file: http://bugs.python.org/file45683/messagebox cx_freeze python 3.4.py

___
Python tracker 

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



[issue28821] generate_opcode_h.py crash when run with python2

2016-11-29 Thread STINNER Victor

STINNER Victor added the comment:

> Whenever I did a fresh clone, the Tools/scripts/generate_opcode_h.py would be 
> called.

Can you please test "make touch"? This command "fixes" timestamps.

--

___
Python tracker 

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



[issue28822] Fix indices handling in PyUnicode_FindChar

2016-11-29 Thread STINNER Victor

STINNER Victor added the comment:

Serhiy: I don't think that it's worth it to add a new function to _testcapi to 
test PyUnicode_FindChar. The implementation of the function seems simple.

At least, I would prefer to only see a few unit tests, not 17 test for this 
simple function!

I mean "character in str" is already tested by a *lot* of unit tests.

--

___
Python tracker 

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



[issue28821] generate_opcode_h.py crash when run with python2

2016-11-29 Thread Florin Papa

Florin Papa added the comment:

I tested and the script is no longer called if you do a "make touch" beforehand.

--

___
Python tracker 

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



[issue28821] generate_opcode_h.py crash when run with python2

2016-11-29 Thread STINNER Victor

STINNER Victor added the comment:

Florin Papa added the comment:
> I tested and the script is no longer called if you do a "make touch" 
> beforehand.

Oh ok, thanks for the test. It confirms that you don't need to run the
script to build Python 3. It's a side effect of the Mercurial clone.

--

___
Python tracker 

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



[issue28808] Make PyUnicode_CompareWithASCIIString() never failing

2016-11-29 Thread STINNER Victor

STINNER Victor added the comment:

>> The function was already documented in Python 3.5, so please add a "..
>> versionchanged:: 3.6" to document the API chnange.

> No, this behavior is not documented in any released Python version. The note 
> about the failure was added in issue28701.

Ah wait, you want to push this change into Python 3.5? I would prefer to leave 
Python 3.5 unchanged.

Even if you modify Python 3.5, you still have to mention the "versionchanged", 
since it's a behaviour change.

--

___
Python tracker 

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



[issue28822] Fix indices handling in PyUnicode_FindChar

2016-11-29 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

I think it is nice to add tests for C API. Especially if there is no direct 
mapping between Python and C API ("character in str" don't call 
PyUnicode_FindChar()). Tests should cover all corner cases, otherwise we can 
miss bugs. Some C API can be not used in CPython at all, just in third-party 
extensions, and special tests is the only way to test them. The implementation 
of PyUnicode_FindChar() is not so simple (for example see issue24821).

I don't have an opinion about supporting negative indices.

--

___
Python tracker 

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



[issue28808] Make PyUnicode_CompareWithASCIIString() never failing

2016-11-29 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Usually we don't add "versionchanged" for every fixed bug.

--

___
Python tracker 

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



[issue14845] list() != []

2016-11-29 Thread Mark Dickinson

Mark Dickinson added the comment:

@wolma: I don't think PEP 479 is relevant here: we're not raising StopIteration 
inside a generator function, which is the situation that PEP 479 covers. The 
behaviour in 3.6 matches that originally reported:

Python 3.6.0b3 (default, Nov  2 2016, 08:15:32) 
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.57)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> def five(x):
... for _ in range(5):
... yield x
... 
>>> F = five('x')
>>> [next(F) for _ in range(10)]
Traceback (most recent call last):
  File "", line 1, in 
  File "", line 1, in 
StopIteration
>>> F = five('x')
>>> list(next(F) for _ in range(10))
['x', 'x', 'x', 'x', 'x']

--
nosy: +mark.dickinson

___
Python tracker 

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



[issue28441] Change sys.executable to include executable suffix

2016-11-29 Thread Masayuki Yamamoto

Masayuki Yamamoto added the comment:

I updated a patch to check the made path because previous patch has added 
suffix even to symbolic link. New patch works that If made path is invalid, 
revert to original.

--
Added file: http://bugs.python.org/file45684/sys-executable-suffix-3.patch

___
Python tracker 

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



[issue28441] Change sys.executable to include executable suffix

2016-11-29 Thread Masayuki Yamamoto

Changes by Masayuki Yamamoto :


Removed file: http://bugs.python.org/file45684/sys-executable-suffix-3.patch

___
Python tracker 

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



[issue14845] list() != []

2016-11-29 Thread Wolfgang Maier

Wolfgang Maier added the comment:

Mark, PEP479 is not fully in effect in 3.6 yet. 3.7 will raise the 
RuntimeError, but 3.6 still only gives a DeprecationWarning.

--

___
Python tracker 

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



[issue28441] Change sys.executable to include executable suffix

2016-11-29 Thread Masayuki Yamamoto

Changes by Masayuki Yamamoto :


Added file: http://bugs.python.org/file45685/sys-executable-suffix-3.patch

___
Python tracker 

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



[issue28822] Fix indices handling in PyUnicode_FindChar

2016-11-29 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Would be nice to test corner cases:

1. Search UCS2 or UCS4 character with zero lower 8 bits: U+XX00.

2. Search UCS2 or UCS4 character with lower 8 bits that match high bits of 
string characters. For example search U+0404 in the string that consists of 
U+04XX (Ukrainian text). I think you can find similar Chinese example.

--

___
Python tracker 

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



[issue14845] list() != []

2016-11-29 Thread Wolfgang Maier

Wolfgang Maier added the comment:

running with "-W always":

>>> def five(x):
... for _ in range(5):
... yield x
... 

>>> F = five('x')

>>> [next(F) for _ in range(10)]
Traceback (most recent call last):
  File "", line 1, in 
  File "", line 1, in 
StopIteration

>>> list(next(F) for _ in range(10))
__main__:1: DeprecationWarning: generator '' raised StopIteration
[]

--

___
Python tracker 

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



[issue14845] list() != []

2016-11-29 Thread Mark Dickinson

Mark Dickinson added the comment:

Wolfgang: ah, thanks, that makes more sense. I misunderstood; sorry for the 
noise.

--

___
Python tracker 

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



[issue28733] Show how to use mock_open in modules other that __main__

2016-11-29 Thread Michael Foord

Michael Foord added the comment:

open shouldn't always be patched in builtins, it's much better to patch it in 
the specific namespace it's being called from. So the doc patch here shouldn't 
be applied as is.

--

___
Python tracker 

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



[issue28820] Typo in section 6 of the Python 3.4 documentation

2016-11-29 Thread Julien Palard

Julien Palard added the comment:

Hi Martin,

Removed the removing of the double new line at end of file.

--
Added file: http://bugs.python.org/file45686/issue28820-2.diff

___
Python tracker 

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



[issue28830] Typo in whatsnew entry for 3.6

2016-11-29 Thread Lele Gaifax

New submission from Lele Gaifax:

At https://hg.python.org/cpython/rev/52038705827d#l1.18 there is an "as part" 
where probably a "are part" was meant.

--
assignee: docs@python
components: Documentation
messages: 281977
nosy: docs@python, lelit
priority: normal
severity: normal
status: open
title: Typo in whatsnew entry for 3.6
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



[issue28830] Typo in whatsnew entry for 3.6

2016-11-29 Thread SilentGhost

SilentGhost added the comment:

Reads just fine to me.

--
nosy: +SilentGhost

___
Python tracker 

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



[issue28781] On Installation of 3.5 Python get error message

2016-11-29 Thread Mark Harris

Mark Harris added the comment:

I installed python just for my user, attempted to run python just out of 
interest in the command line and again the same error appeared (missing 
python35.dll).

I uninstalled that then reinstalled for all users, and again during 
installation the message missing python35.dll appeared. 

Any other suggestions? Thanks for the help so far.

--

___
Python tracker 

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



[issue28830] Typo in whatsnew entry for 3.6

2016-11-29 Thread Lele Gaifax

Lele Gaifax added the comment:

Ok, thank you.

--

___
Python tracker 

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



[issue28830] Typo in whatsnew entry for 3.6

2016-11-29 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



[issue28831] Python 3's shutil.make_archive is truncating filenames

2016-11-29 Thread Dan “locallycompact” Firth

New submission from Dan “locallycompact” Firth:

I have made an example of this bug here: 
https://github.com/locallycompact/py3_make_archive_bug

Using shutil.make_archive() in python2 works fine, where as in python3 one of 
the filenames has been truncated by five characters after unpacking the 
resulting archive. This is the same every time.

--
messages: 281981
nosy: Dan “locallycompact” Firth
priority: normal
severity: normal
status: open
title: Python 3's shutil.make_archive is truncating filenames
type: behavior
versions: Python 3.4

___
Python tracker 

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



[issue28831] Python 3's shutil.make_archive is truncating filenames

2016-11-29 Thread Decorater

Decorater added the comment:

hmm
This shows a bug in shutil.make_archive in python3.

Run ./test.sh to run shutil.make_archive in both python2 and python3
on the wdir and then extract each of them for comparison. The file called

'/usr/share/ca-certificates/mozilla/TÜBİTAK_UEKAE_Kök_Sertifika_Hizmet_Sağlayıcısı_-_Sürüm_3.crt'

has been truncated by five characters in the python3 archive, becoming:

'/usr/share/ca-certificates/mozilla/TÜBİTAK_UEKAE_Kök_Sertifika_Hizmet_Sağlayıcısı_-_Sürüm_'

Something makes me wonder if it counts the # of chars in the file name 
specified and strips anything larger.

--
nosy: +Decorater

___
Python tracker 

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



[issue28831] Python 3's shutil.make_archive is truncating filenames

2016-11-29 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

This looks as a duplicate of issue24838.

--
nosy: +serhiy.storchaka
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> tarfile.py: fix GNU and USTAR formats to properly handle paths 
with special characters that are encoded with more than one byte each

___
Python tracker 

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



[issue28831] Python 3's shutil.make_archive is truncating filenames

2016-11-29 Thread STINNER Victor

STINNER Victor added the comment:

An entry in a TAR archive has a name. The name field has a size of 100 bytes. 
The field is padded with zero bytes. I don't know if it must or must not end 
with a zero byte.

'/usr/share/ca-certificates/mozilla/TÜBİTAK_UEKAE_Kök_Sertifika_Hizmet_Sağlayıcısı_-_Sürüm_3.crt'
 string encoded to UTF-8 takes 104 bytes.

Python should emit a warning or even fail with an error if a name is longer 
than 100 *bytes* (not 100 *characters*).

--
nosy: +haypo, lars.gustaebel

___
Python tracker 

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



[issue28831] Python 3's shutil.make_archive is truncating filenames

2016-11-29 Thread STINNER Victor

STINNER Victor added the comment:

Oh, Serhiy just closed the issue as a duplicate.

--

___
Python tracker 

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



[issue24838] tarfile.py: fix GNU and USTAR formats to properly handle paths with special characters that are encoded with more than one byte each

2016-11-29 Thread STINNER Victor

STINNER Victor added the comment:

FYI the first release including the fix 78ede2baa146 is Python 3.5.2.

--

___
Python tracker 

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



[issue28831] Python 3's shutil.make_archive is truncating filenames

2016-11-29 Thread STINNER Victor

STINNER Victor added the comment:

FYI the first release including the fix 78ede2baa146 is Python 3.5.2.

--

___
Python tracker 

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



[issue13721] ssl.wrap_socket on a connected but failed connection succeeds and .peer_certificate gives AttributeError

2016-11-29 Thread Kristján Valur Jónsson

Kristján Valur Jónsson added the comment:

fyi, I just observed this in the field in 2.7.3 using requests 2.5.3
I don't think requests has a workaround for 2.7 from reading the release logs.

--
nosy: +kristjan.jonsson

___
Python tracker 

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



[issue28832] Reduce memset in dict creation

2016-11-29 Thread INADA Naoki

New submission from INADA Naoki:

This patch delays initialization of dk_entries.
Entries are initialized when first use (when dk_netries is incremented).

Minimum dk_entries of 64bit arch is 5 * 8 * 3 = 120bytes.
So it can save 4 cache lines!

I'm running benchmark for now.

--
assignee: inada.naoki
components: Interpreter Core
files: reduce-memset.patch
keywords: patch
messages: 281989
nosy: inada.naoki
priority: normal
severity: normal
stage: patch review
status: open
title: Reduce memset in dict creation
type: performance
versions: Python 3.7
Added file: http://bugs.python.org/file45687/reduce-memset.patch

___
Python tracker 

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



[issue25658] PyThread assumes pthread_key_t is an integer, which is against POSIX

2016-11-29 Thread Erik Bray

Erik Bray added the comment:

To me, Masayuki's patch is an acceptable work-around for the time being.  I 
don't *like* it because the fact remains that native TLS can work on these 
platforms and falling back on Python's slower implementation isn't necessary.  
That said, the previous patch attempts also add additional overhead that 
shouldn't be necessary.

I agree the best thing to do would be to change this API, but that is a bigger 
issue I guess...

--

___
Python tracker 

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



[issue28733] Show how to use mock_open in modules other that __main__

2016-11-29 Thread Michał Bultrowicz

Michał Bultrowicz added the comment:

Then where it should be patched in? Can you give an example? From what I've 
checked patching only works in __main__ and builtins.

--

___
Python tracker 

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



[issue28781] On Installation of 3.5 Python get error message

2016-11-29 Thread Steve Dower

Steve Dower added the comment:

Could you attach those three sets of logs? I'm running low on ideas and need 
all the inspiration I can get :)

--

___
Python tracker 

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



[issue28833] cross compilation of third-party extension modules

2016-11-29 Thread Xavier de Gaye

New submission from Xavier de Gaye:

With this patch, cross compiling a third-party extension module is done with 
the command:

  XBUILD_PYTHON_DIR=/path/to/python/dir python setup.py build

where XBUILD_PYTHON_DIR is the location of the directory of the cross-compiled 
python executable.
It may be:
a) The build tree, which is the source tree when the cross compilation is not 
out of the source tree.
b) '$DESTDIR/$exec_prefix/bin' when the cross built python has been installed 
with 'make DESTDIR=/some/path install'. In that case 'prefix' and 'exec_prefix' 
may be different.
c) When the result of the cross compilation has been manually copied (for 
example to /some/path) and if 'prefix' and 'exec_prefix' are identical, this is 
/some/path/bin.
In case b), one can use the 'install' setup.py command instead of the 'build' 
command, to build and install the extension module to 
'$DESTDIR/$exec_prefix/lib/python$VERSION/site-packages' with the appropriate 
'egg-info' file.

The patch uses the 'python-config' shell script (created at issue 16235 [1]) 
that is initialized with the proper variables at the configure stage to provide 
the minimum information required by the sysconfig module to create (with the 
option --generate-posix-vars) the sysconfigdata file or to import the 
sysconfigdata module.
The patch also fixes issue 22724 [2] as sys.path is only modified during the 
time needed to import the sysconfigdata module.

The patch fixes two minor problems:
* '_PYTHON_HOST_PLATFORM' in Makefile.pre.in was not added to the sysconfig 
variables as intended, since those variables may not be prefixed with an 
underscore.
* The sysconfigdata file name was terminated with a dangling underscore when 
'multiarch' is not defined.
Patch also tested with pyephem on an Android emulator.
The patch misses the documentation.
Please run autoconf after installing the patch.

[1] issue 16235: add python-config.sh for use during cross compilation
http://bugs.python.org/issue16235
[2] issue 22724: byte-compile fails for cross-builds
http://bugs.python.org/issue22724

--
assignee: xdegaye
components: Cross-Build
files: cross-build-extension.patch
keywords: patch
messages: 281993
nosy: Alex.Willmer, doko, dstufft, eric.araujo, haypo, martin.panter, xdegaye, 
zach.ware
priority: normal
severity: normal
stage: patch review
status: open
title: cross compilation of third-party extension modules
type: behavior
versions: Python 3.6, Python 3.7
Added file: http://bugs.python.org/file45688/cross-build-extension.patch

___
Python tracker 

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



[issue28781] On Installation of 3.5 Python get error message

2016-11-29 Thread Mark Harris

Mark Harris added the comment:

I've attached the logs,

Thanks,

Mark

--
Added file: http://bugs.python.org/file45689/Python logs 3.zip

___
Python tracker 

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



[issue14845] list() != []

2016-11-29 Thread R. David Murray

R. David Murray added the comment:

OK, then this issue can be closed unless someone thinks it is worth documenting 
the lack of PEP 479 in 3.5 and 3.6.

--

___
Python tracker 

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



[issue28833] cross compilation of third-party extension modules

2016-11-29 Thread Matthias Klose

Matthias Klose added the comment:

This approach will not work with a "multiarch" enabled environment, and break 
cross builds on Debian and Ubuntu.

Afaics, the proposal assumes that the python executable for the target 
architecture is installed (which it is not for the multiarch cross-build 
layout), and that each target architecture has to be identified by it's own 
directory tree (again, not in the multiarch environment, you can install 
multiple targets into the same path).

I don't think that identifying the target by some path is the right way to go, 
and you should be able to identify the target by giving the target triplet as 
used by the configure parameters and then deduce the location from the target 
(or have an explicit location given).

The idea here is to use the platform identifier which we already had in the 
trunk before the PLATDIR was removed (the multiarch id or if not defined the 
platform). So by having a  specifier, you could deduce a path, or a 
-python-config executable and you're done. No need to know about a path 
directly.  Of course python cross builds would have to install the 
-python-config executable or symlink.

Minor issue: please s/xbuild/cross_build/.

--

___
Python tracker 

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



[issue26273] Expose TCP_CONGESTION and TCP_USER_TIMEOUT to the socket module

2016-11-29 Thread Antoine Pitrou

Antoine Pitrou added the comment:

+1 for this.  The patch looks fine, and there's no need to add any 
documentation or tests.

--
nosy: +pitrou
stage:  -> patch review
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



[issue28833] cross compilation of third-party extension modules

2016-11-29 Thread Matthias Klose

Matthias Klose added the comment:

> * The sysconfigdata file name was terminated with a dangling
>   underscore when 'multiarch' is not defined.

That only solves part of the problem in that the kernel/os version gets encoded 
as well, e.g. gnukfreebsd9, gnukfreebsd10, which is nasty when the version of 
your runtime and build time kernel differ.

--

___
Python tracker 

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



[issue28663] Higher virtual memory usage on recent Linux versions

2016-11-29 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Your script works fine here (Ubuntu 16.04). Besides, if you're seeing 
differences between two Linux versions with the same Python version, it is 
quite unlikely to be a Python issue.

--
nosy: +pitrou

___
Python tracker 

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



[issue28822] Fix indices handling in PyUnicode_FindChar

2016-11-29 Thread Xiang Zhang

Xiang Zhang added the comment:

Thanks for your reviews. :-)

v2 updated the test codes.

--
Added file: http://bugs.python.org/file45690/PyUnicode_FindChar-v2.patch

___
Python tracker 

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



[issue26273] Expose TCP_CONGESTION and TCP_USER_TIMEOUT to the socket module

2016-11-29 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 674fb9644eaa by Victor Stinner in branch 'default':
Add TCP_CONGESTION and TCP_USER_TIMEOUT
https://hg.python.org/cpython/rev/674fb9644eaa

--
nosy: +python-dev

___
Python tracker 

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



[issue26273] Expose TCP_CONGESTION and TCP_USER_TIMEOUT to the socket module

2016-11-29 Thread STINNER Victor

STINNER Victor added the comment:

@Ned Deily: Would you be ok to add these two constants to Python 3.6? I cannot 
image any regression if 674fb9644eaa is backported to Python 3.6.

@Serhiy, Yury: Any opinion on the backport?

--
nosy: +haypo, ned.deily, serhiy.storchaka

___
Python tracker 

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



[issue26273] Expose TCP_CONGESTION and TCP_USER_TIMEOUT to the socket module

2016-11-29 Thread STINNER Victor

STINNER Victor added the comment:

Sorry, I missed this issue.

TCP_USER_TIMEOUT is super useful! It helps a lot to detect when a server is 
down, especially when using keep alive: at kernel level (TCP keepalive) or 
application level (ex: RabbitMQ heart beat).

Linux default timeout is more something like 15 minutes. A few years ago, it 
was longer than 2 days :-)

--

___
Python tracker 

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



[issue26273] Expose TCP_CONGESTION and TCP_USER_TIMEOUT to the socket module

2016-11-29 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Le 29/11/2016 à 16:59, STINNER Victor a écrit :
> 
> TCP_USER_TIMEOUT is super useful!

It is :-)

--

___
Python tracker 

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



[issue28832] Reduce memset in dict creation

2016-11-29 Thread INADA Naoki

INADA Naoki added the comment:

$ ./python-default -m perf compare_to default.json patched.json  -G
Slower (2):
- xml_etree_iterparse: 328 ms +- 26 ms -> 350 ms +- 29 ms: 1.07x slower
- fannkuch: 1.58 sec +- 0.09 sec -> 1.65 sec +- 0.09 sec: 1.05x slower

Faster (9):
- scimark_sor: 870 ms +- 59 ms -> 800 ms +- 54 ms: 1.09x faster
- deltablue: 28.0 ms +- 2.1 ms -> 26.4 ms +- 1.6 ms: 1.06x faster
- regex_dna: 423 ms +- 26 ms -> 399 ms +- 26 ms: 1.06x faster
- scimark_sparse_mat_mult: 13.9 ms +- 1.0 ms -> 13.2 ms +- 0.9 ms: 1.06x faster
- raytrace: 2.16 sec +- 0.12 sec -> 2.07 sec +- 0.11 sec: 1.05x faster
- unpickle_pure_python: 1.36 ms +- 0.11 ms -> 1.31 ms +- 0.07 ms: 1.04x faster
- pickle_dict: 103 us +- 11 us -> 99.7 us +- 7.7 us: 1.03x faster
- scimark_monte_carlo: 408 ms +- 35 ms -> 397 ms +- 25 ms: 1.03x faster
- scimark_lu: 765 ms +- 49 ms -> 746 ms +- 55 ms: 1.03x faster

Benchmark hidden because not significant (53): 2to3, call_method, 
call_method_slots, call_method_unknown, call_simple, chameleon, chaos, 
crypto_pyaes, django_template, dulwich_log, float, genshi_text, gen
shi_xml, go, hexiom, html5lib, json_dumps, json_loads, logging_format, 
logging_silent, logging_simple, mako, meteor_contest, nbody, nqueens, pathlib, 
pickle, pickle_list, pickle_pure_python, pidigits, pyt
hon_startup, python_startup_no_site, regex_compile, regex_effbot, regex_v8, 
richards, scimark_fft, spectral_norm, sqlalchemy_declarative, 
sqlalchemy_imperative, sqlite_synth, sympy_expand, sympy_integrate
, sympy_str, sympy_sum, telco, tornado_http, unpack_sequence, unpickle, 
unpickle_list, xml_etree_generate, xml_etree_parse, xml_etree_process

--
nosy: +haypo

___
Python tracker 

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



[issue28663] Higher virtual memory usage on recent Linux versions

2016-11-29 Thread STINNER Victor

STINNER Victor added the comment:

It's very hard to estimate the water high-mark for memory because the memory 
includes different things: read-only memory, mmap() on files, read-only memory 
pages shared between multiple processes for libraries, etc.

I suggest to use the tracemalloc module to have a better idea of the memory 
usage of the memory directly allocated by Python.

--
nosy: +haypo

___
Python tracker 

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



[issue26273] Expose TCP_CONGESTION and TCP_USER_TIMEOUT to the socket module

2016-11-29 Thread Omar Sandoval

Omar Sandoval added the comment:

Glad to see this finally get in :)

--

___
Python tracker 

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



[issue28663] Higher virtual memory usage on recent Linux versions

2016-11-29 Thread STINNER Victor

STINNER Victor added the comment:

rlimit_tracemalloc.txt: Oh, my idea was only to see the total,
https://docs.python.org/dev/library/tracemalloc.html#tracemalloc.get_traced_memory

Current and peak memory usage.

--

___
Python tracker 

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



[issue28832] Reduce memset in dict creation

2016-11-29 Thread STINNER Victor

STINNER Victor added the comment:

Can you please attached the two JSON files, compressed with gzip (.gz files). 
perf is also to read gzipped JSON.

--

___
Python tracker 

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



[issue26273] Expose TCP_CONGESTION and TCP_USER_TIMEOUT to the socket module

2016-11-29 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Shouldn't we add something like versionadded/versionchanged or a mentioning in 
What's New?

--

___
Python tracker 

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



[issue26273] Expose TCP_CONGESTION and TCP_USER_TIMEOUT to the socket module

2016-11-29 Thread Yury Selivanov

Yury Selivanov added the comment:

Would be nice to have in 3.6.

--

___
Python tracker 

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



[issue28663] Higher virtual memory usage on recent Linux versions

2016-11-29 Thread ProgVal

ProgVal added the comment:

(4350362, 4376669)

--

___
Python tracker 

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



[issue28832] Reduce memset in dict creation

2016-11-29 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

I think that clearing 120 bytes at a time is faster than clear it later 
entry-by-entry.

Your patch removes some asserts, this looks not good.

Could your provide microbenchmarks that show the largest speed up and the 
largest slow down? So we would see what type of code gets the benefit.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue28663] Higher virtual memory usage on recent Linux versions

2016-11-29 Thread STINNER Victor

STINNER Victor added the comment:

ProgVal: "(4350362, 4376669)" is it the same result on Python 3.4 and Python 
3.5? I don't understand your comment :-/ Can you please elaborate?

--

___
Python tracker 

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



[issue26273] Expose TCP_CONGESTION and TCP_USER_TIMEOUT to the socket module

2016-11-29 Thread Ned Deily

Ned Deily added the comment:

OK for 3.6.0rc1 (before it times out)

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



[issue28822] Fix indices handling in PyUnicode_FindChar

2016-11-29 Thread STINNER Victor

STINNER Victor added the comment:

PyUnicode_FindChar-v2.patch LGTM with a minor comment on the review, but I 
would prefer that Serhiy also reviews it ;-)

Remaining question: what is the behaviour for direction=0, direction=100 or 
direction=-2? Maybe we can add a few unit tests for strange values of 
direction? (Not sure if it's worth it.)

--

___
Python tracker 

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



[issue28832] Reduce memset in dict creation

2016-11-29 Thread STINNER Victor

STINNER Victor added the comment:

You might experiment Python_Calloc().

I'm not sure that this allocator is well optimized (especially the pymalloc 
allocator) :-/ Last time I played with it, it was slower, especially for 
allocations smaller than 1 MB.

--

___
Python tracker 

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



[issue26273] Expose TCP_CONGESTION and TCP_USER_TIMEOUT to the socket module

2016-11-29 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 6d69da76be6a by Victor Stinner in branch '3.6':
Add TCP_CONGESTION and TCP_USER_TIMEOUT
https://hg.python.org/cpython/rev/6d69da76be6a

--

___
Python tracker 

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



[issue26273] Expose TCP_CONGESTION and TCP_USER_TIMEOUT to the socket module

2016-11-29 Thread STINNER Victor

STINNER Victor added the comment:

Serhiy Storchaka: "Shouldn't we add something like versionadded/versionchanged 
or a mentioning in What's New?"

Oh right, we did that for other new constants added to Python 3.6 like 
SO_DOMAIN.

Attached socket_doc.patch documents the additional of the two new constants. It 
seems like "hg transplant" putted the NEWS entry in the wrong section :-/ The 
patch also fixes that.

--
Added file: http://bugs.python.org/file45692/socket_doc.patch

___
Python tracker 

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



[issue28791] update sqlite to 3.15.2

2016-11-29 Thread Mariatta Wijaya

Changes by Mariatta Wijaya :


--
components: +Installation, Windows, macOS
nosy: +ned.deily, paul.moore, ronaldoussoren, steve.dower, tim.golden, zach.ware

___
Python tracker 

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



[issue28822] Fix indices handling in PyUnicode_FindChar

2016-11-29 Thread Xiang Zhang

Xiang Zhang added the comment:

> Remaining question: what is the behaviour for direction=0, direction=100 or 
> direction=-2? Maybe we can add a few unit tests for strange values of 
> direction? (Not sure if it's worth it.)

It's not documented so I also doubt it. Expect Serhiy's comment.

--

___
Python tracker 

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



[issue28208] update sqlite to 3.14.2

2016-11-29 Thread Mariatta Wijaya

Mariatta Wijaya added the comment:

sqlite 3.15.2 was just released.
I can prepare a patch if that's what we want.

--

___
Python tracker 

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



[issue28790] Error when using Generic and __slots__

2016-11-29 Thread Guido van Rossum

Guido van Rossum added the comment:

OK, having thought about it some more, given that you don't seem to object too 
strenuously, I'm going to merge the fix. May it be the last one!

--

___
Python tracker 

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



[issue25658] PyThread assumes pthread_key_t is an integer, which is against POSIX

2016-11-29 Thread Ed Schouten

Ed Schouten added the comment:

Looks good to me!

--

___
Python tracker 

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



[issue28790] Error when using Generic and __slots__

2016-11-29 Thread Guido van Rossum

Changes by Guido van Rossum :


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



[issue28790] Error when using Generic and __slots__

2016-11-29 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 0bbd29405c9d by Guido van Rossum in branch '3.5':
Issue #28790: Fix error when using Generic and __slots__ (Ivan L)
https://hg.python.org/cpython/rev/0bbd29405c9d

New changeset 2dd08b5b5ee6 by Guido van Rossum in branch '3.6':
Issue #28790: Fix error when using Generic and __slots__ (Ivan L) (3.5->3.6)
https://hg.python.org/cpython/rev/2dd08b5b5ee6

New changeset b9915ca4b3da by Guido van Rossum in branch 'default':
Issue #28790: Fix error when using Generic and __slots__ (Ivan L) (3.6->3.7)
https://hg.python.org/cpython/rev/b9915ca4b3da

--
nosy: +python-dev

___
Python tracker 

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



[issue28781] On Installation of 3.5 Python get error message

2016-11-29 Thread Steve Dower

Steve Dower added the comment:

That's only the most recent set, and all it shows is that the per-user install 
didn't help.

Do you have the earlier sets of install logs for the per-user install and 
uninstall? I'd like to see why those didn't have the effect I expected.

--

___
Python tracker 

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



[issue28663] Higher virtual memory usage on recent Linux versions

2016-11-29 Thread ProgVal

ProgVal added the comment:

Sorry. That's the result of |||get_traced_memory|on Python 3.5 and Linux
4.7.

--

___
Python tracker 

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



[issue28754] Argument Clinic for bisect.bisect_left

2016-11-29 Thread Julien Palard

Julien Palard added the comment:

I tried myself at Argument Clinic custom converters to create the "optional 
ssize_t converter" and it works, so as advised by Raymond, pydoc now shows 
None, and the C implementation now allows for both default values None and -1, 
as the custom converter returns -1 for none.

--
Added file: http://bugs.python.org/file45693/issue28754-7.diff

___
Python tracker 

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



[issue24469] Py2.x int free list can grow without bounds

2016-11-29 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


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

___
Python tracker 

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



[issue24469] Py2.x int free list can grow without bounds

2016-11-29 Thread Roundup Robot

Roundup Robot added the comment:

New changeset fd0842f34602 by Serhiy Storchaka in branch '2.7':
Issue #24469: Fixed memory leak caused by int subclasses without overridden
https://hg.python.org/cpython/rev/fd0842f34602

--
nosy: +python-dev

___
Python tracker 

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



[issue28754] Argument Clinic for bisect.bisect_left

2016-11-29 Thread Stefan Krah

Stefan Krah added the comment:

Julien, the syntax converters look pretty clever.  Do we need AC
everywhere though?  I wonder (once again) if this is really more
readable than the existing code.

--
nosy: +skrah

___
Python tracker 

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



[issue11145] '%o' % user-defined instance

2016-11-29 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

I read the code multiple times but still don't see any issues with the last 
path. If anybody know issues with it, please point on them. Otherwise I'll 
commit the patch.

--
assignee:  -> serhiy.storchaka

___
Python tracker 

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



[issue28208] update sqlite to 3.14.2

2016-11-29 Thread Big Stone

Big Stone added the comment:

As far as I test, the novelties from 0.15.2 don't break any API (just nice 
SQL-syntax sugar), and correct some old 3.8.0 bugs.

and ".2" is the same level of stabilisation as current "0.14.2"

--

___
Python tracker 

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



[issue25658] PyThread assumes pthread_key_t is an integer, which is against POSIX

2016-11-29 Thread Masayuki Yamamoto

Masayuki Yamamoto added the comment:

Elik, Ed,

I have overlooked tracemalloc module raises deadlock if apply the patch.
I found out a source comment on Modules/_tracemalloc.c:161

/* If your OS does not provide native thread local storage, you can implement
   it manually using a lock. Functions of thread.c cannot be used because
   they use PyMem_RawMalloc() which leads to a reentrant call. */
#if !(defined(_POSIX_THREADS) || defined(NT_THREADS))
#  error "need native thread local storage (TLS)"
#endif

Py_HAVE_NATIVE_TLS is used only on thread source code. Therefore C Compiler 
couldn't report error about tracemalloc. I'm sorry that I didn't check test.
Currently I'm trying to implement new API based on msg281227.

--

___
Python tracker 

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



[issue21818] cookielib documentation references Cookie module, not cookielib.Cookie class

2016-11-29 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Thus the only way to fix links is to specify full names? Does 
docs_class_links-2.7.patch look good to you?

--
stage:  -> patch review

___
Python tracker 

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



[issue22039] PyObject_SetAttr doesn't mention value = NULL

2016-11-29 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
nosy: +martin.panter

___
Python tracker 

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



[issue20612] cElementTree has problems with StringIO object containing unicode content

2016-11-29 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
status: open -> pending

___
Python tracker 

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



[issue28790] Error when using Generic and __slots__

2016-11-29 Thread Ned Deily

Changes by Ned Deily :


--
stage: commit review -> resolved

___
Python tracker 

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



[issue28791] update sqlite to 3.15.2

2016-11-29 Thread Ned Deily

Ned Deily added the comment:

Yes, we're not going to change library versions for the 3.6.0 installers at 
this point.  Upgrade for 3.7.0 is fine and possibly for a 3.6.x maintenance 
release if warranted.  I suggest holding off on any patches until we're closer 
to those releases as there may be subsequent SQLite updates.

--
stage:  -> needs patch

___
Python tracker 

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



[issue28834] Type checking in set comparisons.

2016-11-29 Thread nyoshimizu

New submission from nyoshimizu:

The non-operator versions of set comparisons (intersection(), union(), etc.) 
exhibit
inconsistent type checking. They only check the first input before deciding 
whether or not to raise a TypeError exception. 

Therefore, it's possible to pass a set first, then other objects (e.g. lists, 
dicts, tuples) and a correct 'intersection' is returned (apparently by ignoring 
ordering and using the keys in dicts). I've attached demonstrative example for 
Python 3.5, although Python 2.7 appears to exhibit the same behavior.

I'm not sure what the intended behavior was (whether or not to require sets). 
8.7.1 Set Objects states: "Note, the non-operator versions of union(), 
intersection(), difference(), and symmetric_difference() will accept any 
iterable as an argument."

Note that #8743 and #17626 appear to confirm that the operator versions should 
not accept non-sets and matches the observed behavior. As the latter issue 
points out, it's documented -- again in 8.7.1 -- that "...their operator based 
counterparts require their arguments to be sets." 

Is this behavior necessary but just not documented? The documentation states 
that "This precludes error-prone constructions like Set('abc') & 'cbs' in favor 
of the more readable Set('abc').intersection('cbs')." In the second example, a 
first set is needed to do the intersection, then 'cbs' gets typecast into a set 
(although I guess so was 'abc'). Then should the first inputs also be typecast 
as sets?

--
files: test_comparison.py
messages: 282036
nosy: nyoshimizu
priority: normal
severity: normal
status: open
title: Type checking in set comparisons.
type: behavior
versions: Python 2.7, Python 3.5
Added file: http://bugs.python.org/file45694/test_comparison.py

___
Python tracker 

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



[issue24015] timeit should start with 1 loop, not 10

2016-11-29 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

That was implemented in issue28240.

$ time ./python -m timeit "import time; time.sleep(1.0)"
1 loop, best of 5: 1 sec per loop

real0m6.176s
user0m0.160s
sys 0m0.004s

--
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> Enhance the timeit module: display average +- std dev instead 
of minimum

___
Python tracker 

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



[issue28754] Argument Clinic for bisect.bisect_left

2016-11-29 Thread STINNER Victor

STINNER Victor added the comment:

Stefan Krah added the comment:
> Julien, the syntax converters look pretty clever.  Do we need AC
> everywhere though?

Please see previous comments for advantages of AC (signature object,
docstring, speed).

--

___
Python tracker 

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



[issue28834] Type checking in set comparisons.

2016-11-29 Thread SilentGhost

SilentGhost added the comment:

You seem to be misunderstanding how the intersection/union/etc are supposed to 
be used:

>>> ab = {'a', 'b'}
>>> ab.intersection('bc')
{'b'}

Using set.intersection (where set is a built-in class, rather than an instance 
thereof) requires the first argument to be set (which is the actual instance of 
set class). This is no different from usage of any other class / object across 
Python, however, it is highly uncommon.

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



[issue28834] Type checking in set comparisons.

2016-11-29 Thread nyoshimizu

nyoshimizu added the comment:

I see. Sorry & thanks!

--

___
Python tracker 

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



[issue28833] cross compilation of third-party extension modules

2016-11-29 Thread Barry A. Warsaw

Changes by Barry A. Warsaw :


--
nosy: +barry

___
Python tracker 

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



[issue28754] Argument Clinic for bisect.bisect_left

2016-11-29 Thread Stefan Krah

Stefan Krah added the comment:

Signature and docstring can be done manually with very little effort.
Currently METH_FASTCALL is AC only, but I hope that will change.

--

___
Python tracker 

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



[issue26861] shutil.copyfile() doesn't close the opened files

2016-11-29 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

As I see, shutil.copyfile() uses the "with" statements and closes files just 
after copying.

--
status: open -> pending

___
Python tracker 

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



[issue28820] Typo in section 6 of the Python 3.4 documentation

2016-11-29 Thread Josh Rosenberg

Josh Rosenberg added the comment:

Just OOC, what version of English are the docs supposed to use? In American 
English, noun vs. verb doesn't matter, it's always "practice" (there is no such 
word as "practise").

In this case it doesn't matter (it's a noun, and everyone agrees on the 
spelling), but is there a defined standard?

--
nosy: +josh.r

___
Python tracker 

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



[issue28833] cross compilation of third-party extension modules

2016-11-29 Thread Xavier de Gaye

Xavier de Gaye added the comment:

> This approach will not work with a "multiarch" enabled environment, and break 
> cross builds on Debian and Ubuntu.

No, the patch does not break cross builds on Debian and Ubuntu, unless you can 
demonstrate it does.

> Afaics, the proposal assumes that the python executable for the target 
> architecture is installed (which it is not for the multiarch cross-build 
> layout), and that each target architecture has to be identified by it's own 
> directory tree (again, not in the multiarch environment, you can install 
> multiple targets into the same path).

No, you are mistaken, the path name of the build tree may be used to cross 
build third-party extension modules as stated in case a) of msg281993, and this 
should also work with debian. BTW the same code is run to cross build a 
standard library extension module and a third-party extension module, and 
obviously python is not yet installed by the time the standard library 
extension modules are built ;-)

> The idea here is to use the platform identifier which we already had in the 
> trunk before the PLATDIR was removed (the multiarch id or if not defined the 
> platform). So by having a  specifier, you could deduce a path, or a 
> -python-config executable and you're done. No need to know about a 
> path directly.  Of course python cross builds would have to install the 
> -python-config executable or symlink.

It is not clear why, because debian has this multiarch design, this should 
constrain our build system to follow their paradigm. After all, debian has 
already found some ways to cross-build the extension modules for their 
supported multiarch platforms since it is not possible, as of today, with 
upstream CPython.

> Minor issue: please s/xbuild/cross_build/.

Agreed.

> > * The sysconfigdata file name was terminated with a dangling
> >   underscore when 'multiarch' is not defined.
> 
> That only solves part of the problem in that the kernel/os version gets 
> encoded as well, e.g. gnukfreebsd9, gnukfreebsd10, which is nasty when the 
> version of your runtime and build time kernel differ.

No idea what is the problem you are refering to. It cannot be the "dangling 
underscore" problem since this is a cosmetic issue. Please explain.

--

___
Python tracker 

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



[issue28820] Typo in section 6 of the Python 3.4 documentation

2016-11-29 Thread R. David Murray

R. David Murray added the comment:

We at least used to point to Apple's style guide.  I'm not sure where we point 
at the moment (it's in the documentation somewhere :).  But yes, it's pretty 
much formal American English, though I'm sure there are places where other 
spelling has crept in.

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



[issue28833] cross compilation of third-party extension modules

2016-11-29 Thread Xavier de Gaye

Changes by Xavier de Gaye :


--
nosy: +Chi Hsuan Yen

___
Python tracker 

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



[issue27142] Default int value with xmlrpclib / xmlrpc.client

2016-11-29 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

This format doesn't conform the XML-RPC specification. Adding the support of it 
is a new feature. The question is whether there is a need of this feature. Are 
there some common XML-RPC servers or clients that produce such format?

--
type: behavior -> enhancement
versions: +Python 3.7 -Python 2.7, Python 3.4

___
Python tracker 

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



[issue25750] tp_descr_get(self, obj, type) is called without owning a reference to "self"

2016-11-29 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
assignee:  -> serhiy.storchaka

___
Python tracker 

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



[issue28795] Misleading stating, that SIGINT handler is installed by default

2016-11-29 Thread Julien Palard

Julien Palard added the comment:

Proposed as patches but english is not my native language so please review 
carefully.

--
keywords: +patch
Added file: http://bugs.python.org/file45695/issue28795-tip.diff

___
Python tracker 

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



[issue28795] Misleading stating, that SIGINT handler is installed by default

2016-11-29 Thread Julien Palard

Changes by Julien Palard :


Added file: http://bugs.python.org/file45696/issue28795-2.7.diff

___
Python tracker 

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



[issue24339] iso6937 encoding missing

2016-11-29 Thread John Helour

John Helour added the comment:

> Please also check whether it's not possible to reuse the charmap codec 
> functions we have
 I've found nothing useful, maybe you (as the author) can find something really 
useful which can improve code readability or increase the performance.

Please look at the newest codec version, particularly on line:

tmp += bytearray(encoding_map[c], 'latin1', 'ignore')

It is about extended ascii inheritance. Is it reliable and fast enough?

--
Added file: http://bugs.python.org/file45697/iso6937.py

___
Python tracker 

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



  1   2   >