[issue23466] PEP 461: Inconsistency between str and bytes formatting of integers

2015-04-03 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Here is a patch that makes bytes formatting raise an OverflowError if integer 
argument of %c is out of range.

--
Added file: http://bugs.python.org/file38812/bytes_format_overflow.patch

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



[issue22643] Integer overflow in case_operation

2015-04-03 Thread STINNER Victor

STINNER Victor added the comment:

 self.assertRaises(OverflowError, (�*(2**32//12 + 1)).upper)
 MemoryError

Hum, even with the PEP 393, this string is still large: 682 MB.

$ python3
Python 3.4.1 (default, Nov  3 2014, 14:38:10) 
 sys.getsizeof(�*(2**32//12 + 1)) / 1024.**2
682.6667385101318

I guess that Serhiy suggests to put a @bigmemtest decorator on 
test_case_operation_overflow().

The test expects that large_string.upper() raises immediatly an OverflowError, 
so I understand that a new string is not created.

Hum, it's strange to have an OverflowError here. Integer overflow on memory 
allocation usually raises MemoryError, not OverflowError. It looks like 
unicodeobject.c is not consistent here.

--
resolution: fixed - 
status: closed - open

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



[issue22643] Integer overflow in case_operation

2015-04-03 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

http://buildbot.python.org/all/builders/PPC64%20AIX%203.x/builds/3466/steps/test/logs/stdio
==
ERROR: test_case_operation_overflow (test.test_unicode.UnicodeTest)
--
Traceback (most recent call last):
  File 
/home/shager/cpython-buildarea/3.x.edelsohn-aix-ppc64/build/Lib/test/test_unicode.py,
 line 852, in test_case_operation_overflow
self.assertRaises(OverflowError, (�*(2**32//12 + 1)).upper)
MemoryError

--

--

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



[issue23466] PEP 461: Inconsistency between str and bytes formatting of integers

2015-04-03 Thread STINNER Victor

STINNER Victor added the comment:

 b'%c' is still raising a TypeError.  The error message is fine (%c requires 
 an integer in range(256) or a single byte) but it should be an OverflowError 
 for backwards compatibility.

I don't understand why you care so much on the exact exception. It doesn't look 
right to me to rely on the *exact* exception raised by %c % arg. It's an 
obvious bug in the application.

Sometimes, you may want to be extra safe and catch exception while formating a 
message. The logging module does this. But the logging doesn't care of the 
exact exception, it uses a generic except Except: in StreamHandler.emit():

def emit(self, record):
try:
msg = self.format(record)
stream = self.stream
stream.write(msg)
stream.write(self.terminator)
self.flush()
except Exception:
self.handleError(record)

IMO b%c % int must raise ValueError, not OverflowError, if the value is not 
in the range 0..255.

--

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



[issue22351] NNTP constructor exception leaves socket for garbage collector

2015-04-03 Thread Roundup Robot

Roundup Robot added the comment:

New changeset c3e7a670dda2 by Victor Stinner in branch '3.4':
Issue #22351: Fix test_nntplib if the ssl module is missing
https://hg.python.org/cpython/rev/c3e7a670dda2

--

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



[issue22643] Integer overflow in case_operation

2015-04-03 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

It's strange to have � here. Should be ü.

--

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



[issue22351] NNTP constructor exception leaves socket for garbage collector

2015-04-03 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Good catch. But may be better to report MockSslTests as skipped instead of 
silently omit them.

--
Added file: http://bugs.python.org/file38814/issue22351_skip_MockSslTests.patch

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



[issue23857] [RFE] Make certificate verification optionable

2015-04-03 Thread Robert Kuska

Changes by Robert Kuska rku...@gmail.com:


--
nosy: +bkabrda

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



[issue22351] NNTP constructor exception leaves socket for garbage collector

2015-04-03 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

See the patch.

--

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



[issue23756] Tighten definition of bytes-like objects

2015-04-03 Thread Martin Panter

Martin Panter added the comment:

I’m sorry Stefan, I now realize my changes for len(view) were indeed wrong, and 
the original was much more correct. I still think the tobytes() and maybe 
tolist() documentation could be improved, but that is a separate issue to the 
bytes-like definition.

I am posting c-contig.v2.patch. Hopefully you will find it is truer to my 
original scope :)

* Removed changes to stdtypes.rst
* Scaled back changes in buffer.rst to only explain “C-contiguous”
* Tweaked glossary definition. Not all memoryview() objects are applicable.

David: The result of passing a Fortran array directly in a bytes-like context 
is typically BufferError. If this were relaxed, then we would get the 
inconsistency with tobytes().

 import _testbuffer, sys
 layout = [11, 21, 12, 22]
 fortran_array = _testbuffer.ndarray(layout, format=B, flags=0, shape=[2, 
 2], strides=[1, 2], offset=0)
 sys.stdout.buffer.write(fortran_array)
Traceback (most recent call last):
  File stdin, line 1, in module
BufferError: ndarray is not C-contiguous
 list(memoryview(fortran_array).tobytes())  # C-contiguous order!
[11, 12, 21, 22]

--
Added file: http://bugs.python.org/file38815/c-contig.v2.patch

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



[issue23853] PEP 475: handle EINTR in the ssl module

2015-04-03 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 753233baf27e by Victor Stinner in branch 'default':
Issue #23853: Cleanup _ssl.c
https://hg.python.org/cpython/rev/753233baf27e

--
nosy: +python-dev

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



[issue22117] Rewrite pytime.h to work on nanoseconds

2015-04-03 Thread Roundup Robot

Roundup Robot added the comment:

New changeset d976683671ba by Victor Stinner in branch 'default':
Issue #22117: Add a new _PyTime_FromSeconds() function
https://hg.python.org/cpython/rev/d976683671ba

--

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



[issue23834] socketmodule.c: add sock_call() to fix how the timeout is recomputed

2015-04-03 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 7a9c49885cd3 by Victor Stinner in branch 'default':
Issue #23834: Simplify timeout handling
https://hg.python.org/cpython/rev/7a9c49885cd3

--

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



[issue22643] Integer overflow in case_operation

2015-04-03 Thread STINNER Victor

STINNER Victor added the comment:

 It's strange to have � here. Should be ü.

Oh right, I saw � in the bug tracker and in the buildbot output. But
it's a web browser issue, if you download the raw buildbout output,
you will see ü. So the string takes less memory (1 byte per
character, not 2).

--

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



[issue23856] build.bat -e shouldn't also build

2015-04-03 Thread Tim Golden

New submission from Tim Golden:

PCBuild\build.bat takes an argument of -e to pull in external libraries. 

Either by accident or by design the main build will run in addition. However if 
you'd run pcbuild -e simply to pull in externals, you might not have specified 
extra build params, such as -d or -p x64.

The attached patch naively drops out after get_externals has been called; other 
possibilities might include carrying on if -e was not the only parameter.

--
components: Windows
files: build-externals.patch
keywords: patch
messages: 239957
nosy: steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
stage: patch review
status: open
title: build.bat -e shouldn't also build
type: behavior
versions: Python 3.5
Added file: http://bugs.python.org/file38813/build-externals.patch

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



[issue22351] NNTP constructor exception leaves socket for garbage collector

2015-04-03 Thread STINNER Victor

STINNER Victor added the comment:

 Serhiy’s patch looks like it should do the trick. Just get rid of the “self” 
 parameter to make it clearer,

+class MockSslTests(MockSocketTests):
+def nntp_class(self, *pos, **kw):

Hum, you should use the @staticmethod decorator here.

--

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



[issue22351] NNTP constructor exception leaves socket for garbage collector

2015-04-03 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 7a91363f31e1 by Serhiy Storchaka in branch '3.4':
Issue #22351. MockSslTests tests in test_nntplib now are reported if skipped.
https://hg.python.org/cpython/rev/7a91363f31e1

New changeset c935c1e1d001 by Serhiy Storchaka in branch 'default':
Issue #22351. MockSslTests tests in test_nntplib now are reported if skipped.
https://hg.python.org/cpython/rev/c935c1e1d001

--

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



[issue22351] NNTP constructor exception leaves socket for garbage collector

2015-04-03 Thread STINNER Victor

STINNER Victor added the comment:

Except of the self parameter/@staticmethod and the unrelated SAX changes, 
issue22351_skip_MockSslTests.patch looks good to me.

--
resolution: fixed - 
status: closed - open

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



[issue23857] [RFE] Make certificate verification optionable

2015-04-03 Thread STINNER Victor

STINNER Victor added the comment:

This issue is related to the PEP 476 which made the SSL certification checks 
mandatory by default.

The PEP contains a section to explain how to opt-out, but the solution is 
global:
https://www.python.org/dev/peps/pep-0476/#opting-out

I understand that Robert wants a finer grain.

 [https]  # each protocol affected by cert-verification got its own section

I'm not sure that the configuration should be made on the protocol. We may 
configure it per Python module (if we choose to accept the enhancement, I'm not 
convinced that it's good idea). Maybe it's a stupid idea, for example urllib 
and httplib are both used for HTTPS. But what about xmlrpclib? Should it follow 
the same policy?

 2) certificate verification is optional already, is it not? That is, it can 
 be turned off in your code, it is just on by default.

It requires to modify applications. Robert wants something to keep the Python 
2.7.8 behaviour on Python 2.7.9 and newer. (Python 2.7.9 made SSL check 
mandatory by default, or is it only scheduled for Python 2.7.10? I don't 
remember :-()

 3) what downstream are you talking about?

Robert and me are working for Red Hat.

--

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



[issue23857] [RFE] Make certificate verification optionable

2015-04-03 Thread Robert Kuska

Robert Kuska added the comment:

1) patch attached, dunno how I missed it, thank you.

3) I work for Red Hat
additional interest for example here http://seclists.org/oss-sec/2015/q1/785

2) It exists but it is not system wide, I would like to provide users option to 
opt-in or opt-out without interfering with code. There are many of users who 
rely on python and not all of them are programmers.

--
keywords: +patch
Added file: http://bugs.python.org/file38817/custom-cert-verify.patch

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



[issue22643] Integer overflow in case_operation

2015-04-03 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

bigimem tests are ran with dummy size = 5147 if dry_run = True (default) and 
skipped if dry_run = False. Almost always you need dry_run = False.

The -M option doesn't work with less than 1 GiB.

In this case likely the buildbot had enough memory at the start, but then some 
memory leaked in tests (perhaps mainly in tracebacks of failed tests).

--

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



[issue23857] [RFE] Make certificate verification optionable

2015-04-03 Thread Nick Coghlan

Nick Coghlan added the comment:

(capturing these details here for now, we should at least have a python-dev 
discussion before going ahead with any changes in this area)

The additional background here is that we started looking closely at what would 
be involved in applying PEP 476 to systems where there are 3 parties involved 
and the aim is to tweak the system Python to require explicitly opting in to 
certificate verification (at least for the time being):

* CPython upstream verifies certificates by default
* Platform vendor configures Python to use legacy mode by default
* System administrator responsible for the machine can easily opt in to global 
verification and have that setting persist through Python updates

The opt out solution in PEP 476 works for the direct consumption of upstream 
case, as the system administrator responsible for the machine can opt out 
globally in sitecustomize.py.

It turns out that solution *doesn't* work at the platform vendor level, as 
sitecustomize.py is intended for use by the system administrator responsible 
for the machine - providing it as a platform vendor would be the wrong thing to 
do from a packaging perspective, as that usage would conflict with the intended 
use case of local site customisation.

We suspected this would be a problem when we were discussing PEP 476 (hence the 
discussions of configuration files that Victor linked), but decided to postpone 
further consideration until after the distros had had a chance to consider the 
problem in more detail.

Patching httplib to have a different default from CPython upstream isn't 
desirable, as that would perpetuate the problem that PEP 476 was designed to 
fix with no clear migration path to more secure defaults as the platform level.

The idea of this patch is to provide a middle ground where a configuration file 
can be provided with the system python package that preserves the pre-PEP-476 
status quo by setting verify=disable for https verification. If the 
configuration file is missing entirely then the upstream default of verifying 
certificates would still be used.

The verify=enable setting would then let system administrators explicitly opt 
in to certificate verification, while verify=platform_default would mean 
verify=disable while the default package configuration still did that, but 
would potentially switch to meaning verify=enable at some point in the future 
(the exact meaning of the platform_default setting would likely be controlled 
by a distro level patch anyway, so it could potentially be omitted from the 
upstream change proposal).

From an implementation perspective, the reason the proposal is for a global 
HTTPS switch rather than a fine-grained per-module setting is back the 
follow-up proposal would be to write a PEP to backport it to Python 2.7, so 
something that's closely aligned with the existing opt-out mechanism in PEP 
476 is considered desirable.

--

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



[issue23857] [RFE] Make certificate verification optionable

2015-04-03 Thread Robert Kuska

Robert Kuska added the comment:

If you mean hack site.py to be sitecustomize  I don't find it as a sufficient 
solution because users may use their own sitecustomize and this way we would 
replace theirs.

Sslcustomize solution could be another option how to handle this but the config 
idea seems to me much more easier (also from the linux user POV).

--

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



[issue23857] [RFE] Make certificate verification optionable

2015-04-03 Thread Robert Kuska

Robert Kuska added the comment:

( ^ I was replying to Victor)

--

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



[issue22351] NNTP constructor exception leaves socket for garbage collector

2015-04-03 Thread Martin Panter

Martin Panter added the comment:

Serhiy’s patch looks like it should do the trick. Just get rid of the “self” 
parameter to make it clearer, and watch out for the stray XML changes!

--

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



[issue23857] [RFE] Make certificate verification optionable

2015-04-03 Thread R. David Murray

R. David Murray added the comment:

1) there is no patch attached
2) certificate verification is optional already, is it not? That is, it can be 
turned off in your code, it is just on by default.
3) what downstream are you talking about?

Supposing there is sufficient utility here, the level of change proposed would 
need to go through python-ideas first, IMO.

--
nosy: +r.david.murray

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



[issue1103213] Adding the missing socket.recvall() method

2015-04-03 Thread STINNER Victor

STINNER Victor added the comment:

 - I've learned that MSG_WAITALL may be unreliable on certain systems, so any 
 implementation of recvall depending on MSG_WAITALL may inexplicably fail on 
 such systems

Something else occurred since 5 years: the PEP 475 was accepted, it makes 
Python more reliable when it receives signals.

If recv(WAIT_ALL) is interrupted by a signal and returns less bytes, we must 
call PyErr_CheckSignal(). If the signal handler raises an exception, drop read 
data and raises the exception. If the signal handler does not raise an 
exception, we now *must* retry recv(WAIT_ALL) (with a shorter length, to not 
read too much data).

The IncompleteRead exception is still needed if the socket is closed before 
receiving the requested number of bytes.

--

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



[issue22351] NNTP constructor exception leaves socket for garbage collector

2015-04-03 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Agree, factory method can be staticmethod.

--

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



[issue22351] NNTP constructor exception leaves socket for garbage collector

2015-04-03 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Now you have used time machine in reverse mode.

--
resolution:  - fixed
status: open - closed

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



[issue23857] [RFE] Make certificate verification optionable

2015-04-03 Thread STINNER Victor

STINNER Victor added the comment:

 2) It exists but it is not system wide,

You can hack site.py to disable SSL checks system-wide. It was also discussed 
to support an optional sslcustomize module, but the idea was rejected if I 
remember correctly. Anyway, did you read the discussion on the PEP 476? Options 
to disable SSL checks have been discussed there.

Examples:
https://mail.python.org/pipermail/python-dev/2014-August/136034.html
https://mail.python.org/pipermail/python-dev/2014-September/136102.html

--

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



[issue22351] NNTP constructor exception leaves socket for garbage collector

2015-04-03 Thread Martin Panter

Martin Panter added the comment:

Sorry, that self parameter is okay. I was just confused because it now means 
something different :S

--

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



[issue23853] PEP 475: handle EINTR in the ssl module

2015-04-03 Thread STINNER Victor

STINNER Victor added the comment:

Here is a patch to fix the issue: recompute the timeout.

It's unclear to me if we should reset the timeout after each successful 
read/write, or if the timeout is global (total duration of the ssl method). I 
asked the question on the python-dev mailing list.
https://mail.python.org/pipermail/python-dev/2015-April/139001.html

My patch uses a global timeout (never reset the timeout), whereas 
socket.sendall() resets the timeout at each send() success.

--
Added file: http://bugs.python.org/file38816/ssl_timeout.patch

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



[issue22643] Integer overflow in case_operation

2015-04-03 Thread Serhiy Storchaka

Changes by Serhiy Storchaka storch...@gmail.com:


--
keywords: +patch
stage: resolved - patch review
versions:  -Python 3.3
Added file: 
http://bugs.python.org/file38818/test_case_operation_overflow_memory_error.patch

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



[issue22643] Integer overflow in case_operation

2015-04-03 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Perhaps adding bigmemtest is not worth if memory requirements are less than 1 
GiB. But I would separate the creating of long tested string and the calling of 
case converting method, so we will sure what operation is failed. Proposed 
patch skips the test if can't create needed string and clean locals, so failing 
test_case_operation_overflow no longer causes multiple MemoryErrors in 
following tests.

--

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



[issue22643] Integer overflow in case_operation

2015-04-03 Thread STINNER Victor

STINNER Victor added the comment:

 Perhaps adding bigmemtest is not worth if memory requirements are less than 1 
 GiB.

What is the current limit if you don't pass -M option to regrtest? In 
@bigimemtest, I see maxsize = 5147. Is it a number of bytes? 5 kB of memory?

IMO it's interested to use @bigmemtest if a test uses 100 MB of memory or more, 
but regrtest should use tests using less than 500 MB by default (or maybe less 
than 1 GB by default).

--

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



[issue23857] [RFE] Make certificate verification optionable

2015-04-03 Thread Nick Coghlan

Nick Coghlan added the comment:

The other goal worth noting here is that we'd like to facilitate easy system 
auditing/monitoring such that machines that still have Python certificate 
verification off by default can easily be flagged by checks in tools like 
Nagios, as well as being easy to adjust using configuration management and 
system orchestration tools (Ansible, Salt, Chef, Puppet, etc).

--

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



[issue23219] asyncio: cancelling wait_for(task, timeout) must also cancel the task

2015-04-03 Thread Roundup Robot

Roundup Robot added the comment:

New changeset c167b9f9aac8 by Victor Stinner in branch '3.4':
Issue #23219: Update asyncio.wait_for() documentation
https://hg.python.org/cpython/rev/c167b9f9aac8

--

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



[issue23859] asyncio: document behaviour of wait() cancellation

2015-04-03 Thread STINNER Victor

New submission from STINNER Victor:

When wait(fs) is cancelled, futures of fs are not cancelled. This behaviour is 
not documented. It should be documented, and a warning should be added to the 
Cancellation section:
https://docs.python.org/dev/library/asyncio-dev.html#cancellation

See my message Cancellation of asyncio.wait():
https://mail.google.com/mail/u/0/#label/Tulip/14b34f0a5d31114f

--
components: asyncio
messages: 240001
nosy: gvanrossum, haypo, yselivanov
priority: normal
severity: normal
status: open
title: asyncio: document behaviour of wait() cancellation
versions: Python 3.4, Python 3.5

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



[issue23765] Remove IsBadStringPtr calls in ctypes

2015-04-03 Thread Steve Dower

Changes by Steve Dower steve.do...@microsoft.com:


--
status: open - closed

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



[issue23858] Look for local sqlite3 by parsing -I/-L flags in linux as well.

2015-04-03 Thread Ned Deily

Ned Deily added the comment:

This is essentially a duplicate of Issue3467 and various other similar issues.  
While it may not be easy to justify the special case in setup.py for OS X (the 
reason was primarily for OS X installer builds), it would be even harder to 
justify adding another special case just for Linux systems.  Why not all 
platforms and libs?  The standard reply (in Issue3467 and elsewhere) to these 
kinds of requests has been to use one of the Modules/Setup files (like 
Setup.local) to customize extension module builds or to come up with a more 
general solution for the top-level setup.py third-party library configuration, 
rather than more special cases for each lib.

--
nosy: +ned.deily
resolution:  - duplicate
stage:  - resolved
status: open - closed
superseder:  - sqlite3 path is hard coded in setup.py

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



[issue23858] Look for local sqlite3 by parsing -I/-L flags in linux as well.

2015-04-03 Thread Ned Deily

Ned Deily added the comment:

My apologies, I replied a bit too hastily, thinking incorrectly that your 
suggested change was just for sqlite3.  While the comments above still apply, 
there is already an open request for the more general feature (and more) under 
Issue21571.  So I suggest further discussion be moved there.

--
superseder: sqlite3 path is hard coded in setup.py - Python build should check 
CPATH, C_INCLUDE_PATH for module dependencies

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



[issue23466] PEP 461: Inconsistency between str and bytes formatting of integers

2015-04-03 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

See also issue18184.

--

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



[issue22351] NNTP constructor exception leaves socket for garbage collector

2015-04-03 Thread STINNER Victor

STINNER Victor added the comment:

 Good catch. But may be better to report MockSslTests as skipped instead of 
 silently omit them.

I don't know how to do that.

--
nosy: +haypo

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



[issue23857] [RFE] Make certificate verification optionable

2015-04-03 Thread Robert Kuska

New submission from Robert Kuska:

Proposed patch adds possibility to opt-out certificate verification. 
Disclaimer: it is just proof of concept as the config value is hard-coded.

How it works?
This patch depends on existence of config file which holds information about 
the protocol settings.

 $ cat cert-verification.conf
[https]  # each protocol affected by cert-verification got its own section
verify=platform_default

Possible values for verify are:
enable - to enable certificate verification
disable - to disable certificate verification
platform_default - to use default (platform-specific) settings

Why platform_default?
This choice is for users who don't care about the security settings so they put 
the decision into their platform (distro) from which they get python. In rpm we 
can set package to not replace user edited configs when rpm is updated, so if 
user change the default value of config the config will remain the same.

Python example:

  import http.client
  cn = http.client.HTTPSConnection('www.google.com')
  cn._context.verify_mode
 0L  # CERT_NONE
  # config changed to verify=enable, still same interpreter
  cn2 = http.client.HTTPSConnection('www.google.com')
  cn2._context.verify_mode
 2L  # CERT_REQUIRED

This is how currently works patch attached, but I guess it would make more 
sense make this behave consistent within the same interpreter even when config 
is changed and the change will be propagated in the next interpreter 
run/service restart.

Also the patch could be changed to instead of being protocol based to be module 
based, but this would need also patching the affected modules.

I open the RFE mainly to see if there is a will to implement optionable 
certificate verification in upstream as it is in downstream [citation needed].

I've added some people to nosy list based on 
https://docs.python.org/devguide/experts.html

--
components: Library (Lib)
messages: 239965
nosy: alex, dstufft, haypo, janssen, ncoghlan, pitrou, rkuska
priority: normal
severity: normal
status: open
title: [RFE] Make certificate verification optionable
type: enhancement
versions: Python 3.5

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



[issue23500] Argument Clinic: multiple macro definition

2015-04-03 Thread Larry Hastings

Larry Hastings added the comment:

As promised, here's a cleaned-up version of the patch.  The taxonomy of objects 
now makes sense: a Destination contains a BufferSeries object, rather than 
Destinations weirdly supporting __getitem__ to reference different objects.

I tripped over myself a little with the two-pass destination / preset.  It 
was an experiment long ago but nobody's using it.  So rather than fix it I just 
turned it off.

--
Added file: 
http://bugs.python.org/file38821/larry.ac_multiple_macro_definitions.diff.4.txt

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



[issue21571] Python build should check CPATH, C_INCLUDE_PATH for module dependencies

2015-04-03 Thread Simon Ye

Changes by Simon Ye sye...@gmail.com:


--
nosy: +yesimon

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



[issue23852] Wrong FD_DIR file name on OpenBSD

2015-04-03 Thread Cédric Krier

Cédric Krier added the comment:

Here is a patch that uses getrlimit (that's works on OpenBSD) before using 
sysconf.

--
Added file: http://bugs.python.org/file38824/max_fd.patch

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



[issue23856] build.bat -e shouldn't also build

2015-04-03 Thread Tim Golden

Tim Golden added the comment:

Fair enough

--
resolution:  - not a bug
stage: patch review - resolved
status: open - closed

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



[issue23668] Support os.ftruncate on Windows

2015-04-03 Thread Steve Dower

Steve Dower added the comment:

Sorry, _Py_open requires a double encoding (wchar-char-wchar), which is why 
I'm not going to use it.

_Py_wfopen takes a mode string rather than _O_* flags, and so implicitly 
includes _O_CREAT.

Guessing we should add _Py_wopen?

--

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



[issue23668] Support os.ftruncate on Windows

2015-04-03 Thread STINNER Victor

STINNER Victor added the comment:

Sorry, I still fail to see how _Py_open() or _Py_open_noraise() add the O_CREAT 
flag: they are thin wrapper to the underyling open() function. I cannot see 
O_CREAT in Python/fileutils.c. Could you please show me that the line number 
adding O_CREAT implictly?

I don't understand.

--

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



[issue23500] Argument Clinic: multiple macro definition

2015-04-03 Thread Larry Hastings

Larry Hastings added the comment:

Updated patch, removed all references to two-pass.  Also realized I needed to 
make the default behavior for methoddef_ifndef go to the end.  And, finally, I 
forgot to merge the only print each #ifndef block once code I wrote before 
when I redid the patch, so that's in now.

--
Added file: 
http://bugs.python.org/file38822/larry.ac_multiple_macro_definitions.diff.5.txt

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



[issue23852] Wrong FD_DIR file name on OpenBSD

2015-04-03 Thread Gregory P. Smith

Gregory P. Smith added the comment:

I'm not going to bother setting up a VM with an esoteric OS in it myself, if 
someone knows the past and current state of various OpenBSD versions and what 
to do there, feel free to commit OpenBSD conditional compilation bits as you 
see fit to make this do the right thing. :)

--
components: +Extension Modules
stage:  - patch review
type:  - behavior
versions: +Python 3.4, Python 3.5

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



[issue23860] Failure to check return value from lseek() in Modules/mmapmodule.c

2015-04-03 Thread Bill Parker

New submission from Bill Parker:

Hello All,

   In reviewing code in directory Python-3.4.3/Modules, file 
'mmapmodule', I found a call to 'lseek()' without a check for
a return value of -1, indicating failure.  The patch file below
corrects this issue (diff -u format):

--- mmapmodule.c.orig   2015-04-02 19:05:30.380554538 -0700
+++ mmapmodule.c2015-04-02 19:11:00.320488207 -0700
@@ -1335,7 +1335,11 @@
 return NULL;
 }
 /* Win9x appears to need us seeked to zero */
-lseek(fileno, 0, SEEK_SET);
+   if (lseek(fileno, 0, SEEK_SET) == -1) { /* call to lseek() failed */
+   PyErr_SetFromErrno(PyExc_OSError);
+   return NULL;
+   }
+
 }
 
 m_obj = (mmap_object *)type-tp_alloc(type, 0);

I am attaching the patch file to this bug report...

--
components: Interpreter Core
files: mmapmodule.c.patch
keywords: patch
messages: 240015
nosy: dogbert2
priority: normal
severity: normal
status: open
title: Failure to check return value from lseek() in Modules/mmapmodule.c
type: behavior
versions: Python 3.4
Added file: http://bugs.python.org/file38823/mmapmodule.c.patch

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



[issue23852] Wrong FD_DIR file name on OpenBSD

2015-04-03 Thread Cédric Krier

Cédric Krier added the comment:

Indeed, I think my patch is not right as /dev/fd on OpenBSD is static.
I will continue to investigate.

--

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



[issue23500] Argument Clinic: multiple macro definition

2015-04-03 Thread Larry Hastings

Larry Hastings added the comment:

I did, I just didn't respond.  I'll do that now.

--

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



[issue23466] PEP 461: Inconsistency between str and bytes formatting of integers

2015-04-03 Thread Serhiy Storchaka

Changes by Serhiy Storchaka storch...@gmail.com:


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

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



[issue23794] http package should support HTTP/2

2015-04-03 Thread Demian Brecht

Demian Brecht added the comment:

@Cory: my own plan was to use your implementation as the baseline and add 
server support. If you take a crack at it that would be great!

--

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



[issue23794] http package should support HTTP/2

2015-04-03 Thread Cory Benfield

Cory Benfield added the comment:

 figure out some kind of adapter interface in order to facilitate swapping 
 between 1.1 and 2 (This can start with a clean HTTP/1.1 interface)

I've been thinking about this a lot with hyper, and I'm about to start work on 
it (having just finished an alpha implementation of HTTP/1.1). My current plan 
is to try out a proxy object pattern, but you should feel free to use the hyper 
code as a leaping-off point for some experiments into how to do the swapping.

--

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



[issue23852] Wrong FD_DIR file name on OpenBSD

2015-04-03 Thread Cédric Krier

Cédric Krier added the comment:

The problem comes from safe_get_max_fd which return a too low value because of 
a bug in sysconf on OpenBSD [1]:

The value for _SC_STREAM_MAX is a minimum maximum, and required to be the same 
as ANSI C's FOPEN_MAX, so the returned value is a ridiculously small and 
misleading number.

[1] http://www.openbsd.org/cgi-bin/man.cgi/OpenBSD-current/man3/sysconf.3

--
type: behavior - 

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



[issue23852] Wrong FD_DIR file name on OpenBSD

2015-04-03 Thread Cédric Krier

Changes by Cédric Krier cedric.kr...@b2ck.com:


--
type:  - behavior

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



[issue23500] Argument Clinic: multiple macro definition

2015-04-03 Thread Serhiy Storchaka

Changes by Serhiy Storchaka storch...@gmail.com:


--
assignee:  - larry
stage: patch review - commit review

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



[issue23466] PEP 461: Inconsistency between str and bytes formatting of integers

2015-04-03 Thread Ethan Furman

Ethan Furman added the comment:

Looks good, thanks Serhiy.

--
stage: needs patch - patch review

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



[issue23812] asyncio.Queue.put_nowait(), followed get() task cancellation leads to item being lost

2015-04-03 Thread STINNER Victor

STINNER Victor added the comment:

queue_bug.py: script to reproduce the bug.

I confirm that Queue.get() sometimes looses items when it is cancelled. The 
waiter contains the result, but the waiter is lost when get() is cancelled.

Queue.get() waiter got a result, but Queue.get() wakeup is only *scheduled* 
yet. It may even be executed in the same iteration, or maybe in the next loop 
iteration.

I didn't review patches yet.

--
Added file: http://bugs.python.org/file38820/queue_bug.py

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



[issue23466] PEP 461: Inconsistency between str and bytes formatting of integers

2015-04-03 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 313fd1c819c5 by Serhiy Storchaka in branch 'default':
Issue #23466: Raised OverflowError if %c argument is out of range.
https://hg.python.org/cpython/rev/313fd1c819c5

--

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



[issue23794] http package should support HTTP/2

2015-04-03 Thread Demian Brecht

Demian Brecht added the comment:

+1 to the adding the support for HTTP/2. I would personally like to see a few 
things happen before that though (which I've been putting some effort into as i 
can)

+ refactor http.client to cleanly separate transport from application protocol 
level
+ figure out some kind of adapter interface in order to facilitate swapping 
between 1.1 and 2 (This can start with a clean HTTP/1.1 interface)
+ full HTTP/1.1 support. Given (as i understand it) HTTP/2 is largely an 
extension of HTTP/1.1 it doesn't make much sense to me to implement the latter 
before the former.

--
nosy: +demian.brecht

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



[issue23500] Argument Clinic: multiple macro definition

2015-04-03 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Looks as you didn't notice my comments on Rietveld.

--

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



[issue23500] Argument Clinic: multiple macro definition

2015-04-03 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

larry.ac_multiple_macro_definitions.diff.5.txt LGTM.

--

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



[issue23861] Make stdprinter use DebugOutputString when no stdout/stderr available

2015-04-03 Thread Steve Dower

New submission from Steve Dower:

Currently we initialize stdprinter while initializing and terminate if we can't 
access std streams.

We should always write to DebugOutputString on Windows (only does anything if a 
debugger is attached) and avoid terminating in this case.

--
components: Windows
messages: 240025
nosy: steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: Make stdprinter use DebugOutputString when no stdout/stderr available
versions: Python 3.5

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



[issue23338] PyErr_Format in ctypes uses invalid parameter

2015-04-03 Thread Masayuki Yamamoto

Changes by Masayuki Yamamoto light2happy@gmail.com:


--
nosy: +masamoto

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



[issue23831] tkinter canvas lacks of moveto method.

2015-04-03 Thread Terry J. Reedy

Changes by Terry J. Reedy tjre...@udel.edu:


--
stage:  - test needed

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



[issue23831] tkinter canvas lacks of moveto method.

2015-04-03 Thread Terry J. Reedy

Changes by Terry J. Reedy tjre...@udel.edu:


--
nosy: +serhiy.storchaka, terry.reedy
versions: +Python 3.5 -Python 3.4

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



[issue23862] subprocess popen arguments using double quotes

2015-04-03 Thread Paul Moore

Paul Moore added the comment:

On Windows, subprocess.Popen has to convert an argument list to a command line 
(because that's what the OS expects for CreateProcess). It does so internally, 
using subprocess.list2cmdline, which follows the quoting rules for the MS C 
runtime (because that's what 99% of programs use). Unfortunately batfile 
argument parsing does *not* use these conventions, and you can find odd corner 
cases like this.

Specifically, it's not possible on Windows to correctly quote all forms of 
argument without knowing what program you are calling (because programs do 
their own argument parsing, usually but not always via the C runtime). The 
subprocess module has to work for unknown executables, so it chooses to do the 
right thing for programs using the MS C runtime argument parser (which is most 
programs).

--
nosy: +paul.moore
resolution:  - not a bug
status: open - closed

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



[issue23500] Argument Clinic: multiple macro definition

2015-04-03 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Thank you Larry.

--

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



[issue23815] Segmentation fault when create _tkinter objects

2015-04-03 Thread Terry J. Reedy

Terry J. Reedy added the comment:

With 3.4.3, I get the equivalent on Windows (a 'python has stopped working' 
box).

--
nosy: +terry.reedy

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



[issue23500] Argument Clinic: multiple macro definition

2015-04-03 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

I think this is not needed.

--

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



[issue23791] Identify Moved Lines with difflib

2015-04-03 Thread Terry J. Reedy

Changes by Terry J. Reedy tjre...@udel.edu:


--
nosy: +terry.reedy

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



[issue23501] Argument Clinic: generate code into separate files by default

2015-04-03 Thread Roundup Robot

Roundup Robot added the comment:

New changeset aa88a18a4aa1 by Serhiy Storchaka in branch 'default':
Issue #23501: Argumen Clinic now generates code into separate files by default.
https://hg.python.org/cpython/rev/aa88a18a4aa1

--
nosy: +python-dev

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



[issue23492] Argument Clinic: improve generated parser for 1-argument functions

2015-04-03 Thread Roundup Robot

Roundup Robot added the comment:

New changeset e10ad4d4d490 by Serhiy Storchaka in branch 'default':
Issue #23492: Argument Clinic now generates argument parsing code with
https://hg.python.org/cpython/rev/e10ad4d4d490

--
nosy: +python-dev

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



[issue23825] test_idle fails under -OO

2015-04-03 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Whatever you do with the other -OO patches, I would prefer that this be applied 
to 3.4.  The 3.4/3.5 files should be identical.

--
versions: +Python 3.4

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



[issue23500] Argument Clinic: multiple macro definition

2015-04-03 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 25eef0ecb9c1 by Larry Hastings in branch 'default':
Issue #23500: Argument Clinic is now smarter about generating the #ifndef
https://hg.python.org/cpython/rev/25eef0ecb9c1

--
nosy: +python-dev

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



[issue23786] test_unaligned_buffers (test.test_hash.HashEqualityTestCase) ... Fatal Python error: Bus error

2015-04-03 Thread Peter

Peter added the comment:

Test 1
Python 3.4.3 built by GCC 4.9.2 is:
 str(memoryview(b'abcdefghijklmnopqrstuvwxyz')[1:], 'ascii')
'bcdefghijklmnopqrstuvwxyz'


Test 2
Python 3.4.3 built by GCC 4.6.2 is (no patches applied)
This build will core dump if I run -m test test_hash.
 str(memoryview(b'abcdefghijklmnopqrstuvwxyz')[1:], 'ascii')
'bcdefghijklmnopqrstuvwxyz'

--

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



[issue23825] test_idle fails under -OO

2015-04-03 Thread Terry J. Reedy

Terry J. Reedy added the comment:

The relevant code in CallTips.py itself

if isinstance(ob_call, types.MethodType):
doc = ob_call.__doc__
else:
doc = getattr(ob, __doc__, )
if doc: add more to calltip

equally ignores both None and '', but I forgot the None possibility in the 
tests.  I cannot test the patch, but the fix looks right.  Putting the doc 
conditional expression before the for loops works because if one .__doc__ is 
set to None, all are.  For the same reason, doc could be defined as a global 
name, but if the patch makes test_idle pass, it is fine as it is.

--
nosy: +terry.reedy
stage: patch review - commit review

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



[issue23500] Argument Clinic: multiple macro definition

2015-04-03 Thread Larry Hastings

Larry Hastings added the comment:

Does this really need a backport to 3.4?

--

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



[issue15582] Enhance inspect.getdoc to follow inheritance chains

2015-04-03 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 157b7055bb9d by Serhiy Storchaka in branch 'default':
Issue #15582: inspect.getdoc() now follows inheritance chains.
https://hg.python.org/cpython/rev/157b7055bb9d

--
nosy: +python-dev

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



[issue23862] subprocess popen arguments using double quotes

2015-04-03 Thread rengine

New submission from rengine:

Using Python 2.7.9

Noticed when I run a subprocess Popen with an argument containing double 
quotes, it will have a different affect depending on my operating system. 

In Linux, if I run ./runme.py, it will call runme.sh which will append 
someargs.txt correctly without escaped quotations

In Windows, if I run ./runme.py, it will call runme.bat which will append 
someargs.txt with escaped quotations

Also in Windows, if I run runme.bat with an argument containing quotations it 
will append someargs.txt correctly without escaped quotations so this problem 
seems to be stemming from Python.

= runme.py

#!/usr/bin/python
import sys
import subprocess
import shlex

# works on Linux:
#command_line = ./runme.sh --include=\check\

# fails on Windows:
command_line = runme.bat --include=\check\
#command_line = runme.bat --include=\check\

arg = shlex.shlex(command_line)
arg.quotes = ''
arg.whitespace_split = True
arg.commenters = ''
command_line_args = list(arg)
print command_line_args

command_line_process = subprocess.Popen(
command_line_args,
universal_newlines=True,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE
)

line = 
while True:
line = command_line_process.stdout.readline()
if line:
print line
else:
break

= runme.bat

echo %*
echo %*  someargs.txt

= runme.sh

#!/bin/bash
echo $@
echo $@  someargs.txt

--
messages: 240026
nosy: rengine
priority: normal
severity: normal
status: open
title: subprocess popen arguments using double quotes
type: behavior
versions: Python 2.7

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



[issue15582] Enhance inspect.getdoc to follow inheritance chains

2015-04-03 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Unfortunately this enhancement breaks test_enum.

==
FAIL: test_pydoc (test.test_enum.TestStdLib)
--
Traceback (most recent call last):
  File /home/serhiy/py/cpython/Lib/test/test_enum.py, line 1609, in test_pydoc
self.assertEqual(result, expected_text)
AssertionError: 'Help[68 chars]n |  Generic enumeration.\n |  \n |  Derive 
fr[876 chars]ing.' != 'Help[68 chars]n |  Method resolution order:\n |  
Color\n[782 chars]ing.'
  Help on class Color in module test.test_enum:
  
  class Color(enum.Enum)
-  |  Generic enumeration.
-  |  
-  |  Derive from this class to define new enumerations.
-  |  
   |  Method resolution order:
   |  Color
   |  enum.Enum
   |  builtins.object
   |  
   |  Data and other attributes defined here:
   |  
   |  blue = Color.blue: 3
   |  
   |  green = Color.green: 2
   |  
   |  red = Color.red: 1
   |  
   |  --
   |  Data descriptors inherited from enum.Enum:
   |  
   |  name
   |  The name of the Enum member.
   |  
   |  value
   |  The value of the Enum member.
   |  
   |  --
   |  Data descriptors inherited from enum.EnumMeta:
   |  
   |  __members__
   |  Returns a mapping of member name-value.
   |  
   |  This mapping lists all enum members, including aliases. Note that this
   |  is a read-only view of the internal mapping.

--

--
nosy: +ethan.furman

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



[issue23809] RFE: emit a warning when a module in a traceback shadows a stdlib module

2015-04-03 Thread Terry J. Reedy

Terry J. Reedy added the comment:

This is a fairly common newbie bug.  random.py seems to be  favorite name.

--
nosy: +terry.reedy

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



[issue23500] Argument Clinic: multiple macro definition

2015-04-03 Thread Larry Hastings

Larry Hastings added the comment:

Removing 3.4 from the version list as I close the bug, then.  If we decide we 
need it backported please reopen (or create a new bug, either is fine).

--
resolution:  - fixed
stage: commit review - resolved
status: open - closed
versions:  -Python 3.4

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



[issue23501] Argument Clinic: generate code into separate files by default

2015-04-03 Thread Larry Hastings

Larry Hastings added the comment:

Thanks!  I've been meaning to follow up on this.  I think CPython should be 
consistent, one way or another.  So I support this change.

--

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



[issue23501] Argument Clinic: generate code into separate files by default

2015-04-03 Thread Serhiy Storchaka

Changes by Serhiy Storchaka storch...@gmail.com:


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

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



[issue23492] Argument Clinic: improve generated parser for 1-argument functions

2015-04-03 Thread Serhiy Storchaka

Changes by Serhiy Storchaka storch...@gmail.com:


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

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



[issue20718] OpenBSD/AIX: tests passing a file descriptor with sendmsg/recvmsg failures

2015-04-03 Thread Michael Schurter

Changes by Michael Schurter m...@schmichael.com:


--
nosy:  -schmichael

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



[issue23863] Fix EINTR Socket Module issues in 2.7

2015-04-03 Thread Ned Deily

Changes by Ned Deily n...@acm.org:


--
nosy: +haypo

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



[issue23861] Make stdprinter use DebugOutputString when no stdout/stderr available

2015-04-03 Thread Mark Lawrence

Changes by Mark Lawrence breamore...@yahoo.co.uk:


--
nosy: +BreamoreBoy

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



[issue23863] Fix EINTR Socket Module issues in 2.7

2015-04-03 Thread Jeff McNeil

Jeff McNeil added the comment:

mcjeff@mcjeff:~/cpython_clean$ hg summary
parent: 95416:fe34dfea16b0 
 Escaped backslashes in docstrings.
branch: 2.7
commit: 3 modified, 3 unknown
update: (current)

--
keywords: +patch
nosy: +gregory.p.smith
Added file: http://bugs.python.org/file38826/socket_eintr.patch

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



[issue23857] Make default HTTPS certificate verification setting configurable via global ini file

2015-04-03 Thread Donald Stufft

Donald Stufft added the comment:

I'd really rather not add this to Python itself. If downstream wants to patch 
their Pythons to do it that is their prerogative. There's some legacy at play 
here of course, however I don't think that Python upstream is the right place 
to deal with that.

One particular problem with this, is it becomes a lot harder to figure out if 
accessing a https URL is going to be secured or not since you have to also 
figure out what additional settings have been put into place. It also feels 
like a really weird setting. You don't see this kind of thing in any other 
languages or tool that I'm aware of except for single purpose tools.

--

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



[issue23863] Fix EINTR Socket Module issues in 2.7

2015-04-03 Thread Jeff McNeil

New submission from Jeff McNeil:

There are a collection of places in the socket module that do not correctly 
retry on EINTR.  Updated to wrap those calls in a retry loop.  However, when 
fixing connect calls, I noticed that when EINTR is retried on a socket with a 
timeout specified, the retry fails with EALREADY.. so I fixed that.

I was going to shy away from primitive calls on sockets as one expects these 
things when working at a lower level, however, due to the way socket timeouts 
were implemented, I handled it differently in internal_connect.  The 
create_connection calls probably ought to shield users from retry.

Python 2.7.6.

--
files: socket_intr.py
messages: 240044
nosy: mcjeff
priority: normal
severity: normal
status: open
title: Fix EINTR Socket Module issues in 2.7
versions: Python 2.7
Added file: http://bugs.python.org/file38825/socket_intr.py

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



[issue23857] Make default HTTPS certificate verification setting configurable via global ini file

2015-04-03 Thread R. David Murray

R. David Murray added the comment:

Changing the title to be specific to the proposed patch.

--
title: [RFE] Make default HTTPS certificate verification setting configurable 
- Make default HTTPS certificate verification setting configurable via global 
ini file

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



[issue23857] Make default HTTPS certificate verification setting configurable via global ini file

2015-04-03 Thread Barry A. Warsaw

Barry A. Warsaw added the comment:

+1  for keyed by site

There have been a number of issues over the years for which a configuration 
file (or files) would have been useful.  I think a discussion over on 
python-ideas is the right way to move forward on this point.

--

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



[issue23858] Look for local sqlite3 by parsing -I/-L flags in linux as well.

2015-04-03 Thread Simon Ye

New submission from Simon Ye:

Based off of https://github.com/Homebrew/linuxbrew/pull/330.

Currently building python on linux only looks for sqlite include paths in a 
hardcoded set of system paths, but if the user specifies -I/-L options during 
compilation, python setup.py looks there for sqlite3 as well, but only on OS X. 
This is problem for people who want to build python against a local version of 
sqlite3, and it is also inconsistent with the OS X behavior. Also the comments 
say that it should work on any unix-y OS!

--
components: Build
files: sqlite_patch.diff
keywords: patch
messages: 239997
nosy: yesimon
priority: normal
severity: normal
status: open
title: Look for local sqlite3 by parsing -I/-L flags in linux as well.
versions: Python 3.6
Added file: http://bugs.python.org/file38819/sqlite_patch.diff

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



  1   2   >