[issue24097] Use after free in PyObject_GetState

2015-11-25 Thread Roundup Robot

Roundup Robot added the comment:

New changeset eed36e19f8b8 by Serhiy Storchaka in branch '3.4':
Issue #24097: Fixed crash in object.__reduce__() if slot name is freed inside
https://hg.python.org/cpython/rev/eed36e19f8b8

New changeset 99839a1c9c6d by Serhiy Storchaka in branch '3.5':
Issue #24097: Fixed crash in object.__reduce__() if slot name is freed inside
https://hg.python.org/cpython/rev/99839a1c9c6d

New changeset 502465d22522 by Serhiy Storchaka in branch 'default':
Issue #24097: Fixed crash in object.__reduce__() if slot name is freed inside
https://hg.python.org/cpython/rev/502465d22522

New changeset 4a201d0d4d1e by Serhiy Storchaka in branch '2.7':
Issue #24097: Fixed crash in object.__reduce__() if slot name is freed inside
https://hg.python.org/cpython/rev/4a201d0d4d1e

--
nosy: +python-dev

___
Python tracker 

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



[issue6953] readline documenation needs work

2015-11-25 Thread Hideaki Takahashi

Changes by Hideaki Takahashi :


--
nosy: +hideaki_t

___
Python tracker 

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



[issue20923] ConfigParser should nested [] in section names.

2015-11-25 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Victor, I reopened this a a doc issue to add the sentence that would have cut 
short the discussion.  Please leave it.

--
resolution: fixed -> 
status: closed -> open

___
Python tracker 

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



[issue25729] update pure python datetime.timedelta creation

2015-11-25 Thread Brian Kearns

Brian Kearns added the comment:

Bug fixes are to the test suite itself, and the name cleanup, minor. Best 
classified as enhancement, apply where applicable.

--

___
Python tracker 

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



[issue6953] readline documentation needs work

2015-11-25 Thread Mark Lawrence

Changes by Mark Lawrence :


--
title: readline documenation needs work -> readline documentation needs work

___
Python tracker 

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



[issue20923] ConfigParser should nested [] in section names.

2015-11-25 Thread Terry J. Reedy

Changes by Terry J. Reedy :


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

___
Python tracker 

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



[issue24097] Use after free in PyObject_GetState

2015-11-25 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



[issue20923] Explain ConfigParser 'valid section name' and .SECTCRE

2015-11-25 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
title: ConfigParser should nested [] in section names. -> Explain ConfigParser 
'valid section name' and .SECTCRE

___
Python tracker 

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



[issue25638] Verify the etree_parse and etree_iterparse benchmarks are working appropriately

2015-11-25 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Updated to tip.

--
Added file: http://bugs.python.org/file41167/etree_iterparse_2.patch

___
Python tracker 

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



[issue19687] Fixes for elementtree integer overflow

2015-11-25 Thread Roundup Robot

Roundup Robot added the comment:

New changeset e5eac1d692ad by Serhiy Storchaka in branch '3.4':
Issue #19687: Fixed possible integer overflows in ElementTree.
https://hg.python.org/cpython/rev/e5eac1d692ad

New changeset 745fd5550bc0 by Serhiy Storchaka in branch '2.7':
Issue #19687: Fixed possible integer overflows in ElementTree.
https://hg.python.org/cpython/rev/745fd5550bc0

--

___
Python tracker 

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



[issue19687] Fixes for elementtree integer overflow

2015-11-25 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Possible integer overflows in 3.5 was already fixed by issue23450.

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +Python 2.7

___
Python tracker 

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



[issue25677] Syntax error caret confused by indentation

2015-11-25 Thread R. David Murray

R. David Murray added the comment:

Two options on portability, I think: either use splitlines() on the decoded 
result, or add a 'universal_newlines' keyword argument to assert_python_failure 
and friends that would get passed to Popen.  I'd favor the latter, as other 
users of script_helpers may find it useful.  On the other hand, that may 
involve a whole separate discussion, so you could use splitlines here and we 
could open a new issue for a script_helpers enhancement :)

Also, rather than a direct re, I'd use assertRegex.  That will give a more 
useful error message if the test fails.

--

___
Python tracker 

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



[issue25730] invisible sidebar content with code snippets

2015-11-25 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Hiroaki, please include a bit of text explanation.  What 'default.css' are you 
referring to?  If it is a Sphinx file and not in the CPython repository /Doc, 
then this should be closed here and reopened on the separate Sphinx tracker.

In any case, this is not a security issue for python code, and hence not for 
3.2, 3,3.  3.4 will be security patch only in a few weeks.

--
versions:  -Python 3.2, 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



[issue25729] update pure python datetime.timedelta creation

2015-11-25 Thread Brian Kearns

Brian Kearns added the comment:

Updated again

--
Added file: http://bugs.python.org/file41165/timedelta3.patch

___
Python tracker 

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



[issue21224] BaseHTTPRequestHandler, update the protocol version to http 1.1 by default?

2015-11-25 Thread STINNER Victor

STINNER Victor added the comment:

Sorry, I read the issue very quickly. I don't understand why the
default is not changed.

--

___
Python tracker 

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



[issue25715] Python 3.5.1 installer shows wrong upgrade path

2015-11-25 Thread Steve Dower

Steve Dower added the comment:

Man, dealing with the launcher is hard. But I've got it about as good as I can:

* when installing 3.5.1 over 3.5.0, user has the option to update/not update 
the launcher (no option to uninstall at that time)
* after installing 3.5.1, launcher can be added via Modify, but not removed - 
the checkbox is now disabled with this change
* with 3.5.1, the launcher has its own entry in Programs and Features (from a 
different bug)
* uninstalling 3.5.1 does not automatically uninstall the launcher

This patch updates the help text in the installer to better explain what's 
going on, and now gets the "requires admin" icon correct.

Larry - this change is fully contained to the installer and (along with the 
original part of the issue above) should avoid a lot of confusion once we 
release. Can I have it in 3.5.1? I'm happy to rebase and push directly to your 
repo.

--
Added file: http://bugs.python.org/file41166/25715_2.patch

___
Python tracker 

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



[issue25696] "make -j9 install" fails because bininstall target requires the libainstall target

2015-11-25 Thread Martin Panter

Martin Panter added the comment:

$(LIBPC) is a single directory name, so I suggest dropping the “for” loop.

Patch 2 should avoid the practical race condition. But there is technically 
still a race with “libainstall” and “bininstall” both testing and creating the 
same directory. Maybe we should factor it out, something like:

$(DESTDIR)$(LIBPC):
@echo "Creating directory $@"
@$(INSTALL) -d -m $(DIRMODE) $@
. . .
bininstall: altbininstall $(DESTDIR)$(LIBPC)
. . .
libainstall: all python-config $(DESTDIR)$(LIBPC)
@for i in $(LIBDIR) $(LIBPL); \
. . .

Looking at the history, the test-then-install code comes from 20 years ago: 
. I would say calling 
install unconditionally (without a test or echo message) might be simpler, but 
that’s probably getting out of scope here.

--
nosy: +martin.panter
stage:  -> patch review

___
Python tracker 

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



[issue22100] Use $HOSTPYTHON when determining candidate interpreter for $PYTHON_FOR_BUILD.

2015-11-25 Thread Martin Panter

Martin Panter added the comment:

What is $HOSTPYTHON? It does not appear to be used or mentioned anywhere. You 
mention it as if it is commonly known, but if you are proposing a new 
configuration variable, perhaps you should document it.

The Gnu version of “which” seems to work fine with relative paths, though I 
know it is not a standardized command. Can you explain what your problem with 
relative paths is? Maybe we can find a cleaner way to check if a command 
exists, e.g. use “command -v”.

$ which ./python && echo Success
/media/disk/home/proj/python/cpython/python
Success

Can you explain the problem with PYTHONPATH and the —S addition? If we really 
need it, a comment would be good. What is the difference between your 
$HOSTPYTHON case and the original python3 etc cases, where it is not needed?

Also, did you test your patch? Your —S argument uses a UTF-8 em dash, which 
would be interpreted as a script file name, rather than an ASCII dash for the 
-S option.

--
nosy: +martin.panter

___
Python tracker 

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



[issue25622] Enable ctypes.test.test_values.Win_ValuesTestCase for non-Windows

2015-11-25 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 6a8fbb97c8d8 by Martin Panter in branch 'default':
Issue #25622: Rename to PythonValuesTestCase and enable for non-Windows
https://hg.python.org/cpython/rev/6a8fbb97c8d8

--
nosy: +python-dev

___
Python tracker 

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



[issue25677] Syntax error caret confused by indentation

2015-11-25 Thread Martin Panter

Martin Panter added the comment:

Another way to get universal newlines I have used in other cases is to use 
TextIOWrapper. It might be easier if you really need that multi-line RE search:

text = TextIOWrapper(BytesIO(stderr), "ascii").read()

--
nosy: +martin.panter

___
Python tracker 

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



[issue14044] IncompleteRead error with urllib2 or urllib.request -- fine with urllib, wget, or curl

2015-11-25 Thread Martin Panter

Martin Panter added the comment:

Closing this as being a bug in the web server, rather than Python.

If someone wants to add a way to force a HTTP 1.0 response, or a way to get all 
valid data before raising the exception, I suggest opening a new report.

--
resolution:  -> third party
status: open -> closed

___
Python tracker 

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



[issue21224] BaseHTTPRequestHandler, update the protocol version to http 1.1 by default?

2015-11-25 Thread Martin Panter

Martin Panter added the comment:

Changing it could break existing code written for the HTTP 1.0 behaviour. The 
main effect mentioned at 

 is that in HTTP 1.0 mode, a server may send a response without Content-Length, 
because its connection will be automatically shut down when it is done. In HTTP 
1.1 mode, the server code has to manually set close_connection = True (or 
indicate the end of the response some other way).

Looking at the source code, changing protocol_version to "HTTP/1.1":

* Allows close_connection to be False by default (causing the problem above)
* Enables Expect: 100-continue handling (no problem)
* Changes the version actually used in the HTTP protocol (probably acceptable 
if everything else keeps working with a HTTP 1.1 client)
* Affects the SERVER_PROTOCOL variable for CGI scripts (unsure of the 
consequences)

Perhaps one way forward would be to use HTTP 1.1 by default, but still set 
close_connection = True. But then someone may come along and say Python should 
support persistent connections by default! It does not seem worth enabling HTTP 
1.1 with non-persistent connections as the default.

--

___
Python tracker 

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



[issue25677] Syntax error caret confused by indentation

2015-11-25 Thread Michael Layzell

Michael Layzell added the comment:

Sorry for the delay, I finally got around to adding a test.

I'm mildly concerned about the portability of the check, but it seems to work 
locally. If people have suggestions about how to make the check more portable, 
let me know!

--
Added file: http://bugs.python.org/file41163/cpython25677.patch

___
Python tracker 

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



[issue25735] math.factorial doc should mention integer return type

2015-11-25 Thread John Yeung

New submission from John Yeung:

The math module docs state

Except when explicitly noted otherwise, all return values are floats.

But math.factorial isn't what I would call explicit about returning int:

math.factorial(x)
Return x factorial. Raises ValueError if x is not integral or is negative.

At minimum, shouldn't the first sentence be "Return x factorial as an int."? I 
haven't tested on all Python versions, but math.factorial on 2.7 and 3.2 
definitely return int (or long in Python 2 when necessary).

--
assignee: docs@python
components: Documentation
messages: 255382
nosy: John.Yeung, docs@python
priority: normal
severity: normal
status: open
title: math.factorial doc should mention integer return type
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



[issue25729] update pure python datetime.timedelta creation

2015-11-25 Thread Brian Kearns

Brian Kearns added the comment:

Updated patch per review

--
Added file: http://bugs.python.org/file41164/timedelta2.patch

___
Python tracker 

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



[issue20923] Explain ConfigParser 'valid section name' and .SECTCRE

2015-11-25 Thread R. David Murray

R. David Murray added the comment:

Yes, the doc issue is separate from the other bug, since that one will apply 
only to 3.6, and the doc changes apply to all maintenance releases.

--

___
Python tracker 

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



[issue25723] ConfigParser should never write broken configurations

2015-11-25 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Newline (\n) and possibly \x00, if it necessarily causes an actual problem, are 
the only characters that we might reject by default.  Rejecting anything else 
is unwarrented editorializing about what people 'should' use.  As you said, 
people who want something stricter can replace .add_section.  (This would be 
most useful in a group or corporate setting which might, for instance, want to 
severely limit the character set allowed.)

In particular, I showed in #20923 how to replace .SECTCRE to make 
"[Test[2]_foo]" yield "Test[2]_foo".  The OP for that issue filed it after 
seeing an application that used such section names and they are not at all 
unreasonable. Python should be able to continue writing .ini files for that 
application as well as any others.

Victor, your point that even a minimal change could break working code is a 
good one.  It suggests to me that we should maybe do nothing.  This issue is 
motivated by a theoretical principle "User input should always be validated" 
that is not a Python design principle (what is valid, who decides), not by 
actual problems in the field.

--

___
Python tracker 

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



[issue25723] ConfigParser should never write broken configurations

2015-11-25 Thread SpaceOne

SpaceOne added the comment:

Isn't is an actual problem in the field? We had a vulnerability in our code due 
to this as we only sanitized the config values and didn't recognized that 
add_section() does no validation of input.

--

___
Python tracker 

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



[issue25729] update pure python datetime.timedelta creation

2015-11-25 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Looks you are missed Victor's and my comments.

--

___
Python tracker 

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



[issue25730] invisible sidebar content with code snippets

2015-11-25 Thread hiroaki itoh

hiroaki itoh added the comment:

Ah, sorry I'd mistaked.

I don't know if this is Sphinx issue, but CPython repo has Doc/tools/static, 
Doc/tools/templates, so I still think, this can be fixed by customizing these, 
for example overriding style at layout.html.

--

___
Python tracker 

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



[issue25723] ConfigParser should never write broken configurations

2015-11-25 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Can you explain how passing \n createda vulnerability (to who, doing what) that 
flagging \n would prevent?  Your opening example (nicely presented, by the way) 
shows that passing \n allows one to do with one call what would otherwise take 
(in the case of the example) three calls. But the result is identical, so the 
shortcut seems harmless.

--

___
Python tracker 

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



[issue25300] Enable Intel MPX (Memory protection Extensions) feature

2015-11-25 Thread Stefan Krah

Stefan Krah added the comment:

> Py_ssize_t ob_array[1] Py_VARIABLE_SIZE;   /* Looks weird and confusing */

Yes, I dislike that, too.  The question is why gcc has supported
the "struct hack" for more than 20 years but needs an annotation
just for MPX.

Is the annotation also needed for the C99 version (ob_array[])?


Which brings me again to the topic that the MPX support needs to
stabilize in gcc. ;)

--

___
Python tracker 

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



[issue25730] invisible sidebar content with code snippets

2015-11-25 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Can you create either a specific patch or perhaps more important a test that 
fails now but should pass with a proper patch?

--
stage: needs patch -> test needed

___
Python tracker 

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



[issue25730] invisible sidebar content with code snippets

2015-11-25 Thread R. David Murray

R. David Murray added the comment:

Since it is a visual issue and we have no infrastructure for that kind of web 
view testing, I don't think a test is possible.

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



[issue25251] Unknown MS Compiler version 1900

2015-11-25 Thread Ateik Al-Zehla

Ateik Al-Zehla added the comment:

forget to tell you that even i deleted the cache, but nothing happened. it use 
the old code.

--

___
Python tracker 

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



[issue25723] ConfigParser should never write broken configurations

2015-11-25 Thread R. David Murray

R. David Murray added the comment:

The issue would be if the section name came from user input.  Then an attacker 
could craft a section name that would result in inserting arbitrary names and 
values into the config file.

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



[issue21224] BaseHTTPRequestHandler, update the protocol version to http 1.1 by default?

2015-11-25 Thread Martin Panter

Martin Panter added the comment:

Victor, that chunked support for server requests is optional, and not actually 
required (my quote was wrong; see my message after the one you quoted).

The client already does HTTP 1.1 by default:
>>> http.client.HTTPConnection._http_vsn_str
'HTTP/1.1'

It is already possible to make a working HTTP 1.1 server by setting 
protocol_version. What things do you think would make the HTTP 1.1 server 
implementation more complete?

--

___
Python tracker 

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



[issue25251] Unknown MS Compiler version 1900

2015-11-25 Thread Ateik Al-Zehla

Ateik Al-Zehla added the comment:

thanks Matt for your replay. But I copied the lines to cygwinccompiler.py and 
it didn't work. and it pretend as there is no change happened to the file. 

To see if the execution goes through the code I changed message if raise 
ValueError to "God Help Me %s " instead of  "Unknown MS Compiler version %s "

I saved the file, and it looks fine in the Editor.
but when I executed the command: pip install Numpy. It return the old error 
Message "Unknown MS Compiler version 1900"

I'm tired. I spend three days to solve this issue but without success.
plz help

--

___
Python tracker 

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



[issue25731] Assigning and deleting __new__ attr on the class does not allow to create instances of this class

2015-11-25 Thread Eryk Sun

Eryk Sun added the comment:

For "del X.__new__", type_setattro in Objects/typeobject.c indirectly calls 
update_one_slot. This finds object.__new__ fom the base object class when it 
looks up __new__ on the type. Since __new__ for built-in types is special-cased 
to be a built-in method instead of a slot wrapper, update_one_slot takes the 
branch for "Py_TYPE(descr) == _Type", which assigns the existing 
tp_new to "specific". In this case that's slot_tp_new instead of object_new due 
to the previous assignment of the "new" function to X.__new__.  

slot_tp_new looks up and calls __new__, which in this case, as noted above, is 
object.__new__. This built-in method calls tp_new_wrapper, which calls the 
wrapped tp_new function. In this case that's object_new. If the type's tp_init 
is object_init (i.e. not overridden) or tp_new is not object_new (i.e. 
overridden), then object_new raises a TypeError when called with arguments. The 
problem in this case is that __new__ isn't overridden anymore. 

It seems to me that update_one_slot needs to install the tp_new that 
tp_new_wrapper would call, e.g. 

specific = (void *)(
 (PyTypeObject *)PyCFunction_GET_SELF(descr))->tp_new;

In this case that's object_new. Thus after "del X.__new__", X would be restored 
as if __new__ was never overridden.

--
nosy: +eryksun
versions: +Python 2.7, Python 3.4, Python 3.6

___
Python tracker 

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



[issue25698] test regressions introduced with the fix for #22995

2015-11-25 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



[issue25736] smtplib can't send 8bit encoded utf-8 message

2015-11-25 Thread Ervin Hegedüs

Changes by Ervin Hegedüs :


--
nosy: airween
priority: normal
severity: normal
status: open
title: smtplib can't send 8bit encoded utf-8 message
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



[issue25736] smtplib can't send 8bit encoded utf-8 message

2015-11-25 Thread Ervin Hegedüs

New submission from Ervin Hegedüs:

Looks like smtplib can send only messages, which contains only 7bit (ascii) 
characters. Here is the example:

# -*- coding: utf8 -*-

import time
import smtplib

mailfrom = "m...@mydomain.com"
rcptto = "m...@otherdomain.com"

msg = """%s
From: Me <%s>
To: %s
Subject: Plain text e-mail
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: 8bit

happy New Year

Ευτυχισμένο το Νέο Έτος

明けましておめでとうございます

с Новым годом
""" % (time.strftime('%a, %d %b %Y %H:%M:%S +0100', time.localtime()), 
mailfrom, rcptto)

server = smtplib.SMTP('localhost')
server.sendmail(mailfrom, rcptto, msg)
server.quit()


With Python2 (Python 2.7), this script finished succesfully. With Python3 
(Python 3.4), I've got this execption:

Traceback (most recent call last):
  File "8bittest.py", line 28, in 
server.sendmail(mailfrom, rcptto, msg)
  File "/usr/lib/python3.4/smtplib.py", line 765, in sendmail
msg = _fix_eols(msg).encode('ascii')
UnicodeEncodeError: 'ascii' codec can't encode characters in position 261-271: 
ordinal not in range(128)


Basicly, I don't understand, why smtplib allows only ascii encoded messages in 
Python 3. That worked (and works) in Python 2, and I think, that's the correct 
behavior.

--

___
Python tracker 

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



[issue25731] Assigning and deleting __new__ attr on the class does not allow to create instances of this class

2015-11-25 Thread Uosiu

New submission from Stanisław Skonieczny (Uosiu):

When moving from python 2.7 to 3.5 I have found a problem with patching __new__ 
method on the class. It was done this way:
'''
patch('foo.bar.MyClass.__new__', return_value=mocked_instance)
'''
In works with python 2.7, but in 3.5 it fails with:
'''
TypeError: object() takes no parameters
'''

I have created minimal scenario that ilustrates this bug cause:
'''
class X:
def __init__(self, a):
pass


def new(cls, a):
pass


X(1)
X.__new__ = new
X(1)
del X.__new__
X(1)
'''
Setting __new__ attribute and then deleting it has some side effect.

--
components: Interpreter Core
files: new_patch_fails.py
messages: 255337
nosy: Stanisław Skonieczny (Uosiu)
priority: normal
severity: normal
status: open
title: Assigning and deleting __new__ attr on the class does not allow to 
create instances of this class
type: behavior
versions: Python 3.5
Added file: http://bugs.python.org/file41161/new_patch_fails.py

___
Python tracker 

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



[issue25730] invisible sidebar content with code snippets

2015-11-25 Thread Ezio Melotti

Changes by Ezio Melotti :


--
assignee:  -> docs@python
components: +Documentation
nosy: +docs@python, ezio.melotti, georg.brandl, terry.reedy
stage:  -> needs patch
type:  -> behavior

___
Python tracker 

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



[issue25718] itertools.accumulate __reduce__/__setstate__ bug

2015-11-25 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

In this case yes, you are unlucky. But this is an artificial example, and I 
don't think this happens in any real code.

However specific meaning of None should be documented (there are other wrong 
words about __getstate__).

--

___
Python tracker 

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



[issue25705] Fix regex_compile benchmark crash

2015-11-25 Thread Florin Papa

Florin Papa added the comment:

No problem. Thank you for fixing this.

--

___
Python tracker 

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



[issue25732] functools.total_ordering does not correctly implement not equal behaviour

2015-11-25 Thread David Seddon

New submission from David Seddon:

The documentation for functools.total_ordering states that rich comparison can 
be enabled on a class by specifying an __eq__ method, and one of __lt__(), 
__le__(), __gt__(), or __ge__().  If these instructions are followed, this 
results in an incorrect evaluation of the not equal operator:

Here's an example:

from functools import total_ordering

@total_ordering
class Value(object):

def __init__(self, value):
self.value = value

def __eq__(self, other):
return self.value == other.value

def __lt__(self, other):
return self.value < other.value

 
>>> a = Value(3)
>>> b = Value(3)
>>> a == b
True
>>> a != b
True

I've tested this on 2.7.10.
 
Either the documentation or the behaviour should be corrected.

https://docs.python.org/2/library/functools.html#functools.total_ordering

--
messages: 255339
nosy: David Seddon
priority: normal
severity: normal
status: open
title: functools.total_ordering does not correctly implement not equal behaviour
type: behavior
versions: Python 2.7

___
Python tracker 

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



[issue25572] _ssl doesn't build on OSX 10.11

2015-11-25 Thread STINNER Victor

STINNER Victor added the comment:

> Homebrew supports OpenSSL and LibreSSL, but OpenSSL is in 
> /usr/local/opt/openssl and not in /usr/local/ssl (see setup.py)

Does it make sense to add a configure option to specify the path to OpenSSL?

> So, the next point, I am not sure, but the headers of OpenSSL has not 
> provided with OSX 10.11

Is it possible or not to get headers of the OpenSSL system library?

--
nosy: +haypo

___
Python tracker 

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



[issue25725] Memory leak on unpickling bogus data

2015-11-25 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



[issue25725] Memory leak on unpickling bogus data

2015-11-25 Thread Roundup Robot

Roundup Robot added the comment:

New changeset c85eca74f3a5 by Serhiy Storchaka in branch '3.4':
Issue #25725: Fixed a reference leak in pickle.loads() when unpickling
https://hg.python.org/cpython/rev/c85eca74f3a5

New changeset 88ad2b8480b1 by Serhiy Storchaka in branch '3.5':
Issue #25725: Fixed a reference leak in pickle.loads() when unpickling
https://hg.python.org/cpython/rev/88ad2b8480b1

New changeset 935debb548a3 by Serhiy Storchaka in branch 'default':
Issue #25725: Fixed a reference leak in pickle.loads() when unpickling
https://hg.python.org/cpython/rev/935debb548a3

New changeset 9a4db1ac5e10 by Serhiy Storchaka in branch '2.7':
Issue #25725: Fixed a reference leak in cPickle.loads() when unpickling
https://hg.python.org/cpython/rev/9a4db1ac5e10

--
nosy: +python-dev

___
Python tracker 

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



[issue25721] Fix pybench always_display error

2015-11-25 Thread Florin Papa

Florin Papa added the comment:

Yes, thank you for fixing this.

--

___
Python tracker 

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



[issue21224] BaseHTTPRequestHandler, update the protocol version to http 1.1 by default?

2015-11-25 Thread STINNER Victor

STINNER Victor added the comment:

For HTTP 2, I consider that the protocol is too young. I prefer to move fast on 
a library hosted on PyPI, rather than puting something is the stable and 
"frozen" stdlib.

--
nosy: +haypo

___
Python tracker 

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



[issue7990] xml.etree.cElementTree lacks full dir() on Element

2015-11-25 Thread Roundup Robot

Roundup Robot added the comment:

New changeset fef7f041c1a7 by Serhiy Storchaka in branch 'default':
Issue #7990: dir() on ElementTree.Element now lists properties: "tag",
https://hg.python.org/cpython/rev/fef7f041c1a7

--
nosy: +python-dev

___
Python tracker 

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



[issue21224] BaseHTTPRequestHandler, update the protocol version to http 1.1 by default?

2015-11-25 Thread STINNER Victor

STINNER Victor added the comment:

> Similarly, I understand HTTP 1.1 requires chunked encoding support for 
> requests, but there is no support for that in the Python implementation.

Hum, I don't understand exactly this issue. I understood that Python only has a 
"partial" implementation of the HTTP 1.1 protocol for the server side, and 
maybe even for the client side.

Because of that, I don't think that it's good idea to switch to HTTP 1.1 by 
default. We have to implement missing features server and client side before.

--

___
Python tracker 

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



[issue25721] Fix pybench always_display error

2015-11-25 Thread STINNER Victor

Changes by STINNER Victor :


--
resolution:  -> fixed
status: open -> closed

___
Python tracker 

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



[issue25733] Idle does not handle non-standard compile errors

2015-11-25 Thread ppperry

New submission from ppperry:

The following code:
for a in range(26):
  for b in range(26):
   for c in range(26):
for d in range(26):
 for e in range(26):
  for f in range(26):
   for g in range(26):
for h in range(26):
 for i in range(26):
  for j in range(26):
   for k in range(26):
for l in range(26):
 for m in range(26):
  for o in range(26):
   for p in range(26):
for q in range(26):
 for r in range(26):
  for s in range(26):
   for t in range(26):
for u in range(26):
 for v in range(26):
   for w in range(26):
 pass

fails to compile with `SystemError: too many statically nested blocks` when 
typed in the standard interpreter.

When typed in an IDLE shell , pressing enter will not try to run the code, 
instead printing the SystemError to the console from which idle was started, 
instead of to the IDLE shell, which would be expected.

--
components: IDLE, Interpreter Core
messages: 255358
nosy: ppperry
priority: normal
severity: normal
status: open
title: Idle does not handle non-standard compile errors
versions: Python 2.7

___
Python tracker 

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



[issue25703] test_sys is failed if standard stream is redirected in 2.7

2015-11-25 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



[issue25703] test_sys is failed if standard stream is redirected in 2.7

2015-11-25 Thread Roundup Robot

Roundup Robot added the comment:

New changeset eb9d2e5bc8dc by Serhiy Storchaka in branch '2.7':
Issue #25703: Skip test_43581 if one of stdout or stderr is redirected.
https://hg.python.org/cpython/rev/eb9d2e5bc8dc

--
nosy: +python-dev

___
Python tracker 

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



[issue25728] email parser ignores inner multipart boundary when outer message duplicates it

2015-11-25 Thread R. David Murray

R. David Murray added the comment:

I am open to (and will review) a patch that applies simple heuristics to trying 
to guess correctly about such messages, but only if it doesn't add too much 
complexity to the parser.  I'm not certain I would consider it for a bug fix 
release, but I'll postpone that decision until I review the patch (the issue 
is: would it have the potential to break applications that are currently 
working?  I'm guessing not, but I tend to be cautious about such issues.)

--
stage:  -> needs patch
versions: +Python 3.5, Python 3.6 -Python 3.4

___
Python tracker 

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



[issue25733] Idle does not handle non-standard compile errors

2015-11-25 Thread ppperry

Changes by ppperry :


--
type:  -> behavior

___
Python tracker 

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



[issue25696] "MAKEFLAGS=-j9 make install" fails because bininstall target requires the libainstall target

2015-11-25 Thread STINNER Victor

STINNER Victor added the comment:

To be clear: the bug doesn't occur when Python is not installed "in parallel" 
(without MAKEFLAGS=-j9).

"For consistency with other things, I would suggest to add the following at the 
beginning of bininstall target (instead of making bininstall target depend on 
libainstall target):"

Ok. Does my new patch look better?

Should I apply my fix to Python 2.7, 3.4, 3.5 and default (3.6)?

--
title: "make install" fails because bininstall target requires the libainstall 
target -> "MAKEFLAGS=-j9 make install" fails because bininstall target requires 
the libainstall target
Added file: http://bugs.python.org/file41162/bininstall-2.patch

___
Python tracker 

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



[issue25696] "make -j9 install" fails because bininstall target requires the libainstall target

2015-11-25 Thread STINNER Victor

Changes by STINNER Victor :


--
title: "MAKEFLAGS=-j9 make install" fails because bininstall target requires 
the libainstall target -> "make -j9 install" fails because bininstall target 
requires the libainstall target

___
Python tracker 

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



[issue25723] ConfigParser should never write broken configurations

2015-11-25 Thread Terry J. Reedy

Terry J. Reedy added the comment:

We all know that blindly inserting external data into a database can be a bad 
idea.  But raising ValueError if the data contains \n barely scratches the 
surface of a real defense.  The external data should be checked before passing 
it to .add_section or as part of a derived method in a subclass.  I already 
suggested the possibility of allowing only a restricted set of letter 
characters.  Such a check comes after defending against the possibility of 
someone submitting 'a'*100 as, in this case, a section name.

configparser is permissive by design, not by accident.  The un-abbreviated 
verbose re for ConfigParser.SECTCRE say so.
  (?P[^]]+) # very permissive!

--

___
Python tracker 

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