[issue26662] configure/Makefile doesn't check if "python" command works, needed to build Objects/typeslots.inc

2016-07-10 Thread Chi Hsuan Yen

Chi Hsuan Yen added the comment:

Thanks! It's now working find with `make touch` :)

--

___
Python tracker 

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



[issue26662] configure/Makefile doesn't check if "python" command works, needed to build Objects/typeslots.inc

2016-07-10 Thread Martin Panter

Martin Panter added the comment:

Victor: Gnu Make has a special “.DELETE_ON_ERROR” target that will cause 
Objects/typeslots.inc to be removed if the “python” command fails, which is 
slightly better than truncating it. See delete-on-error.patch. It looks like 
you were not using Gnu Make, but maybe there is an equivalent for BSD’s Make.

Chi: Yes I think “make touch” may help you work around the problem. It should 
be safe to try anyway :)

--
keywords: +patch
Added file: http://bugs.python.org/file43683/delete-on-error.patch

___
Python tracker 

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



[issue14977] mailcap does not respect precedence in the presence of wildcards

2016-07-10 Thread Michael Lazar

Michael Lazar added the comment:

Alright thanks, I've submitted a patch

--

___
Python tracker 

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



[issue14977] mailcap does not respect precedence in the presence of wildcards

2016-07-10 Thread Michael Lazar

Changes by Michael Lazar :


--
keywords: +patch
Added file: http://bugs.python.org/file43682/mailcap.patch

___
Python tracker 

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



[issue27479] Slicing strings out of bounds does not raise IndexError

2016-07-10 Thread Eryk Sun

Eryk Sun added the comment:

This is documented behavior for the built-in sequence types [1], and it's also 
mentioned in the tutorial [2].

The indices() method of a slice object shows the resolved bounds for given 
sequence length:

>>> slice(-1000, 1000, 1).indices(4)
(0, 4, 1)
>>> slice(None, None, 1).indices(4)
(0, 4, 1)

>>> slice(1000, -1000, -1).indices(4)
(3, -1, -1)
>>> slice(None, None, -1).indices(4)
(3, -1, -1)

The rules apply the same to list, tuple, and range sequences:

>>> [1, 2, 3, 4][-1000:1000]
[1, 2, 3, 4]
>>> (1, 2, 3, 4)[-1000:1]
(1,)
>>> range(0)[-100:100]
range(0, 0)

[1]: https://docs.python.org/3/library/stdtypes.html#common-sequence-operations
[2]: https://docs.python.org/3/tutorial/introduction.html#strings

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



[issue27285] Document the deprecation of pyvenv in favor of `python3 -m venv`

2016-07-10 Thread Steve Piercy

Steve Piercy added the comment:

I've attached a patch for the buildbot error at [library/venv:353].

However, as noted in my [second bullet 
point](http://bugs.python.org/issue27285#msg269649):

- I removed the file Doc/using/scripts.rst because it became obsolete. This 
caused warnings in Doc/whatsnew/3.3.rst and Doc/whatsnew/3.4.rst which 
reference the obsolete file.

I couldn't find a policy that addresses what to do in this situation, so I left 
it to the council of elders to provide me with their sage guidance. I'll submit 
a patch as soon as I know which path to follow.

--
Added file: 
http://bugs.python.org/file43681/pyvenv-to-venv.update-susp-ignored.csv.patch

___
Python tracker 

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



[issue27377] Add smarter socket.fromfd()

2016-07-10 Thread Martin Panter

Martin Panter added the comment:

Left some minor code review nitpicks.

I opened Issue 27409 with an attempt at documenting exactly which SO_* etc 
symbols may be available. But so far I haven’t got any positive or negative 
feedback. If it were up to me, I would either commit everything except the new 
SO_* constants, or briefly list them in the documentation.

One more thing that occurred to me is maybe we should check for EINVAL from 
SO_PROTOCOL. That option was apparently added in Linux 2.6.32, and Free BSD 
8.4, 9.1, 10.0. Even if you think these version numbers are too old to worry 
about, what happens if a Python package is compiled with a new (e.g.) OS X or 
Windows version that supports SO_PROTOCOL, and then run on an old (existing) OS 
version?

--

___
Python tracker 

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



[issue26867] test_ssl test_options fails on ubuntu 16.04

2016-07-10 Thread Xiang Zhang

Xiang Zhang added the comment:

Does this need to be backport to py2.7? It suffers from the same problem.

--

___
Python tracker 

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



[issue27473] bytes_concat seems to check overflow using undefined behaviour

2016-07-10 Thread Xiang Zhang

Xiang Zhang added the comment:

Left a comment.

--

___
Python tracker 

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



[issue27476] Introduce a .github folder with PULL_REQUEST_TEMPLATE

2016-07-10 Thread Berker Peksag

Changes by Berker Peksag :


--
resolution:  -> fixed
stage: commit review -> resolved
status: open -> closed
type: behavior -> enhancement

___
Python tracker 

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



[issue23804] SSLSocket.recv(0) receives up to 1024 bytes

2016-07-10 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 74856df7e55b by Martin Panter in branch '3.5':
Issue #23804: Fix SSL zero-length recv() calls to not block and raise EOF
https://hg.python.org/cpython/rev/74856df7e55b

New changeset 43d7e5fb3bc2 by Martin Panter in branch '2.7':
Issue #23804: Fix SSL zero-length recv() calls to not block and raise EOF
https://hg.python.org/cpython/rev/43d7e5fb3bc2

New changeset 4ef2404d343e by Martin Panter in branch 'default':
Issue #23804: Merge SSL recv() fix from 3.5
https://hg.python.org/cpython/rev/4ef2404d343e

--

___
Python tracker 

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



[issue26988] Add AutoNumberedEnum to stdlib

2016-07-10 Thread Ethan Furman

Ethan Furman added the comment:

That brings up a really good point -- this feature requires the __prepare__ 
method of the metaclass, so it won't work in Python 2 any way.

So, yeah, bug-fix-mostly mode for enum34.  :)

--

___
Python tracker 

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



[issue27478] Python Can't run

2016-07-10 Thread Senthil Kumaran

Senthil Kumaran added the comment:

Please use stackoverflow.com or python-tu...@python.org for assistance. This 
site is for developers of python.

--
nosy: +orsenthil
resolution:  -> rejected
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



[issue27464] Document that SplitResult & friends are namedtuples

2016-07-10 Thread Martin Panter

Martin Panter added the comment:

I agree, SplitResult._replace() would probably have been very useful to me in 
the past if it were available (and guaranteed by the documentation).

The namedtuple implementation was added in revision 79579fa8d752 (in 2.6 and 
3.0), with a comment mentioning speeding up and simplifying the code. So it may 
not have originally been intended to have the namedtuple functionality as part 
of the API.

If the change is made in 3.5, it should equally be made in 2.7 (with a notice 
about only being supported since 2.6).

--
nosy: +martin.panter, rhettinger

___
Python tracker 

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



[issue26988] Add AutoNumberedEnum to stdlib

2016-07-10 Thread Barry A. Warsaw

Barry A. Warsaw added the comment:

On Jul 11, 2016, at 12:27 AM, Ethan Furman wrote:

>Not sure.  At this point I have the stdlib enum, enum34 enum, and aenum enum.
>
>In terms of capability, aenum is the most advanced, followed by the stdlib
>enum, and finally enum34 (really the only difference between stdlib and
>enum34 is the automatic definition order).
>
>The only advantage of enum34 over aenum is if it works in enum34 it will
>definitely work in the stdlib, whilst aenum has features not in the stdlib
>(speaking from a user point of view).
>
>So I haven't decided, but at this moment I'm not excited about the prospect.
>:(
>
>What I'll probably do is put enum34 in bug-fix only mode.

It's been useful to have a standalone version of the stdlib module, and in
fact, I maintain the enum34 package in Debian.  However, we only support that
for Python 2 since we don't have to worry about any Python 3 versions before
3.4 (and even there, 3.5 is the default for Stretch and Ubuntu 16.04 LTS).

We do have reverse dependencies for python-enum34, but given that we *really*
want people to port to Python 3, I'm not sure I really care too much any more
about enum34 in Debian.

--

___
Python tracker 

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



[issue10697] host and port attributes not documented well in function urllib.parse.urlparse and urlsplit

2016-07-10 Thread Martin Panter

Changes by Martin Panter :


--
status: open -> pending

___
Python tracker 

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



[issue27479] Slicing strings out of bounds does not raise IndexError

2016-07-10 Thread Elizabeth Myers

Changes by Elizabeth Myers :


--
components: +Interpreter Core

___
Python tracker 

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



[issue27479] Slicing strings out of bounds does not raise IndexError

2016-07-10 Thread Elizabeth Myers

New submission from Elizabeth Myers:

When slicing strings, IndexError is not raised when the slices are out of 
bounds, even for negative indexes. Like so:

>>> "test"[-1000:1000]
'test'

>>> "test"[-1000:1]
't'

>>> ""[-100:100]
''

This seems more like a bug than useful behaviour to me.

--
messages: 270147
nosy: Elizacat
priority: normal
severity: normal
status: open
title: Slicing strings out of bounds does not raise IndexError
versions: Python 2.7, Python 3.4, Python 3.5, Python 3.6

___
Python tracker 

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



[issue27479] Slicing strings out of bounds does not raise IndexError

2016-07-10 Thread Elizabeth Myers

Changes by Elizabeth Myers :


--
type:  -> behavior

___
Python tracker 

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



[issue27478] Python Can't run

2016-07-10 Thread Joshua

New submission from Joshua:

I am using the book, Beginning Programming with Python For Dummies and I am 
stuck. On chapter 10 of the book, there is a dialog box that says"Changing the 
current python directory". Inside the dialog box there is an instruction on how 
to change directory, which I followed. I typed: "os.chdir(C:\the python root 
directory) and press enter and my problem started. The application can't run 
anything again. When I try to run, I get this message "IDLE's subprocess didn't 
make connection. Either IDLE cant start a subprocess or personal firewall 
software is blocking the connection". I have re-installed many times, tried 
google to see if i can find anything but none has helped.
I am new in programming and I will really appreciate your assistant.

--
components: IDLE
messages: 270146
nosy: Keboku
priority: normal
severity: normal
status: open
title: Python Can't run
type: behavior
versions: Python 3.5

___
Python tracker 

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



[issue14977] mailcap does not respect precedence in the presence of wildcards

2016-07-10 Thread R. David Murray

R. David Murray added the comment:

Submit it as a proposed patch here for review, please.  git or hg diff against 
the default branch, or a pointer to an hg clone with the patch applied.

--
versions: +Python 3.5, Python 3.6 -Python 2.7, Python 3.2, Python 3.3

___
Python tracker 

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



[issue27285] Document the deprecation of pyvenv in favor of `python3 -m venv`

2016-07-10 Thread Martin Panter

Martin Panter added the comment:

Buildbot has errors and warnings:

http://buildbot.python.org/all/builders/Docs%203.x/builds/1729/steps/suspicious/logs/stdio

make -C Doc/ suspicious
. . .
writing output... [ 83%] library/venv

WARNING: [library/venv:353] ":param" found in ":param context: The 
information for the virtual environment"
. . .
/buildbot/buildarea/3.x.ware-docs/build/Doc/whatsnew/3.3.rst:110: WARNING: 
undefined label: scripts-pyvenv (if the link has no caption the label must 
precede a section header)
/buildbot/buildarea/3.x.ware-docs/build/Doc/whatsnew/3.4.rst:200: WARNING: 
undefined label: scripts-pyvenv (if the link has no caption the label must 
precede a section header)
/buildbot/buildarea/3.x.ware-docs/build/Doc/whatsnew/3.4.rst:1992: WARNING: 
undefined label: scripts-pyvenv (if the link has no caption the label must 
precede a section header)
/buildbot/buildarea/3.x.ware-docs/build/Doc/whatsnew/3.4.rst:1996: WARNING: 
undefined label: scripts-pyvenv (if the link has no caption the label must 
precede a section header)
/buildbot/buildarea/3.x.ware-docs/build/Doc/whatsnew/3.4.rst:2462: WARNING: 
undefined label: scripts-pyvenv (if the link has no caption the label must 
precede a section header)
WARNING: Found 2/299 unused rules:
library/venv,,:param,:param context: The information for the environment 
creation request
tutorial/venv,,:c7b9645a6f35,Python 3.4.3+ (3.4:c7b9645a6f35+, May 22 2015, 
09:31:25)
. . .
Suspicious check complete; look for any errors in the above output or in 
build/suspicious/suspicious.csv.  If all issues are false positives, append 
that file to tools/susp-ignored.csv.

Looks like Doc/tools/susp-ignored.csv and the whatsnew files need adjusting.

--
nosy: +martin.panter
status: closed -> open

___
Python tracker 

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



[issue14977] mailcap does not respect precedence in the presence of wildcards

2016-07-10 Thread Michael Lazar

Michael Lazar added the comment:

Hello. In my opinion this is a pretty major deficiency. I was trying to add 
definitions to my ~/.mailcap file (which should take priority over system 
mailcap files) but they weren't getting applied because of the wildcard bug. 
This was prohibiting me from using mailcap, so I wrote a patch and submitted it 
to PyPI. I've never contributed before; what would be the first step towards 
submitting this to python?

https://github.com/michael-lazar/mailcap_fix
https://pypi.python.org/pypi/mailcap-fix/0.1.0

--
nosy: +michael-lazar

___
Python tracker 

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



[issue26988] Add AutoNumberedEnum to stdlib

2016-07-10 Thread Ethan Furman

Ethan Furman added the comment:

Yeah, I think the public interface will just be the AutoEnum and AutoNameEnum 
style.

---

> Will these features go into enum34?

Not sure.  At this point I have the stdlib enum, enum34 enum, and aenum enum.

In terms of capability, aenum is the most advanced, followed by the stdlib 
enum, and finally enum34 (really the only difference between stdlib and enum34 
is the automatic definition order).

The only advantage of enum34 over aenum is if it works in enum34 it will 
definitely work in the stdlib, whilst aenum has features not in the stdlib 
(speaking from a user point of view).

So I haven't decided, but at this moment I'm not excited about the prospect.
:(

What I'll probably do is put enum34 in bug-fix only mode.

--

___
Python tracker 

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



[issue27477] IDLE: Switch dialogs to ttk widgets.

2016-07-10 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 91fe65e3d7bb by Terry Jan Reedy in branch 'default':
Issue #27477: Convert IDLE search dialogs to using ttk widgets.
https://hg.python.org/cpython/rev/91fe65e3d7bb

--
nosy: +python-dev

___
Python tracker 

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



[issue27477] IDLE: Switch dialogs to ttk widgets.

2016-07-10 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
keywords: +patch
Added file: http://bugs.python.org/file43680/ttk-search.diff

___
Python tracker 

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



[issue25652] collections.UserString.__rmod__() raises NameError

2016-07-10 Thread Jonathan Goble

Jonathan Goble added the comment:

Code analysis, if it can even be called that. I was simply looking through the 
source of the collections module one day out of curiosity (mainly to see how 
various things in it were implemented) and this bug jumped out at me as I was 
reading the code. I do not have a use case for the __rmod__() method.

--

___
Python tracker 

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



[issue25652] collections.UserString.__rmod__() raises NameError

2016-07-10 Thread Martin Panter

Martin Panter added the comment:

Jonathon: Do you have a use case for __rmod__(), or did you find this bug by 
code analysis?

UserString.__rmod__() was added as part of Issue 22189. The main reason seems 
to be so that UserString has all the methods listed by dir(str). The result was 
that UserString.__rmod__() is documented as existing since 3.5.

Ideally I would agree with removing UserString.__rmod__(), but perhaps it would 
be safer to just have it return NotImplemented. As long as UserString properly 
supports all combinations of user_string_a % (user_string_b, user_string_c) 
etc, whether or how __rmod__() is implemented is an implementation detail. The 
existance of str.__rmod__() does not seem to be documented. It just seems to be 
a side-effect of how the C-level nb_remainder slot works.

For Serhiy’s F class, which explicitly only works with a single str argument, I 
think it is reasonable that using UserString instead would raise TypeError. 
This is what Python 2’s UserString does.

--
nosy: +martin.panter

___
Python tracker 

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



[issue27469] Unicode filename gets crippled on Windows when drag and drop

2016-07-10 Thread Eryk Sun

Eryk Sun added the comment:

The WSH drop handler was added to resolve issue 1656675. It was chosen because 
it supports long filenames. OTOH, the EXE drop handler probably uses short 
filenames because the command line is limited to 32,768 characters. (Actually, 
it only uses the short name for a path element if it's longer than 12 
characters or contains whitespace, which was why my example still had non-ASCII 
"Ā" in the filename.)

If Python.File switches to the EXE drop handler, then I think PySys_SetArgv 
should automatically expand short filenames. A command-line option could be 
added to disable automatic expansion. It would be nice to implement this change 
in 2.7 as well since the WSH drop handler has been used since 2.6. 

The alternative is to distribute a DLL with the launcher that implements the 
IPersistFile and IDropTarget interfaces [1], with support for both long 
filenames and Unicode. It has to be a shell extension, so AFAIK it can't be 
hosted in a local server process, if that's what Steve meant by embedding it in 
py.exe.

[1]: https://msdn.microsoft.com/en-us/library/cc144165

--

___
Python tracker 

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



[issue26988] Add AutoNumberedEnum to stdlib

2016-07-10 Thread John Hagen

John Hagen added the comment:

To me, class Color(AutoEnum) and class Color(AutoEnum, IntEnum) is a little 
more straightforward.  It makes usage of AutoEnum similar to IntEnum, and I 
would expect it to be at least as popular as it.

A enum-related side question, since the plan is for this to go into the stdlib, 
would it also go into enum34 since that is the official back port of the stdlib 
Enum?

--

___
Python tracker 

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



[issue27078] Make f'' strings faster than .format: BUILD_STRING opcode?

2016-07-10 Thread Eric V. Smith

Eric V. Smith added the comment:

> And the expected performance for optimal `f'X is {x}'` code would 
> be *faster* than `"'X is %s' % (x,)"` which still needs to 
> interpret the string at runtime, and build a proper tuple object 
> on stack.

That's not necessarily true. The f-string version still needs to invoke the 
.format() method on the object, instead of only working for a handful of 
hard-coded types.

I'm not saying there aren't optimization opportunities, but it may be that 
%-formatting is always faster.

--

___
Python tracker 

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



[issue27078] Make f'' strings faster than .format: BUILD_STRING opcode?

2016-07-10 Thread Antti Haapala

Antti Haapala added the comment:

And the expected performance for optimal `f'X is {x}'` code would be *faster* 
than `"'X is %s' % (x,)"` which still needs to interpret the string at runtime, 
and build a proper tuple object on stack.

--

___
Python tracker 

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



[issue27173] Modern Unix key bindings for IDLE

2016-07-10 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 792e3294b59e by Terry Jan Reedy in branch 'default':
Issue #27173: Fix error in test_config that caused test_idle to fail.
https://hg.python.org/cpython/rev/792e3294b59e

--

___
Python tracker 

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



[issue27392] Add a server_side keyword parameter to create_connection

2016-07-10 Thread Guido van Rossum

Guido van Rossum added the comment:

How about we use connect_socket() or a variant on that name? That feels similar 
to connect_{read,write}_pipe(), which also take a protocol_factory and an 
already-opened I/O object.

If it's only for server-side sockets I'd call it connect_server_side_socket() 
-- I don't care that the name is long, the use case is not that common. Or we 
could have connect_socket() with a server_side flag and a server_hostname 
argument, and refactor some things so that it shares most of its implementation 
with _create_connection_transport().

--

___
Python tracker 

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



[issue26020] set_display evaluation order doesn't match documented behaviour

2016-07-10 Thread Raymond Hettinger

Raymond Hettinger added the comment:

I've got it.

--

___
Python tracker 

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



[issue27477] IDLE: Switch dialogs to ttk widgets.

2016-07-10 Thread Terry J. Reedy

New submission from Terry J. Reedy:

Scrollbars and the new query module now use ttk widgets.  Time to convert the 
other dialogs.

Changing imports is straightforward.

Use of an option that can only be changed in the style may be harder.  There 
was one instance of this among the scrollbars (converted in #24750) and I just 
skipped the minor tweak, and let the scrollbar in question look like all the 
rest.

The most difficult issue is changes in allowed methods.  For instance, the 
state of tk checkbuttons and radiobuttons can be controlled by either setting a 
control variable or by calling methods.  For ttk, the methods are gone. 

First are the search dialog modules: searchbase, search, replace, and grep.  
The tk-only 'anchor' option is used but has no effect since the 'width' option 
is not used to allocate extra space for the buttons.  The tk-only select method 
is used, but at least in searchbase, it has no effect, as it always sets the 
button to the state it already had.  Its use in test files, however, has to be 
replaced, not deleted.

IDLE does not control the common dialogs.  But we could choose to replace them, 
 I would not do that for the os file dialogs, but already replaced the 'ask' 
messagebox used for Open Module for behavioral reasons (#27380).

--
messages: 270131
nosy: terry.reedy
priority: normal
severity: normal
stage: needs patch
status: open
title: IDLE: Switch dialogs to ttk widgets.
type: enhancement
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



[issue27476] Introduce a .github folder with PULL_REQUEST_TEMPLATE

2016-07-10 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 40e2dd4f7612 by Senthil Kumaran in branch 'default':
issue27476 - Introduce a .github template to discourage github pull requests
https://hg.python.org/cpython/rev/40e2dd4f7612

--
nosy: +python-dev

___
Python tracker 

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



[issue27476] Introduce a .github folder with PULL_REQUEST_TEMPLATE

2016-07-10 Thread Senthil Kumaran

Senthil Kumaran added the comment:

Thanks. Addressed the review comments. Committing this.

--
Added file: http://bugs.python.org/file43679/issue27476-v2.patch

___
Python tracker 

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



[issue27476] Introduce a .github folder with PULL_REQUEST_TEMPLATE

2016-07-10 Thread Brett Cannon

Brett Cannon added the comment:

Review is done and only two comments for minor tweaks.

--
nosy: +brett.cannon
stage:  -> commit review

___
Python tracker 

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



[issue27473] bytes_concat seems to check overflow using undefined behaviour

2016-07-10 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Here is a patch for 2.7. It fixes also concatenation and repetition of str and 
unicode.

--
stage: commit review -> patch review
Added file: 
http://bugs.python.org/file43678/concat_and_repeat_overflow_check-2.7.patch

___
Python tracker 

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



[issue27476] Introduce a .github folder with PULL_REQUEST_TEMPLATE

2016-07-10 Thread Senthil Kumaran

Senthil Kumaran added the comment:

Here is the patch.

--
keywords: +patch
Added file: http://bugs.python.org/file43677/issue2476.patch

___
Python tracker 

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



[issue27476] Introduce a .github folder with PULL_REQUEST_TEMPLATE

2016-07-10 Thread Senthil Kumaran

Senthil Kumaran added the comment:

Context: https://mail.python.org/pipermail/core-workflow/2016-July/000616.html
https://github.com/python/cpython/pull/41

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



[issue27476] Introduce a .github folder with PULL_REQUEST_TEMPLATE

2016-07-10 Thread Senthil Kumaran

New submission from Senthil Kumaran:

PULL_REQUEST_TEMPLATE will discourage pull requests in github repo and will 
instead point to python hg repo and dev guide. This will be removed after the 
hg to git migration is complete.

--
assignee: orsenthil
messages: 270124
nosy: orsenthil
priority: normal
severity: normal
status: open
title: Introduce a .github folder with PULL_REQUEST_TEMPLATE
type: behavior

___
Python tracker 

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



[issue27473] bytes_concat seems to check overflow using undefined behaviour

2016-07-10 Thread Roundup Robot

Roundup Robot added the comment:

New changeset dac248056b20 by Serhiy Storchaka in branch '3.5':
Issue #27473: Fixed possible integer overflow in bytes and bytearray
https://hg.python.org/cpython/rev/dac248056b20

New changeset de8f0e9196d8 by Serhiy Storchaka in branch 'default':
Issue #27473: Fixed possible integer overflow in bytes and bytearray
https://hg.python.org/cpython/rev/de8f0e9196d8

--
nosy: +python-dev

___
Python tracker 

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



[issue27172] Undeprecate inspect.getfullargspec()

2016-07-10 Thread R. David Murray

R. David Murray added the comment:

Also, this is now a documentation issue, though it does require a code change 
for the getargspec deprecation message.

--
assignee: yselivanov -> 
components: +Documentation -Library (Lib)
keywords:  -patch
type: enhancement -> behavior

___
Python tracker 

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



[issue27172] Undeprecate inspect.getfullargspec()

2016-07-10 Thread R. David Murray

R. David Murray added the comment:

The existing patch no longer addresses the revised decision about the API (or 
the new title of the issue).  So, we need a new patch.

--
nosy: +r.david.murray
stage: commit review -> needs patch

___
Python tracker 

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



[issue27475] define_macros uses incorrect parameter for msvc compilers

2016-07-10 Thread Eryk Sun

Eryk Sun added the comment:

Did you try it? Using -D works fine for me, as it should [1]:

Options are specified by either a forward slash (/) or 
a dash (–). If an option takes an argument, the option's 
description documents whether a space is allowed between 
the option and the arguments.

[1]: https://msdn.microsoft.com/en-us/library/610ecb4h.aspx

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



[issue22758] Regression in Python 3.2 cookie parsing

2016-07-10 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 1c07bd735282 by R David Murray in branch '3.3':
#22758 null merge
https://hg.python.org/cpython/rev/1c07bd735282

New changeset 5b712993dce5 by R David Murray in branch '3.4':
#22758 null merge
https://hg.python.org/cpython/rev/5b712993dce5

New changeset 26342c9e8c1d by R David Murray in branch '3.5':
#22758 null merge
https://hg.python.org/cpython/rev/26342c9e8c1d

New changeset ce140ed0a56c by R David Murray in branch 'default':
#22758 null merge
https://hg.python.org/cpython/rev/ce140ed0a56c

--

___
Python tracker 

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



[issue27274] [ctypes] Allow from_pointer creation

2016-07-10 Thread Memeplex

Memeplex added the comment:

As usual, thank you for the detailed and informative answer, Eryk. I think I 
understand your points but I decided to do it the way I did it because:

1. I sometimes need the array itself. For example, some of my clases contains 
or inherits from a ctypes structure with pointers (to an array of memory). 
Usually I name these pointers with a leading underscore and expose them as 
properties returning ctypes arrays.

2. For pickling/unpickling ctypes arrays provide a convenient middle-point 
between bytes objects and ctypes pointers. Getting a bytes object from an array 
is as easy as calling bytes() on it. OTOH, the array can be directly assigned 
to a compatible pointer structure field.

3. While the overloaded c_array(ptr, size)/c_array(type, bytes) is not the most 
efficient api to get bytes from a pointer and viceversa, it's very simple for 
the range of uses cases (1 and 2) it covers. Nevertheless, I have benchmarked 
the perfomance and it's not that terrible.

--

___
Python tracker 

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



[issue26988] Add AutoNumberedEnum to stdlib

2016-07-10 Thread Barry A. Warsaw

Barry A. Warsaw added the comment:

On Jul 10, 2016, at 05:42 PM, Ethan Furman wrote:

>class Color(Enum, settings=AutoNumber):
[...]
>class Color(Enum, settings=AutoName):

I guess `settings` would take an AutoType enum.  But that can't also be
autonumbered or it would be autos all the way down. :)

--

___
Python tracker 

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



[issue22758] Regression in Python 3.2 cookie parsing

2016-07-10 Thread R. David Murray

R. David Murray added the comment:

Oops.  I guess there's no commit hook after all.

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

___
Python tracker 

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



[issue26176] EmailMessage example doesn't work

2016-07-10 Thread R. David Murray

R. David Murray added the comment:

Thanks, Nathan.

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

___
Python tracker 

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



[issue22758] Regression in Python 3.2 cookie parsing

2016-07-10 Thread Roundup Robot

Roundup Robot added the comment:

New changeset d22fadc18d01 by R David Murray in branch '3.2':
#22758: fix regression in handling of secure cookies.
https://hg.python.org/cpython/rev/d22fadc18d01

--
nosy: +python-dev

___
Python tracker 

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



[issue26176] EmailMessage example doesn't work

2016-07-10 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 1530fd9a7089 by R David Murray in branch '3.5':
#26176: fix usage of Address constructor in email examples.
https://hg.python.org/cpython/rev/1530fd9a7089

New changeset a9c11fecd83b by R David Murray in branch 'default':
Merge: #26176: fix usage of Address constructor in email examples.
https://hg.python.org/cpython/rev/a9c11fecd83b

--
nosy: +python-dev

___
Python tracker 

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



[issue16611] Cookie.py does not parse httponly or secure cookie flags

2016-07-10 Thread Roundup Robot

Roundup Robot added the comment:

New changeset d22fadc18d01 by R David Murray in branch '3.2':
#22758: fix regression in handling of secure cookies.
https://hg.python.org/cpython/rev/d22fadc18d01

--

___
Python tracker 

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



[issue26020] set_display evaluation order doesn't match documented behaviour

2016-07-10 Thread R. David Murray

R. David Murray added the comment:

Ping.  (Raymond, if you are OK with someone else committing this, you could 
un-assign it.)

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



[issue23591] Add IntFlags

2016-07-10 Thread Ethan Furman

Ethan Furman added the comment:

I don't think I'll have this in before the next alpha (today? tomorrow?) but 
I'll get it merged in the next couple weeks (need to do some integration work 
with the other Enum enhancements).

--

___
Python tracker 

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



[issue22758] Regression in Python 3.2 cookie parsing

2016-07-10 Thread R. David Murray

R. David Murray added the comment:

My understanding is that there is a commit hook that prevents pushing to the 
3.2 branch, so that Georg needs to do this.  I've applied the patch and run the 
tests myself, and agree that it passes (as in, none of the test failures I see 
are related to cookies).  This isn't set to release blocker...should it be (ie: 
since this is the last release do we want to make sure it gets in)?

--
resolution: wont fix -> 

___
Python tracker 

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



[issue26988] Add AutoNumberedEnum to stdlib

2016-07-10 Thread Ethan Furman

Ethan Furman added the comment:

I like AutoEnum.

Another auto-related thought:  one of the more common Enum questions on 
StackOverflow is how to automatically have the value be the stringified version 
of the name:

class Huh(Enum):
  this
  that
  those

Huh.this.name == Huh.this.value
# True

So the question then becomes: is there a way to easily support both auto-number 
and auto-string values?

While I don't have the auto-string feature yet in aenum, the system I am using 
to specify optional settings looks like this:

--
class Color(Enum, settings=AutoNumber):
  red
  ...
--

--
class Color(IntEnum, settings=AutoNumber):
  red
  ...
--

--
class Color(Enum, settings=AutoName):
  red
  ...
--


The other option, of course, is to just stick with the prebuilt method of doing 
things:

class Color(AutoEnum):
  ...

class Color(AutoEnum, IntEnum):
  ...

class Color(AutoNameEnum):
  ...

--

___
Python tracker 

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



[issue27173] Modern Unix key bindings for IDLE

2016-07-10 Thread Roundup Robot

Roundup Robot added the comment:

New changeset e6e6c71776b0 by Terry Jan Reedy in branch 'default':
Issue #27173: Add 'IDLE Modern Unix' to the built-in key sets.
https://hg.python.org/cpython/rev/e6e6c71776b0

--
nosy: +python-dev

___
Python tracker 

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



[issue25652] collections.UserString.__rmod__() raises NameError

2016-07-10 Thread R. David Murray

R. David Murray added the comment:

This was set to commit review when Raymond was ready to commit it, but 
subsequent discussion indicates the patch isn't yet ready for commit.  In 
particular, there ought to be some tests, even if the decision is to remove 
__rmod__.

The fact that UserString passes its tests with this buggy method indicates that 
there is a lack somewhere in the general string tests that test_userstring 
relies on.

--
nosy: +r.david.murray
stage: commit review -> needs patch

___
Python tracker 

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



[issue18858] dummy_threading lacks threading.get_ident() equivalent

2016-07-10 Thread R. David Murray

R. David Murray added the comment:

A forgotten issue marked commit review.  I guess we aren't checking the commit 
review queue very carefully; I certainly haven't been :(.

This patch adds a test but does not fix the bug.  The assert should have a 
message parameter like the existing use of it in the test suite.  Lines should 
be wrapped at 80...the lack of wrapping in the original import has already been 
corrected.  Finally, the test seems more appropriate in test_dummythreading 
than test_threading.

--
nosy: +r.david.murray
stage: commit review -> needs patch

___
Python tracker 

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



[issue20674] Update comments in dictobject.c

2016-07-10 Thread R. David Murray

Changes by R. David Murray :


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



[issue20647] 3.4 cherry-pick: d50a95fab002 add tracemalloc.Traceback.format() method

2016-07-10 Thread R. David Murray

R. David Murray added the comment:

Drat.  Typoed the message number, this commit is for #20674.

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



[issue20674] Update comments in dictobject.c

2016-07-10 Thread R. David Murray

R. David Murray added the comment:

Oops, wrong number in the commit message.  Thanks for the patch, Jaysinh. 

New changeset 74109d87283f by R David Murray in branch '3.5':
#20647: Update dictobject.c comments to account for randomized string hashes.
https://hg.python.org/cpython/rev/74109d87283f

New changeset 31cdf23da19d by R David Murray in branch 'default':
Merge: #20647: Update dictobject.c comments to account for randomized string 
hashes.

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



[issue27475] define_macros uses incorrect parameter for msvc compilers

2016-07-10 Thread Szabolcs Dombi

New submission from Szabolcs Dombi:

define_macros will generate parameters like -D
msvc compilers expect /D and ignore -D

link:
https://msdn.microsoft.com/en-us/library/hhzbb5c8.aspx

--
components: Windows
messages: 270102
nosy: Szabolcs Dombi, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: define_macros uses incorrect parameter for msvc compilers
versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4, Python 3.5, Python 3.6

___
Python tracker 

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



[issue20647] 3.4 cherry-pick: d50a95fab002 add tracemalloc.Traceback.format() method

2016-07-10 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 74109d87283f by R David Murray in branch '3.5':
#20647: Update dictobject.c comments to account for randomized string hashes.
https://hg.python.org/cpython/rev/74109d87283f

New changeset 31cdf23da19d by R David Murray in branch 'default':
Merge: #20647: Update dictobject.c comments to account for randomized string 
hashes.
https://hg.python.org/cpython/rev/31cdf23da19d

--
nosy: +python-dev

___
Python tracker 

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



[issue27472] add the 'unix_shell' attribute to test.support

2016-07-10 Thread Xavier de Gaye

Xavier de Gaye added the comment:

Yes, issue 27027 adds test.support.is_android and there is no need now to wait 
for issue 16353. Thanks David for reminding me, I have just added a 
cross-reference to issue 16353.

--

___
Python tracker 

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



[issue16353] add function to os module for getting path to default shell

2016-07-10 Thread Xavier de Gaye

Xavier de Gaye added the comment:

Issue 27472 adds test.support.unix_shell as the path to the default shell.

--

___
Python tracker 

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



[issue27027] add the 'is_android' attribute to test.support

2016-07-10 Thread Xavier de Gaye

Changes by Xavier de Gaye :


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



[issue27027] add the 'is_android' attribute to test.support

2016-07-10 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 41dfd92f48f0 by Xavier de Gaye in branch 'default':
Issue #27027: Added test.support.is_android that is True when this is an
https://hg.python.org/cpython/rev/41dfd92f48f0

--
nosy: +python-dev

___
Python tracker 

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



[issue27427] Add new math module tests

2016-07-10 Thread Jeff Allen

Jeff Allen added the comment:

It would be nice to see this considered alongside #26040.

--
nosy: +jeff.allen

___
Python tracker 

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



[issue27078] Make f'' strings faster than .format: BUILD_STRING opcode?

2016-07-10 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

For comparison:

$ ./python -m timeit -s "x = 2" -- "f'X is {x}'"
100 loops, best of 3: 1.04 usec per loop

$ ./python -m timeit -s "x = 2; j = ''.join" -- "j(['X is ', f'{x}'])"
100 loops, best of 3: 0.93 usec per loop

$ ./python -m timeit -s "x = 2" -- "'X is {}'.format(x)"
100 loops, best of 3: 0.808 usec per loop

$ ./python -m timeit -s "x = 2; f = 'X is {}'.format" -- "f(x)"
100 loops, best of 3: 0.748 usec per loop

$ ./python -m timeit -s "x = 2" -- "'X is %s' % (x,)"
100 loops, best of 3: 0.467 usec per loop

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue27473] bytes_concat seems to check overflow using undefined behaviour

2016-07-10 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

LGTM.

--
assignee:  -> serhiy.storchaka
stage: needs patch -> commit review

___
Python tracker 

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



[issue27078] Make f'' strings faster than .format: BUILD_STRING opcode?

2016-07-10 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
nosy: +Demur Rumed

___
Python tracker 

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



[issue27473] bytes_concat seems to check overflow using undefined behaviour

2016-07-10 Thread Xiang Zhang

Xiang Zhang added the comment:

Sorry. v3 now includes iconcat.

--
Added file: 
http://bugs.python.org/file43676/bytes_concat_overflow_check_v3.patch

___
Python tracker 

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



[issue27472] add the 'unix_shell' attribute to test.support

2016-07-10 Thread R. David Murray

R. David Murray added the comment:

I think a cross reference to issue 16353 is worth making here :)  I presume 
your intent with this issue is to avoid having to wait for that issue to get 
resolved.

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



[issue27473] bytes_concat seems to check overflow using undefined behaviour

2016-07-10 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

And bytearray_iconcat() please.

--

___
Python tracker 

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



[issue27466] [Copy from github user macartur] time2netscape missing comma

2016-07-10 Thread Senthil Kumaran

Senthil Kumaran added the comment:

This is fixed in all versions of python. Thanks for the review.

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



[issue27466] [Copy from github user macartur] time2netscape missing comma

2016-07-10 Thread Roundup Robot

Roundup Robot added the comment:

New changeset c613d8885054 by Senthil Kumaran in branch '2.7':
[port to 2.7] - Issue #27466: Change time format returned by
https://hg.python.org/cpython/rev/c613d8885054

--

___
Python tracker 

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



[issue26544] platform.libc_ver() returns incorrect version number

2016-07-10 Thread Nathaniel Smith

Nathaniel Smith added the comment:

> The purpose of the function was to determine the minimum libc compatibility 
> requirements of the executable.

For what it's worth, I didn't know this, the pip authors obviously didn't know 
this, and after rereading the docs just now I still can't quite tell that this 
was intended. I'm not sure why one would want these semantics either, but at a 
minimum it would help to document the intended semantics much more clearly.

> parsing needs to be kept around as fallback solution

The point of the data I attached was that AFAICT there don't exist any 
currently-in-use, non-glibc systems where "parsing" returns a meaningful result.

--

___
Python tracker 

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



[issue26988] Add AutoNumberedEnum to stdlib

2016-07-10 Thread John Hagen

John Hagen added the comment:

Some ideas for the new stdlib class:

BasicEnum - This helps emphasize that it is a simpler version of Enum that 
doesn't support all of the Enum features (like assigning values). It also helps 
communicate that if you don't need values this is a better fit.

AutoEnum - This new version (compared with AutoNumberEnum in the docs) does 
more than just auto number, since it does even the value assignment. Auto helps 
communicate that this is automatically creating much of the class internals for 
you.

--

___
Python tracker 

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



[issue27473] bytes_concat seems to check overflow using undefined behaviour

2016-07-10 Thread Xiang Zhang

Xiang Zhang added the comment:

Of course. I forgot to check bytearray. :(

The new patch now also includes bytearray.

--
Added file: 
http://bugs.python.org/file43675/bytes_concat_overflow_check_v2.patch

___
Python tracker 

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



[issue27466] [Copy from github user macartur] time2netscape missing comma

2016-07-10 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 3356d7c57750 by Senthil Kumaran in branch '3.5':
Issue #27466: Change time format returned by http.cookie.time2netscape,
https://hg.python.org/cpython/rev/3356d7c57750

New changeset 324ade62c0f0 by Senthil Kumaran in branch 'default':
[merge from 3.5] - Issue #27466: Change time format returned by
https://hg.python.org/cpython/rev/324ade62c0f0

--
nosy: +python-dev

___
Python tracker 

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



[issue27027] add the 'is_android' attribute to test.support

2016-07-10 Thread STINNER Victor

STINNER Victor added the comment:

LGTM. Go ahead.

--
nosy: +haypo

___
Python tracker 

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



[issue1621] Do not assume signed integer overflow behavior

2016-07-10 Thread Antti Haapala

Antti Haapala added the comment:

One common case where signed integer overflow has been assumed has been the 
wraparound/overflow checks like in http://bugs.python.org/issue27473 

I propose that such commonly erroneous tasks such as overflow checks be 
implemented as common macros in CPython as getting them right is not quite easy 
(http://c-faq.com/misc/sd26.html); it would also make the C code more 
self-documenting.

Thus instead of writing

 if (va.len > PY_SSIZE_T_MAX - vb.len) {
  
one would write something like

if (PY_SSIZE_T_SUM_OVERFLOWS(va.len, vb.len)) {

and the mere fact that such a macro *wasn't* used there would signal about 
possible problems with the comparison.

--
nosy: +ztane

___
Python tracker 

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



[issue27078] Make f'' strings faster than .format: BUILD_STRING opcode?

2016-07-10 Thread Antti Haapala

Antti Haapala added the comment:

I am not an expert on writing new opcodes to CPython (having never done it, 
don't know where to change the disassembler and such, how to make compiler 
generate them properly and such), but I'd be glad to help with testing, timing 
and writing the possible joiner algorithm for it, to help it make into Python 
3.6.

--

___
Python tracker 

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



[issue27473] bytes_concat seems to check overflow using undefined behaviour

2016-07-10 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Xiang Zhang, could you please write a patch for bytearray too?

--
stage: commit review -> needs patch

___
Python tracker 

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



[issue27473] bytes_concat seems to check overflow using undefined behaviour

2016-07-10 Thread Xiang Zhang

Xiang Zhang added the comment:

Yes, the current code is valid with -fwrapv. But I am not sure if every 
compiler supports this feature. So maybe we can't totally rely on it. And in 
issue1621, some efforts seem to have worked to factor these out.

--

___
Python tracker 

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



[issue26544] platform.libc_ver() returns incorrect version number

2016-07-10 Thread Marc-Andre Lemburg

Marc-Andre Lemburg added the comment:

At the time the code was written, libc and glibc were in wide spread use, so 
it's not surprising that it doesn't work well for other C libs.

Note that the routine returns the highest libc version number used and required 
by the executable (usually the Python interpreter). This does not necessarily 
correspond to the version installed on the system. The purpose of the function 
was to determine the minimum libc compatibility requirements of the executable.

The routine you quote uses ctypes and only works for glibc, so parsing needs to 
be kept around as fallback solution. It also returns the libc version that is 
currently used on the system; not necessarily the minimum version required, so 
semantics are different.

--

___
Python tracker 

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



[issue27473] bytes_concat seems to check overflow using undefined behaviour

2016-07-10 Thread Antti Haapala

Antti Haapala added the comment:

The previous code was perfectly fine with `-fwrapv` since it makes signed 
overflow behaviour defined. And afaik BDFLs stance is that signed integer 
overflow should be defined to wrap anyhow.



In my opinion the `-fwrapv` itself makes one proliferate all these insane 
wrap-checks; indeed I'd rather have them defined in a macro, something like

if (PYSSIZE_OVERFLOWS_ON_ADD(va.len, vb.len)) {
PyErr_NoMemory();
goto done;
}

size = va.len + vb.len;

even though `-fwrapv` is defined; that way it'd be obvious what is supposed to 
happen there.

--
nosy: +ztane

___
Python tracker 

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



[issue27235] Heap overflow occurred due to the int overflow (Python-2.7.11/Modules/posixmodule.c)

2016-07-10 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
stage:  -> test needed
status: open -> pending

___
Python tracker 

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



[issue27474] Unify exception in _Py_bytes_contains for integers

2016-07-10 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
components: +Interpreter Core
resolution:  -> fixed
stage: commit review -> resolved
status: open -> closed

___
Python tracker 

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



[issue27474] Unify exception in _Py_bytes_contains for integers

2016-07-10 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 93ab72de7431 by Serhiy Storchaka in branch 'default':
Issue #27474: Unified error messages in the __contains__ method of bytes and
https://hg.python.org/cpython/rev/93ab72de7431

--
nosy: +python-dev

___
Python tracker 

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



[issue20767] Some python extensions can't be compiled with clang 3.4

2016-07-10 Thread Berker Peksag

Changes by Berker Peksag :


--
components:  -Installation, Interpreter Core, Library (Lib), Tests
type: performance -> compile error
versions:  -Python 3.3, Python 3.4

___
Python tracker 

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



[issue23285] PEP 475 - EINTR handling

2016-07-10 Thread Berker Peksag

Changes by Berker Peksag :


Removed file: http://bugs.python.org/file43674/b3b439d7dd40.diff

___
Python tracker 

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



[issue20767] Some python extensions can't be compiled with clang 3.4

2016-07-10 Thread Stefan Krah

Stefan Krah added the comment:

Strange, why can anyone edit the classification? It happens a lot lately.

--

___
Python tracker 

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



[issue27473] bytes_concat seems to check overflow using undefined behaviour

2016-07-10 Thread Martin Panter

Martin Panter added the comment:

I changed the versions without checking first. Long story short: 
Objects/stringobject.c (Python 2 equivalent of Objects/bytesobject.c) is 
already fixed, but in all versions, Objects/bytearrayobject.c is apparently 
unfixed.

Python 2 was fixed as part of r65335. Python 3 was supposed to be fixed in 
r66009 (Issue 3627), but it looks like some of the fixes were missed.

--

___
Python tracker 

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



[issue1621] Do not assume signed integer overflow behavior

2016-07-10 Thread Martin Panter

Changes by Martin Panter :


--
dependencies: +bytes_concat seems to check overflow using undefined behaviour

___
Python tracker 

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



[issue27473] bytes_concat seems to check overflow using undefined behaviour

2016-07-10 Thread Martin Panter

Martin Panter added the comment:

The patch looks correct to me.

Issue 1621 is open about the general problem of overflows.

--
nosy: +martin.panter
stage: needs patch -> commit review
versions: +Python 2.7, Python 3.5

___
Python tracker 

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



  1   2   >