[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



[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



[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



[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



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



[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



[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



[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



[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



[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



[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



[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



[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



[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



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

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



[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



[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



[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



[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



[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



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



[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



[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



[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



[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



[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



[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) == &PyCFunction_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



[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



[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



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



[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



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



[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



[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



[issue25719] Deprecate spitfire benchmark

2015-11-25 Thread Brett Cannon

Brett Cannon added the comment:

I don't object and I'm on vacation without my laptop so I won't beat you to 
committing it.

--

___
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 Ronald Oussoren

Ronald Oussoren added the comment:

Apple no longer ships headers for OpenSSL in OSX SDK as shipped with Xcode 7.1, 
and I'd be surprised if that changes (without having any inside knowledge about 
this).

W.r.t. adding configure option for OpenSSL: That would be fine although that 
makes the detection of openssl even more convoluted that it currently is: 
there's also a search list in setup.py.   In the long run its probably better 
to move all library detection code to configure. See also Issue8406, Issue7713 
and possibly more.

--

___
Python tracker 

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



[issue25616] Extract OrderedDict tests into separate file

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



[issue25616] Extract OrderedDict tests into separate file

2015-11-25 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 8d9a0540adf9 by Serhiy Storchaka in branch '3.4':
Issue #25616: Tests for OrderedDict are extracted from test_collections
https://hg.python.org/cpython/rev/8d9a0540adf9

New changeset 46e95e0eaae5 by Serhiy Storchaka in branch '3.5':
Issue #25616: Tests for OrderedDict are extracted from test_collections
https://hg.python.org/cpython/rev/46e95e0eaae5

New changeset 81fa901162f9 by Serhiy Storchaka in branch 'default':
Issue #25616: Tests for OrderedDict are extracted from test_collections
https://hg.python.org/cpython/rev/81fa901162f9

New changeset afaad8dc8edf by Serhiy Storchaka in branch '2.7':
Issue #25616: Tests for OrderedDict are extracted from test_collections
https://hg.python.org/cpython/rev/afaad8dc8edf

--
nosy: +python-dev

___
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 Chi Hsuan Yen

Changes by Chi Hsuan Yen :


--
nosy: +Chi Hsuan Yen

___
Python tracker 

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



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

2015-11-25 Thread Chi Hsuan Yen

Changes by Chi Hsuan Yen :


--
nosy: +Chi Hsuan Yen

___
Python tracker 

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



[issue25734] fnmatch regular expression can be improved

2015-11-25 Thread R. David Murray

R. David Murray added the comment:

That would be a backward incompatible behavior change.  The patterns are 
designed to be used on single filenames, not on newline separated filenames.

--
nosy: +r.david.murray
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



[issue16255] subrocess.Popen needs /bin/sh but Android only has /system/bin/sh

2015-11-25 Thread Chi Hsuan Yen

Changes by Chi Hsuan Yen :


--
nosy: +Chi Hsuan Yen

___
Python tracker 

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



[issue23496] Steps for Android Native Build of Python 3.4.2

2015-11-25 Thread Chi Hsuan Yen

Changes by Chi Hsuan Yen :


--
nosy: +Chi Hsuan Yen

___
Python tracker 

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



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

2015-11-25 Thread Emanuel Barry

Changes by Emanuel Barry :


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

___
Python tracker 

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



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

2015-11-25 Thread R. David Murray

Changes by R. David Murray :


--
assignee:  -> docs@python
components: +Documentation
nosy: +docs@python
stage:  -> needs patch

___
Python tracker 

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



[issue25734] fnmatch regular expression can be improved

2015-11-25 Thread Alberto Galera

New submission from Alberto Galera:

# https://hg.python.org/cpython/file/tip/Lib/fnmatch.py
fnmatch reviewing the code I've noticed that the outcome of the regular 
expression all returns generated in the first result

l97:
res = res + '.*'
to:
res = res + '.*?'

l100:
return res + '\Z(?ms)'
to:
return res + '$(?ms)'


example test:

import re
import fnmatch

urls = ['example/l1/l2/test3-1.py',
'example/l1/test2-1.py',
'example/l1/test2-2.py',
'example/l1/l2/l3/test4-1.py']

regex = fnmatch.translate('example/*')
# 'example\\/.*\\Z(?ms)'
re.findall(regex, "\n".join(urls))
# return 
['example/l1/l2/test3-1.py\nexample/l1/test2-1.py\nexample/l1/test2-2.py\nexample/l1/l2/l3/test4-1.py']

# suggested change 
re.findall('example\\/.*?$(?ms)', "\n".join(urls))
# return ['example/l1/l2/test3-1.py',
# 'example/l1/test2-1.py',
# 'example/l1/test2-2.py',
# 'example/l1/l2/l3/test4-1.py']

--
components: Library (Lib)
messages: 255361
nosy: Alberto Galera
priority: normal
severity: normal
status: open
title: fnmatch regular expression can be improved
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



[issue25723] ConfigParser should never write broken configurations

2015-11-25 Thread SpaceOne

SpaceOne added the comment:

I added also a rejection of '\r' and '\x00':
https://github.com/spaceone/cpython/commit/41d6e278e4ffa95577d843e0d50d4c43b5ac46ef

It's only my opinion but I would prefer to reject all of these non printable 
characters:
'\x00\x01\x02\x03\x04\x05\x06\x07\x08\t\n\x0b\x0c\r\x0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f[]\x7f'

But as the _parse currently detects them as valid and your opinion is probably 
a very different one I will not add these characters.

--

___
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



[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



[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



[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



[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



[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



[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



[issue25643] Python tokenizer rewriting

2015-11-25 Thread STINNER Victor

STINNER Victor added the comment:

"especially for issues with null byte"

I don't think that we should put to much energy in handling correctly NUL 
bytes. I see NUL bytes in code as bugs in the code, not in the Python parser. 
We *might* try to give warnings or better error messages to the user, that's 
all.

--
nosy: +haypo

___
Python tracker 

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



[issue25697] Fix rough alphabetical order in Misc/ACKS

2015-11-25 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Thank you for your review Martin.

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
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



[issue25697] Fix rough alphabetical order in Misc/ACKS

2015-11-25 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 68c7c6ac82d9 by Serhiy Storchaka in branch '3.4':
Issue #25697: Fixed rough alphabetical order in Misc/ACKS.
https://hg.python.org/cpython/rev/68c7c6ac82d9

New changeset 9925fb41c1d9 by Serhiy Storchaka in branch '3.5':
Issue #25697: Fixed rough alphabetical order in Misc/ACKS.
https://hg.python.org/cpython/rev/9925fb41c1d9

New changeset e61a864b703c by Serhiy Storchaka in branch 'default':
Issue #25697: Fixed rough alphabetical order in Misc/ACKS.
https://hg.python.org/cpython/rev/e61a864b703c

New changeset 8bdf8e7dd085 by Serhiy Storchaka in branch '2.7':
Issue #25697: Fixed rough alphabetical order in Misc/ACKS.
https://hg.python.org/cpython/rev/8bdf8e7dd085

--
nosy: +python-dev

___
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 Serhiy Storchaka

Changes by Serhiy Storchaka :


--
components: +Library (Lib)
nosy: +ncoghlan, rhettinger

___
Python tracker 

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



[issue24731] Incorrect assert in str_subtype_new

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



[issue25717] tempfile.TemporaryFile fails when dir option set to directory residing on host OS mount

2015-11-25 Thread Hans Lawrenz

Hans Lawrenz added the comment:

Martin, I applied your patch and it proved your hypothesis. See below for how I 
tested. I also updated the github repo for others to reproduce if they wish.


cd
wget https://www.python.org/ftp/python/3.5.0/Python-3.5.0.tar.xz

mkdir ~/dist
cd ~/dist
tar xJf ~/Python-3.5.0.tar.xz
cd Python-3.5.0
./configure --prefix=/home/vagrant/py35/dist && \
make && make install

mkdir ~/patch
cd ~/patch
tar xJf ~/Python-3.5.0.tar.xz
cd Python-3.5.0
patch -p1 < /vagrant/fstat-failure.patch
./configure --prefix=/home/vagrant/py35/patch && \
make && make install



vagrant@vagrant-ubuntu-trusty-64:~$ ./py35/dist/bin/python3.5 
/vagrant/temptest.py 
Path 1: worked
Path 2: ERROR
vagrant@vagrant-ubuntu-trusty-64:~$ ./py35/patch/bin/python3.5 
/vagrant/temptest.py 
Path 1: worked
Path 2: worked

--

___
Python tracker 

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



[issue24731] Incorrect assert in str_subtype_new

2015-11-25 Thread Roundup Robot

Roundup Robot added the comment:

New changeset d8e0b54ece62 by Serhiy Storchaka in branch '3.4':
Issue #24731: Fixed crash on converting objects with special methods
https://hg.python.org/cpython/rev/d8e0b54ece62

New changeset 80efe5cc8934 by Serhiy Storchaka in branch '3.5':
Issue #24731: Fixed crash on converting objects with special methods
https://hg.python.org/cpython/rev/80efe5cc8934

New changeset 1c4d256cc370 by Serhiy Storchaka in branch 'default':
Issue #24731: Fixed crash on converting objects with special methods
https://hg.python.org/cpython/rev/1c4d256cc370

New changeset 37158c067b25 by Serhiy Storchaka in branch '2.7':
Issue #24731: Fixed crash on converting objects with special methods
https://hg.python.org/cpython/rev/37158c067b25

--
nosy: +python-dev

___
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 Emanuel Barry

Emanuel Barry added the comment:

This is due to the fact that Python 3 added the ability to define only __eq__ 
and get a free __ne__ defined. If my memory serves me right, 
functools.total_ordering was added in 3.2 and then backported to 2.x - where 
the relationship with __eq__ and __ne__ is not present. total_ordering doesn't 
do anything to touch __ne__ as it expects Python itself to do so (which it 
doesn't in 2.x).

--
nosy: +ebarry

___
Python tracker 

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



[issue25683] __context__ for yields inside except clause

2015-11-25 Thread Emanuel Barry

Emanuel Barry added the comment:

Oops, that was *completely* the wrong issue. I apologize for the noise.

--

___
Python tracker 

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



[issue25683] __context__ for yields inside except clause

2015-11-25 Thread Emanuel Barry

Emanuel Barry added the comment:

This is due to the fact that Python 3 added the ability to define only __eq__ 
and get a free __ne__ defined. If my memory serves me right, 
functools.total_ordering was added in 3.2 and then backported to 2.x - where 
the relationship with __eq__ and __ne__ is not present. total_ordering doesn't 
do anything to touch __ne__ as it expects Python itself to do so (which it 
doesn't in 2.x).

--
nosy: +ebarry

___
Python tracker 

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



[issue21475] Support the Sitemap extension in robotparser

2015-11-25 Thread STINNER Victor

Changes by STINNER Victor :


--
dependencies: +Rewrite test_robotparser

___
Python tracker 

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



[issue25571] Improve the lltrace feature with the Py_Debug mode

2015-11-25 Thread STINNER Victor

STINNER Victor added the comment:

What is lltrace? I never used it :-( Is it documented? Can you give examples of 
output before/after?

We may make your change optional to give the choice of the output.

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

Serhiy Storchaka added the comment:

Thank you Martin. Committed with both your suggestions.

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



[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



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

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



[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



[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



[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



[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



[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



[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



[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



[issue25701] Document that tp_setattro and tp_setattr are used for deleting attributes

2015-11-25 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Python-Dev discussion:

http://comments.gmane.org/gmane.comp.python.devel/155474

--

___
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



[issue25730] invisible sidebar content with code snippets

2015-11-25 Thread hiroaki itoh

New submission from hiroaki itoh:

I think this is maybe known problem, but checking duplication of this issue is 
very hard because searching it with keyword 'sidebar' hit too many.

Please see details in 
https://bitbucket.org/hhsprings/nothing.but.only.for.some.kind.of.collabo/wiki/%5Bdocs.python.org%5D%20invisible%20sidebar%20content%20with%20code%20snippets
 .

I think, this can be fixed by inserting style overriding background to 
default.css.

--
messages: 255334
nosy: xwhhsprings
priority: normal
severity: normal
status: open
title: invisible sidebar content with code snippets
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



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

2015-11-25 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Le 25/11/2015 03:23, Raymond Hettinger a écrit :
> 
> I'm wary of making such extensive changes throughout the codebase
> for
> an optional processor-specific feature of limited benefit and unproven
> worth.

This is indeed non-trivial. What I'm willing to known is if it helps
detect unknown bugs and vulnerabilities in the code base (for example
when running the test suite or sample workloads).

The Py_VARIABLE_SIZE macro is trivial to understand, and is actually a
useful annotation to the code (a kind of executable documentation). The
BOUNDS macros are a bit more interesting, but their semantics look
simple if you don't want to think too much about the underlying HW
implementation :-)

--

___
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

STINNER Victor added the comment:

Is it ok for you Florin? (Can I close the issue?)

--

___
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 Roundup Robot

Roundup Robot added the comment:

New changeset e77ed7d18a68 by Victor Stinner in branch 'default':
Issue #25721: Fixes for pybench
https://hg.python.org/benchmarks/rev/e77ed7d18a68

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

STINNER Victor added the comment:

Thanks for your bug report.

I fixed the issue differently, by adding a base class to benchmark result 
classes. I also implemented the format output format for pybench.

By the way, perf.py badly handles errors :-/ CSV output and table output fail 
to handle errors.

pybench output with my change:
***
$ ./perf.py -f -r -b pybench python2.7 python2.7 
(...)

### pybench ###
Min: 285 -> 284: 1.00x faster
Avg: 289 -> 292: 1.01x slower


$ ./perf.py -f --csv=pybench.csv -r -b pybench python2.7 python2.7 
(...)

### pybench ###
Min: 283 -> 286: 1.01x slower
Avg: 287 -> 290: 1.01x slower


$ cat pybench.csv
Benchmark,Base,Changed
pybench,283.00,286.00


$ ./perf.py -f -O table -r -b pybench python2.7 python2.7 
(...)
+---+---+---+--+
| Benchmark | python2.7 | python2.7 | Change   |
+===+===+===+==+
| pybench   | 288.0 | 289.0 | 1.00x slower |
+---+---+---+--+
***

--
nosy: +haypo

___
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 Armin Rigo

Armin Rigo added the comment:

Ok, then with pickle you can have the same problem but only with 
None-vs-no-total.  Here is an artificial example:

import itertools, pickle

def foo(a, b):
print(a, b)

a = itertools.accumulate([3, 4, 5], foo)
next(a)
next(a)   # prints: 3, 4

b = pickle.loads(pickle.dumps(a))

next(a)   # prints: None, 5
next(b)   # foo() is not called at all

--

___
Python tracker 

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



[issue25712] Dead link in the PEP-3147

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



[issue25712] Dead link in the PEP-3147

2015-11-25 Thread Roundup Robot

Roundup Robot added the comment:

New changeset a34df6445747 by Victor Stinner in branch 'default':
Issue #25712: Fix link to the marshal doc in PEP 3147
https://hg.python.org/peps/rev/a34df6445747

--
nosy: +python-dev

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

Does the patch fixes any bugs? If no, it can be applied only to developed 
version. If yes, needed tests.

--
components: +Library (Lib)
nosy: +belopolsky, serhiy.storchaka
stage:  -> patch review
type:  -> enhancement
versions:  -Python 3.4, Python 3.5

___
Python tracker 

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



[issue25729] update pure python datetime.timedelta creation

2015-11-25 Thread Brian Kearns

Brian Kearns added the comment:

Correct patch uploaded

--
Added file: http://bugs.python.org/file41160/timedelta.patch

___
Python tracker 

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



  1   2   >