[issue24658] open().write() and .read() fails on 2 GB+ data (OS X)

2019-02-15 Thread Ned Deily


Change by Ned Deily :


--
assignee: ned.deily -> 

___
Python tracker 

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



[issue35746] [ssl][CVE-2019-5010] TALOS-2018-0758 Denial of Service

2019-02-15 Thread Ned Deily


Ned Deily  added the comment:


New changeset 2a3af94b7e4d7851986043348128e312ddbb2451 by Ned Deily (Victor 
Stinner) in branch '3.6':
bpo-35746: Credit Colin Read and Nicolas Edet (GH-11865)
https://github.com/python/cpython/commit/2a3af94b7e4d7851986043348128e312ddbb2451


--

___
Python tracker 

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



[issue5038] urrlib2/httplib doesn't reset file position between requests

2019-02-15 Thread Martin Panter

Martin Panter  added the comment:

For 3.7+ (where iterable objects are supported), I suggest:

1. Document the problem as a limitation of handlers like 
AbstractBasicAuthHandler, and consider raising an exception instead of trying 
to upload a file or iterable a second time.

2. Clarify the behaviour for different types of the “urllib.request” data 
parameter. I understand “file-like objects” means objects with a “read” 
attribute, and the “read” method is called in preference to iteration or 
treating the parameter as a “bytes” object.

Despite the bug title, I don’t think the library should mess with the file 
position. Certainly not when making a single request. But it should already be 
possible for the caller to supply a custom iterable object that resets the file 
position:

class FileReiterator:
def __iter__(self):
self.file.seek(0)
while True:
chunk = self.file.read(self.chunksize)
yield chunk
if len(chunk) < self.chunksize:
break

--

___
Python tracker 

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



[issue35899] '_is_sunder' function in 'enum' module fails on empty string

2019-02-15 Thread Brennan D Baraban


Change by Brennan D Baraban <3...@holbertonschool.com>:


--
keywords: +patch
pull_requests: +11919
stage: needs patch -> patch review

___
Python tracker 

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



[issue35798] duplicate SyntaxWarning: "is" with a literal

2019-02-15 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset 4583525835baf8fc7bd49a60725d1e8c49ef92b3 by Serhiy Storchaka in 
branch 'master':
bpo-35798: Fix duplicate SyntaxWarning: "is" with a literal. (GH-11639)
https://github.com/python/cpython/commit/4583525835baf8fc7bd49a60725d1e8c49ef92b3


--

___
Python tracker 

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



[issue35798] duplicate SyntaxWarning: "is" with a literal

2019-02-15 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

This warning is not special. I'll add a helper for testing that all syntax 
warnings are emitted only once later.

--

___
Python tracker 

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



[issue34235] PyArg_ParseTupleAndKeywords: support required keyword arguments

2019-02-15 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

> I am missing how my PR changes the current behavior, though?

Sorry, I misunderstood your changes to the documentation.

Other option is to introduce a special symbol that makes the following 
parameters required if used after (or instead of) $. Like in "O|O$@O|O" or 
"O|O@O|O". It does not look nice too.

I think we should try several different ways and choose the one that has simple 
implementation, minimal performance penalty and looks less confusing.

--

___
Python tracker 

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



[issue15248] Better explain "TypeError: 'tuple' object is not callable"

2019-02-15 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset 62e4481238b82f111ffb1104a4b97099dd83ae2b by Serhiy Storchaka in 
branch 'master':
bpo-15248: Emit a compiler warning when missed a comma before tuple or list. 
(GH-11757)
https://github.com/python/cpython/commit/62e4481238b82f111ffb1104a4b97099dd83ae2b


--

___
Python tracker 

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



[issue15248] Better explain "TypeError: 'tuple' object is not callable"

2019-02-15 Thread Serhiy Storchaka


Change 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



[issue35688] "pip install --user numpy" fails on Python from the Windows Store

2019-02-15 Thread Eryk Sun


Eryk Sun  added the comment:

It may suit the needs of NumPy and SciPy to use an assembly for DLL 
dependencies. With an assembly it's possible for two DLLs with the same name to 
load in a process and possible for a DLL to extend the assembly search path 
with up to nine relative paths at load time. The target directory can be up to 
two levels above the DLL directory (e.g. "..\..\assembly_dir"). An assembly can 
thus be packaged as a common dependency for other packages, and packages can 
depend on different versions of the assembly.

For example, let's make a package that changes the _tkinter.pyd extension 
module to use a private assembly, which consists of the two DLL dependencies, 
"tcl86t.dll" and "tk86t.dll". 

Begin by copying "DLLs\_tkinter.pyd" to a package directory such as 
"Lib\site-packages\mytk". Modify the embedded #2 manifest in "_tkinter.pyd" 
(use mt.exe, or a GUI resource editor) to include a dependency on an assembly 
named "amd64_tcl_tk_8.6.6.0":

  

  

  

Next, add the following component configuration file beside the extension 
module, named "_tkinter.pyd.2.config":



  

  

  


This extends the assembly probing path that's used by the Fusion loader in the 
session server (csrss.exe). The Fusion loader probes for the assembly in four 
locations per directory. It checks for the assembly both as a DLL and as a 
manifest file, both in the directory and in a subdirectory that's named for the 
assembly. We'll be using a subdirectory with a manifest. 

"..\__winsxs__" resolves to "site-packages\__winsxs__". Create this directory 
and a subdirectory named "amd64_tcl_tk_8.6.6.0". To this, add the two DLL 
dependencies -- tcl86t.dll and tk86t.dll -- plus the following manifest file 
named "amd64_tcl_tk_8.6.6.0.manifest":








That's all it takes. If configured properly, you should be able to import the 
extension module via `from mytk import _tkinter`.

This will work in a virtual environment. However, I haven't checked whether the 
loader handles private assemblies in the same way in a store app. That's off my 
radar.

> packages need to adopt to calling AddDllDirectory. As long as 
> python is built with ctypes, this is easy enough to adopt, even 
> though there are some caveats

Avoid using ctypes.windll in libraries. It caches the ctypes.WinDLL instance, 
which caches function pointers. Projects that use the same DLLs thus can 
interfere with each other by setting incompatible prototypes. It also doesn't 
allow us to enable use_last_error to get reliable error handling. Also, the 
DLL_DIRECTORY_COOKIE return value is a pointer type, not a 32-bit integer. Even 
if we're not using it to cleanup afterwards (i.e. AddDllDirectory; 
LoadLibraryExW; RemoveDllDirectory), which we should be doing, we need the full 
64-bit value to reliably check for failure (NULL). By some fluke, the low DWORD 
of the cookie could be 0.

Here are the ctypes definitions using a private WinDLL instance and an errcheck 
function:

import ctypes
from ctypes import wintypes
kernel32 = ctypes.WinDLL('kernel32', use_last_error=True)

LOAD_LIBRARY_SEARCH_DEFAULT_DIRS = 0x1000

DLL_DIRECTORY_COOKIE = wintypes.LPVOID

def _errcheck_zero(result, func, args):
if not result:
raise ctypes.WinError(ctypes.get_last_error())
return args

kernel32.AddDllDirectory.errcheck = _errcheck_zero
kernel32.AddDllDirectory.restype = DLL_DIRECTORY_COOKIE
kernel32.AddDllDirectory.argtypes = (wintypes.LPCWSTR,)

kernel32.RemoveDllDirectory.errcheck = _errcheck_zero
kernel32.RemoveDllDirectory.argtypes = (DLL_DIRECTORY_COOKIE,)

kernel32.LoadLibraryExW.errcheck = _errcheck_zero
kernel32.LoadLibraryExW.restype = wintypes.HMODULE 
kernel32.LoadLibraryExW.argtypes = (
wintypes.LPCWSTR, wintypes.HANDLE, wintypes.DWORD)

Don't call SetDefaultDllDirectories. Use LoadLibraryExW(path, None, 
LOAD_LIBRARY_SEARCH_DEFAULT_DIRS).

--
nosy: +eryksun

___
Python tracker 

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



[issue34235] PyArg_ParseTupleAndKeywords: support required keyword arguments

2019-02-15 Thread Michael Sullivan


Michael Sullivan  added the comment:

A downside of the "allow $ twice" approach is that it means splitting up the 
positional arguments, and a lot of the processing loop is built around the 
assumption that the index into the keyword list and the index into the argument 
tuple coincide (for positional arguments).

It can certainly be done, but I worry it'll be an invasive change

--

___
Python tracker 

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



[issue33618] Support TLS 1.3

2019-02-15 Thread Chih-Hsuan Yen


Change by Chih-Hsuan Yen :


--
nosy:  -yan12125

___
Python tracker 

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



[issue35997] ImportError: dlopen failed: cannot locate symbol "PyBool_Type"

2019-02-15 Thread muhzi


muhzi  added the comment:

Ah! I used the option -Bsymbolic while linking the extension to make it work 
and it did, but I figure it is not ideal. I will be checking that patch!

--
components: +Extension Modules -Regular Expressions

___
Python tracker 

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



[issue36008] [good first issue] Update documentation for 3.8

2019-02-15 Thread Mariatta Wijaya


Mariatta Wijaya  added the comment:

Assigning this to me, to be worked on the mentored sprint at PyCon US Cleveland.
Thanks.

--
assignee: docs@python -> Mariatta
nosy: +Mariatta

___
Python tracker 

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



[issue33618] Support TLS 1.3

2019-02-15 Thread Zhiming Wang


Change by Zhiming Wang :


--
nosy: +zmwangx

___
Python tracker 

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



[issue36008] [good first issue] Update documentation for 3.8

2019-02-15 Thread Cheryl Sabella


New submission from Cheryl Sabella :

Please save this issue for a new contributor.  If you have previously made a 
pull request to CPython, consider leaving this issue for someone else.  Thanks!

Similar to what PR 9501 did for updating references in the docs from 3.6 to 
3.7, an update needs to be done for 3.8.

--
assignee: docs@python
components: Documentation
keywords: easy
messages: 335663
nosy: cheryl.sabella, docs@python
priority: normal
severity: normal
stage: needs patch
status: open
title: [good first issue] Update documentation for 3.8
type: enhancement
versions: Python 3.8

___
Python tracker 

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



[issue27181] Add geometric mean to `statistics` module

2019-02-15 Thread Cheryl Sabella


Cheryl Sabella  added the comment:

Updating the version in case this wanted to be considered for 3.8.

--
versions: +Python 3.8 -Python 3.7

___
Python tracker 

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



[issue21018] [patch] added missing documentation about escaping characters for configparser

2019-02-15 Thread Cheryl Sabella


Change by Cheryl Sabella :


--
versions:  -Python 3.6

___
Python tracker 

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



[issue36004] Add datetime.fromisocalendar

2019-02-15 Thread Paul Ganssle


Paul Ganssle  added the comment:

I have a first-pass PR, a few questions to address:


1. Should it take three arguments or a single 3-tuple? (I've gone with 3 
arguments)
2. Since all three arguments are required, should we make them positional-only?
3. Should we allow time components in the `datetime` flavor of this? If so, I 
think we would also want datetime.isocalendar() to return a longer tuple, which 
would be backwards incompatible.
4. Should we add a `tz` argument in the datetime flavor?

I think for questions 3 and 4 the answer is no, modelling after 
.toordinal/.fromordinal.

--

___
Python tracker 

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



[issue35813] shared memory construct to avoid need for serialization between processes

2019-02-15 Thread Davin Potts


Davin Potts  added the comment:

Regarding the API of the SharedMemory class, its flags, mode, and read_only 
parameters are not universally enforced or simply not implemented on all 
platforms that offer POSIX Shared Memory or Windows Named Shared Memory.  A 
simplified API for the SharedMemory class that behaves consistently across all 
platforms would avoid confusion for users.  For users who have specific need of 
flags/mode/read_only controls on a platform that they know does indeed respect 
that control, they should still have a mechanism to leverage those controls.

I propose a simpler, consistent-across-platforms API like:
SharedMemory(name=None, create=False, size=0)

*name* and *size* retain their purpose though the former now defaults to 
None.
*create* is set to False to indicate no new shared memory block is to be
created because we only wish to attach to an already existing shared memory
block.  When set to True, a new shared memory block will be created unless
one already exists with the supplied unique name, in which case that block
will be attached to and used.

Example of attaching to an already existing shared memory block:
SharedMemory(name='uniquename')
Example of creating a new shared memory block where any new name will do:
SharedMemory(create=True, size=128)
Example of creating/attaching a shared memory block with a specific name:
SharedMemory(name='specialsnowflake', create=True, size=4096)


Even with its simplified API, SharedMemory will continue to be powered by 
PosixSharedMemory on systems where "POSIX Shared Memory" is implemented and 
powered by NamedSharedMemory on Windows systems.  The API for PosixSharedMemory 
will remain essentially unchanged from its current form:
PosixSharedMemory(name=None, flags=None, mode=0o600, size=0, 
read_only=False)
The API for NamedSharedMemory will be updated to no longer attempt to mirror 
its POSIX counterpart:
NamedSharedMemory(name=None, create=False, size=0, read_only=False)

To be clear:  the inconsistencies motivating this proposed API change is *not* 
only arising from differences between Windows and POSIX-supporting systems.  
For example, among systems implementing POSIX shared memory, the mode flag 
(which promises control over whether user/group/others can read/write to a 
shared memory block) is often but not always ignored; it differs from one OS to 
the next.


Alternatives/variations to this proposed API change:

* Leave the current APIs alone where all 3 classes have identical APIs.  
Feedback in discussions and from those experimenting with the code suggests 
this is creating confusion.

* Change all 3 classes to have the matching APIs again.  This unnecessarily 
thwarts the ability of users to exploit functionality that they know to be 
there on specific target platforms that they care about.

* Do not expose flags/mode/read_only as part of the input paramemters to 
PosixSharedMemory/NamedSharedMemory but do expose them as class attributes 
instead.  This arguably makes things unnecessarily complicated.  This is not a 
simple topic but its complexity can be treated in a more straightforward way.

* Use a parameter name other than 'create' (e.g. 'attach_only') in the newly 
proposed API.

* Make all input parameters keyword-only for greater flexibility in the API in 
the future.

--

___
Python tracker 

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



[issue36004] Add datetime.fromisocalendar

2019-02-15 Thread Paul Ganssle


Change by Paul Ganssle :


--
keywords: +patch
pull_requests: +11918
stage:  -> patch review

___
Python tracker 

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



[issue36007] python3.8 a1 - docs build requires sphinx 1.7 but uses a 1.8 feature

2019-02-15 Thread Mariatta Wijaya


Change by Mariatta Wijaya :


--
versions:  -Python 3.7

___
Python tracker 

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



[issue35886] Move PyInterpreterState into Include/internal/pycore_pystate.h

2019-02-15 Thread Eric Snow


Eric Snow  added the comment:

Thanks, Victor!

python-dev: 
https://mail.python.org/pipermail/python-dev/2019-February/156344.html

Also, my PR already has a What's New entry in the porting section. :)

--

___
Python tracker 

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



[issue36007] python3.8 a1 - docs build requires sphinx 1.7 but uses a 1.8 feature

2019-02-15 Thread miss-islington


miss-islington  added the comment:


New changeset a16ab00c0b8e126ab82e7cb5098af3ea32d315ff by Miss Islington (bot) 
(Anthony Sottile) in branch 'master':
bpo-36007: Bump minimum sphinx version to 1.8 (GH-11887)
https://github.com/python/cpython/commit/a16ab00c0b8e126ab82e7cb5098af3ea32d315ff


--
nosy: +miss-islington

___
Python tracker 

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



[issue36007] python3.8 a1 - docs build requires sphinx 1.7 but uses a 1.8 feature

2019-02-15 Thread Mariatta Wijaya


Mariatta Wijaya  added the comment:

Thanks!

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

___
Python tracker 

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



[issue30449] Improve __slots__ datamodel documentation

2019-02-15 Thread Cheryl Sabella


Change by Cheryl Sabella :


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



[issue36007] python3.8 a1 - docs build requires sphinx 1.7 but uses a 1.8 feature

2019-02-15 Thread Anthony Sottile


Change by Anthony Sottile :


--
keywords: +patch
pull_requests: +11917
stage:  -> patch review

___
Python tracker 

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



[issue23077] PEP 1: Allow Provisional status for PEPs

2019-02-15 Thread Cheryl Sabella


Cheryl Sabella  added the comment:

Closing as third party since this moved to the PEP repository.

--
resolution:  -> third party
stage: needs patch -> 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



[issue32808] subprocess.check_output opens an unwanted command line window after fall creator update

2019-02-15 Thread Cheryl Sabella


Change by Cheryl Sabella :


--
resolution:  -> works for me
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



[issue36007] python3.8 a1 - docs build requires sphinx 1.7 but uses a 1.8 feature

2019-02-15 Thread Mariatta Wijaya


Mariatta Wijaya  added the comment:

Let's up the sphinx version. 
Thanks.

--
nosy: +Mariatta

___
Python tracker 

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



[issue36007] python3.8 a1 - docs build requires sphinx 1.7 but uses a 1.8 feature

2019-02-15 Thread Anthony Sottile


New submission from Anthony Sottile :

doctest `:skipif:` was added in https://github.com/sphinx-doc/sphinx/issues/5273

Used here: 
https://github.com/python/cpython/blame/36433221f06d649dbd7e13f5fec948be8ffb90af/Doc/library/turtle.rst#L252-L253

Sphinx minimum version configured here: 
https://github.com/python/cpython/blob/36433221f06d649dbd7e13f5fec948be8ffb90af/Doc/conf.py#L44-L45

Should this be upped to 1.8 or should the :skipif: be removed?  My guess is the 
former, I'd be happy to contribute a patch

I hit this while packaging 3.8.0a1 for deadsnakes

--
assignee: docs@python
components: Build, Documentation
messages: 335654
nosy: Anthony Sottile, docs@python
priority: normal
severity: normal
status: open
title: python3.8 a1 - docs build requires sphinx 1.7 but uses a 1.8 feature
versions: Python 3.8

___
Python tracker 

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



[issue35810] Object Initialization does not incref Heap-allocated Types

2019-02-15 Thread Eric Snow


Change by Eric Snow :


--
nosy: +eric.snow

___
Python tracker 

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



[issue35984] test__xxsubinterpreters leaked [3, 4, 3] memory blocks, sum=1

2019-02-15 Thread Eric Snow


Eric Snow  added the comment:

Thanks, Alexey.  I've merged the PR.

As to finding and fixing leaks, I'd welcome any help you have to offer. :)  
Feel free to open an separate issue.  One issue covering all the ones you find 
should be enough.  If you find any non-trivial leaks or other issues then they 
should probably get separate issues.  Thanks again!

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



[issue35984] test__xxsubinterpreters leaked [3, 4, 3] memory blocks, sum=1

2019-02-15 Thread miss-islington


miss-islington  added the comment:


New changeset 36433221f06d649dbd7e13f5fec948be8ffb90af by Miss Islington (bot) 
(Alexey Izbyshev) in branch 'master':
bpo-35984: _xxsubinterpreters: Fix memory leak in _channel_send() (GH-11845)
https://github.com/python/cpython/commit/36433221f06d649dbd7e13f5fec948be8ffb90af


--
nosy: +miss-islington

___
Python tracker 

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



[issue35459] Use PyDict_GetItemWithError() instead of PyDict_GetItem()

2019-02-15 Thread Eric Snow


Eric Snow  added the comment:

Thanks, Serhiy.  While the benchmark suite is our best tool available for 
measuring performance, I'm not sure what slowdown is significant in those 
results.

@Victor, any thoughts?

--

___
Python tracker 

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



[issue22213] Make pyvenv style virtual environments easier to configure when embedding Python

2019-02-15 Thread Eric Snow


Eric Snow  added the comment:

On Wed, Feb 13, 2019 at 5:09 PM Steve Dower  wrote:
> This is why I'm keen to design the ideal *user* API first (that is, write the 
> examples of how you would use it) and then figure out how we can make it fit.
> It's kind of the opposite approach from what you've been doing to adapt the 
> existing code to suit particular needs.

That makes sense. :)

> For example, imagine instead of all the PySet*() functions followed by 
> Py_Initialize() you could do this:
>
> PyObject *runtime = PyRuntime_Create();

FYI, we already have a _PyRuntimeState struct (see
Include/internal/pycore_pystate.h) which is where I pulled in a lot of
the static globals last year.  Now there is one process-global
_PyRuntime (created in Python/pylifecycle.c) in place of all those
globals.  Note that _PyRuntimeState is in parallel with
PyInterpreterState, so not a PyObject.

> /* optional calls */
> PyRuntime_SetAllocators(runtime, _malloc, _realloc, _free);
> PyRuntime_SetHashSeed(runtime, 12345);

Note that one motivation behind PEP 432 (and its config structs) is to
keep all the config together.  Having the one struct means you always
clearly see what your options are.  Another motivation is to keep the
config (dense with public fields) separate from the actual run state
(opaque).  Having a bunch of config functions (and global variables in
the status quo) means a lot more surface area to deal with when
embedding, as opposed to 2 config structs + a few initialization
functions (and a couple of helpers) like in PEP 432.

I don't know that you consciously intended to move away from the dense
config struct route, so I figured I'd be clear. :)

> /* sets this as the current runtime via a thread local */
> auto old_runtime = PyRuntime_Activate(runtime);
> assert(old_runtime == NULL)

Hmm, there are two ways we could go with this: keep using TLS (or
static global in the case of _PyRuntime) or update the C-API to
require explicitly passing the context (e.g. runtime, interp, tstate,
or some wrapper) into all the functions that need it.  Of course,
changing that would definitely need some kind of compatibility shim to
avoid requiring massive changes to every extension out there, which
would mean effectively 2 C-APIs mirroring each other.  So sticking
with TLS is simpler.  Personally, I'd prefer going the explicit
argument route.

>
> /* pretend triple quoting works in C for a minute ;) */
> const char *init_code = """
> [snip]
> """;
>
> PyObject *globals = PyDict_New();
> /* only UTF-8 support at this stage */
> PyDict_SetItemString(globals, "argv0", PyUnicode_FromString(argv[0]));
> PyRuntime_Initialize(runtime, init_code, globals);

Nice.  I like that this keeps the init code right by where it's used,
while also making it much more concise and easier to follow (since
it's Python code).

> PyEval_EvalString("open('file.txt', 'w', encoding='gb18030').close()");

I definitely like the approach of directly embedding the Python code
like this. :)  Are there any downsides?

> Maybe it's a terrible idea?

Nah, we definitely want to maximize simplicity and your example offers
a good shift in that direction. :)

> Honestly I'd be inclined to do other big changes at the same time (make 
> PyObject opaque and interface driven, for example).

Definitely!  Those aren't big blockers on cleaning up initialization
though, are they?

> My point is that if the goal is to "move the existing internals around" then 
> that's all we'll ever achieve. If we can say "the goal is to make this 
> example work" then we'll be able to do much more.

Yep.  I suppose part of the problem is that the embedding use cases
aren't understood (or even recognized) well enough.

--

___
Python tracker 

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



[issue36006] [good first issue] Align version changed for truncate in io module

2019-02-15 Thread miss-islington


miss-islington  added the comment:


New changeset 05f41363d4876a63acd8016cbf56b4f4e809e41f by Miss Islington (bot) 
in branch '3.7':
bpo-36006: Fix versionchanged directive alignment in io module documentation 
(GH-11881)
https://github.com/python/cpython/commit/05f41363d4876a63acd8016cbf56b4f4e809e41f


--

___
Python tracker 

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



[issue35931] pdb: "debug print(" crashes with SyntaxError

2019-02-15 Thread daniel hahler


daniel hahler  added the comment:

Thanks for the review and backport!

--

___
Python tracker 

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



[issue36006] [good first issue] Align version changed for truncate in io module

2019-02-15 Thread Emmanuel Arias


Change by Emmanuel Arias :


--
keywords: +patch
pull_requests: +11914
stage: needs patch -> patch review

___
Python tracker 

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



[issue35996] Optional modulus argument for new math.prod() function

2019-02-15 Thread Raymond Hettinger


Change by Raymond Hettinger :


--
nosy: +tim.peters

___
Python tracker 

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



[issue22213] Make pyvenv style virtual environments easier to configure when embedding Python

2019-02-15 Thread Eric Snow


Eric Snow  added the comment:

On Wed, Feb 13, 2019 at 10:56 AM Steve Dower  wrote:
> Nick, Victor, Eric, (others?) - are you interested in having a virtual 
> whiteboard session to brainstorm how the "perfect" initialization looks? And 
> probably a follow-up to brainstorm how to get there without breaking the 
> world? I don't think we're going to get to be in the same room anytime before 
> the language summit, and it would be awesome to have something concrete to 
> discuss there.

Count me in.  This is a pretty important topic and doing this would
help accelerate our efforts by giving us a clearer common
understanding and objective.  FWIW, I plan on spending at least 5
minutes of my 25 minute PyCon talk on our efforts to fix up the C-API,
and this runtime initialization stuff is an important piece.

--

___
Python tracker 

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



[issue35931] pdb: "debug print(" crashes with SyntaxError

2019-02-15 Thread Zachary Ware


Zachary Ware  added the comment:

Thanks for the patch!

--
nosy: +zach.ware
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.7

___
Python tracker 

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



[issue35931] pdb: "debug print(" crashes with SyntaxError

2019-02-15 Thread miss-islington


miss-islington  added the comment:


New changeset 6f352199e4447764bc472e34352d0dff4db8a52d by Miss Islington (bot) 
in branch '3.7':
bpo-35931: Gracefully handle SyntaxError in pdb debug command (GH-11782)
https://github.com/python/cpython/commit/6f352199e4447764bc472e34352d0dff4db8a52d


--

___
Python tracker 

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



[issue35931] pdb: "debug print(" crashes with SyntaxError

2019-02-15 Thread miss-islington


miss-islington  added the comment:


New changeset 4327705cfab3eb09073ec828570bbd8f789e1611 by Miss Islington (bot) 
(Daniel Hahler) in branch 'master':
bpo-35931: Gracefully handle SyntaxError in pdb debug command (GH-11782)
https://github.com/python/cpython/commit/4327705cfab3eb09073ec828570bbd8f789e1611


--
nosy: +miss-islington

___
Python tracker 

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



[issue35931] pdb: "debug print(" crashes with SyntaxError

2019-02-15 Thread miss-islington


Change by miss-islington :


--
pull_requests: +11916

___
Python tracker 

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



[issue35899] '_is_sunder' function in 'enum' module fails on empty string

2019-02-15 Thread Brennan D Baraban


Brennan D Baraban <3...@holbertonschool.com> added the comment:

Yes, I will submit a new PR today.

--

___
Python tracker 

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



[issue35931] pdb: "debug print(" crashes with SyntaxError

2019-02-15 Thread Emmanuel Arias


Emmanuel Arias  added the comment:

ping reviewer :-)

I test this PR and work fine on Ubuntu 18.04

--
nosy: +eamanu

___
Python tracker 

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



[issue35925] test_httplib test_nntplib test_ssl fail on ARMv7 Debian buster bot (OpenSSL 1.1.1a)

2019-02-15 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

FWIW I've just manually confirmed that running Python 2.7's test_ssl with 
OPENSSL_CONF=/invalid-path set passes on the debian buster buildbot host.

--

___
Python tracker 

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



[issue36004] Add datetime.fromisocalendar

2019-02-15 Thread Emmanuel Arias


Emmanuel Arias  added the comment:

+1

--
nosy: +eamanu

___
Python tracker 

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



[issue35925] test_httplib test_nntplib test_ssl fail on ARMv7 Debian buster bot (OpenSSL 1.1.1a)

2019-02-15 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

release managers are free to defer this blocker.  i'm just marking it as such 
for the purposes of making sure it is a conscious decision.

The problem is more likely with our test suite vs the environment than it is 
with CPython itself.

--

___
Python tracker 

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



[issue35925] test_httplib test_nntplib test_ssl fail on ARMv7 Debian buster bot (OpenSSL 1.1.1a)

2019-02-15 Thread Gregory P. Smith


Change by Gregory P. Smith :


--
title: test_httplib test_nntplib test_ssl fail on ARMv7 Debian buster buildbot 
-> test_httplib test_nntplib test_ssl fail on ARMv7 Debian buster bot (OpenSSL 
1.1.1a)

___
Python tracker 

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



[issue35925] test_httplib test_nntplib test_ssl fail on ARMv7 Debian buster buildbot

2019-02-15 Thread Gregory P. Smith


Change by Gregory P. Smith :


--
nosy: +benjamin.peterson, ned.deily
priority: normal -> release blocker
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



[issue35925] test_httplib test_nntplib test_ssl fail on ARMv7 Debian buster buildbot

2019-02-15 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

Not on this debian buster bot.  look back a couple comments, there is a 
workaround.  it seems to be an OpenSSL configuration issue / test expectations 
issue.

I think we should ultimately get our test suite so that it passes in default OS 
distro OpenSSL configs.

That could mean any of an altered environment for some tests, or skipping some 
tests in such an environment, or changing some tests to fit within modern 
OpenSSL desired ciphersuite/protocol setting constrains constraints - or a mix 
of all three.

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



[issue36006] [good first issue] Align version changed for truncate in io module

2019-02-15 Thread miss-islington


miss-islington  added the comment:


New changeset 522630a7462f606300f1e6e6818de191d9dc3fdf by Miss Islington (bot) 
(Emmanuel Arias) in branch 'master':
bpo-36006: Fix versionchanged directive alignment in io module documentation 
(GH-11881)
https://github.com/python/cpython/commit/522630a7462f606300f1e6e6818de191d9dc3fdf


--
nosy: +miss-islington

___
Python tracker 

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



[issue36006] [good first issue] Align version changed for truncate in io module

2019-02-15 Thread miss-islington


Change by miss-islington :


--
pull_requests: +11915

___
Python tracker 

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



[issue36006] [good first issue] Align version changed for truncate in io module

2019-02-15 Thread Mariatta Wijaya


Mariatta Wijaya  added the comment:

Thanks!

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



[issue35998] test_asyncio: test_start_tls_server_1() TimeoutError on Fedora 29

2019-02-15 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

I can confirm that this fails on a fresh fedora 29 VM as of commit 355f16f. The 
changes in PR 10011 make this test pass.

SSL version and OS details

$ cat /etc/fedora-release
Fedora release 29 (Twenty Nine)
$ uname -a
Linux fedora-s-1vcpu-1gb-blr1-01 4.20.7-200.fc29.x86_64 #1 SMP Wed Feb 6 
19:16:42 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
$ ./python -m test.pythoninfo | grep ssl
ssl.HAS_SNI: True
ssl.OPENSSL_VERSION: OpenSSL 1.1.1a FIPS  20 Nov 2018
ssl.OPENSSL_VERSION_INFO: (1, 1, 1, 1, 15)
ssl.OP_ALL: 0x8054
ssl.OP_NO_TLSv1_1: 0x1000

# Test failure with tracemalloc

$ ./python -X tracemalloc -m unittest -v 
test.test_asyncio.test_sslproto.SelectorStartTLSTests
test_buf_feed_data (test.test_asyncio.test_sslproto.SelectorStartTLSTests) ... 
ok
test_create_connection_ssl_failed_certificate 
(test.test_asyncio.test_sslproto.SelectorStartTLSTests) ... ok
test_create_connection_ssl_slow_handshake 
(test.test_asyncio.test_sslproto.SelectorStartTLSTests) ... ok
test_handshake_timeout (test.test_asyncio.test_sslproto.SelectorStartTLSTests) 
... ok
test_start_tls_client_buf_proto_1 
(test.test_asyncio.test_sslproto.SelectorStartTLSTests) ... ok
test_start_tls_client_corrupted_ssl 
(test.test_asyncio.test_sslproto.SelectorStartTLSTests) ... ok
test_start_tls_client_reg_proto_1 
(test.test_asyncio.test_sslproto.SelectorStartTLSTests) ... ok
test_start_tls_server_1 (test.test_asyncio.test_sslproto.SelectorStartTLSTests) 
... /root/cpython/Lib/asyncio/sslproto.py:321: ResourceWarning: unclosed 
transport 
  _warn(f"unclosed transport {self!r}", ResourceWarning, source=self)
Object allocated at (most recent call last):
  File "/root/cpython/Lib/asyncio/sslproto.py", lineno 446
self._app_transport = _SSLProtocolTransport(self._loop, self)
ERROR
test_start_tls_slow_client_cancel 
(test.test_asyncio.test_sslproto.SelectorStartTLSTests) ... Unhandled error in 
exception handler
context: {'message': 'Future exception was never retrieved', 'exception': 
ConnectionResetError(104, 'Connection reset by peer'), 'future': }
Traceback (most recent call last):
  File "/root/cpython/Lib/asyncio/base_events.py", line 1653, in 
call_exception_handler
self._exception_handler(self, context)
  File "/root/cpython/Lib/test/test_asyncio/functional.py", line 22, in 
loop_exception_handler
self.loop.default_exception_handler(context)
AttributeError: 'NoneType' object has no attribute 'default_exception_handler'
/root/cpython/Lib/asyncio/base_events.py:675: ResourceWarning: unclosed 

  timer = events.TimerHandle(when, callback, args, self, context)
Object allocated at (most recent call last):
  File "/root/cpython/Lib/asyncio/base_events.py", lineno 1360
sock = socket.socket(af, socktype, proto)
ok
test_start_tls_wrong_args 
(test.test_asyncio.test_sslproto.SelectorStartTLSTests) ... ok

==
ERROR: test_start_tls_server_1 
(test.test_asyncio.test_sslproto.SelectorStartTLSTests)
--
Traceback (most recent call last):
  File "/root/cpython/Lib/test/test_asyncio/test_sslproto.py", line 510, in 
test_start_tls_server_1
self.loop.run_until_complete(run_main())
  File "/root/cpython/Lib/asyncio/base_events.py", line 589, in 
run_until_complete
return future.result()
  File "/root/cpython/Lib/test/test_asyncio/test_sslproto.py", line 503, in 
run_main
await asyncio.wait_for(
  File "/root/cpython/Lib/asyncio/tasks.py", line 461, in wait_for
raise exceptions.TimeoutError()
asyncio.exceptions.TimeoutError

--
Ran 10 tests in 63.797s

FAILED (errors=1)

# With PR 10011 applied to Fedora

$ ./python -X tracemalloc -m unittest -v 
test.test_asyncio.test_sslproto.SelectorStartTLSTests
test_buf_feed_data (test.test_asyncio.test_sslproto.SelectorStartTLSTests) ... 
ok
test_create_connection_ssl_failed_certificate 
(test.test_asyncio.test_sslproto.SelectorStartTLSTests) ... ok
test_create_connection_ssl_slow_handshake 
(test.test_asyncio.test_sslproto.SelectorStartTLSTests) ... ok
test_handshake_timeout (test.test_asyncio.test_sslproto.SelectorStartTLSTests) 
... ok
test_start_tls_client_buf_proto_1 
(test.test_asyncio.test_sslproto.SelectorStartTLSTests) ... ok
test_start_tls_client_corrupted_ssl 
(test.test_asyncio.test_sslproto.SelectorStartTLSTests) ... ok
test_start_tls_client_reg_proto_1 
(test.test_asyncio.test_sslproto.SelectorStartTLSTests) ... ok
test_start_tls_server_1 (test.test_asyncio.test_sslproto.SelectorStartTLSTests) 
... ok
test_start_tls_slow_client_cancel 
(test.test_asyncio.test_sslproto.SelectorStartTLSTests) ... ok
test_start_tls_wrong_args 
(test.test_asyncio.test_sslproto.SelectorStartTLSTests) ... ok

--
Ran 10 tests in 3.734s

OK

--
nosy: +pablogsal


[issue36006] [good first issue] Align version changed for truncate in io module

2019-02-15 Thread Emmanuel Arias


Emmanuel Arias  added the comment:

I take it

--
nosy: +eamanu

___
Python tracker 

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



[issue32947] Support OpenSSL 1.1.1

2019-02-15 Thread Chih-Hsuan Yen


Change by Chih-Hsuan Yen :


--
nosy:  -yan12125

___
Python tracker 

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



[issue36006] [good first issue] Align version changed for truncate in io module

2019-02-15 Thread Cheryl Sabella


New submission from Cheryl Sabella :

In the documentation page for the io module, under the truncate method, there 
is a version changed directive which is not properly aligned.

https://docs.python.org/3/library/io.html#io.IOBase.truncate

--
assignee: docs@python
components: Documentation
keywords: easy
messages: 335633
nosy: cheryl.sabella, docs@python
priority: normal
severity: normal
stage: needs patch
status: open
title: [good first issue] Align version changed for truncate in io module
type: enhancement
versions: Python 3.7, Python 3.8

___
Python tracker 

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



[issue33570] OpenSSL 1.1.1 / TLS 1.3 cipher suite changes

2019-02-15 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset c3c49ec56890d9d591f8fd1609c8436019f28f96 by Victor Stinner 
(stratakis) in branch '2.7':
[2.7] bpo-33570: Enable OpenSSL 1.1.1 testing within the multissltests 
(GH-11879)
https://github.com/python/cpython/commit/c3c49ec56890d9d591f8fd1609c8436019f28f96


--

___
Python tracker 

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



[issue35928] socket makefile read-write discards received data

2019-02-15 Thread nr


nr  added the comment:

Added PR 11878, this will pass both this bug report and PR 3918 regression, the 
commit Ammar noted, it is an addition to this change.

--
nosy: +nr

___
Python tracker 

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



[issue35925] test_httplib test_nntplib test_ssl fail on ARMv7 Debian buster buildbot

2019-02-15 Thread STINNER Victor


STINNER Victor  added the comment:

Does test_ssl pass on the master branch?

--
nosy: +vstinner

___
Python tracker 

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



[issue35998] test_asyncio: test_start_tls_server_1() TimeoutError on Fedora 29

2019-02-15 Thread Charalampos Stratakis


Charalampos Stratakis  added the comment:

Fedora 29 has openssl 1.1.1 which seems to be related.

--
nosy: +cstratak

___
Python tracker 

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



[issue35998] test_asyncio: test_start_tls_server_1() TimeoutError on Fedora 29

2019-02-15 Thread STINNER Victor


Change by STINNER Victor :


--
title: ./python -m test test_asyncio fails -> test_asyncio: 
test_start_tls_server_1() TimeoutError on Fedora 29

___
Python tracker 

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



[issue36005] [2.7] test_ssl failures on ARMv7 Ubuntu 2.7 with OpenSSL 1.1.1a

2019-02-15 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

i duped this to the existing issue that was filed after the OS upgrade under 
the assumption it is the same thing.

--

___
Python tracker 

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



[issue36005] [2.7] test_ssl failures on ARMv7 Ubuntu 2.7 with OpenSSL 1.1.1a

2019-02-15 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

The buildbot was only offline for a few days while I upgraded the OS.  do not 
look at the _delta_ between builds in the buildbot to determine a failure 
across that change as it went from ubuntu 14.04 to debian buster.

2.7 doesn't change often.

--

___
Python tracker 

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



[issue36005] [2.7] test_ssl failures on ARMv7 Ubuntu 2.7 with OpenSSL 1.1.1a

2019-02-15 Thread Gregory P. Smith


Change by Gregory P. Smith :


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



[issue36005] [2.7] test_ssl failures on ARMv7 Ubuntu 2.7 with OpenSSL 1.1.1a

2019-02-15 Thread Gregory P. Smith


Change by Gregory P. Smith :


--
superseder:  -> test_httplib test_nntplib test_ssl fail on ARMv7 Debian buster 
buildbot

___
Python tracker 

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



[issue35998] ./python -m test test_asyncio fails

2019-02-15 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

Not sure if it's related but there was a similar report on failure in freebsd 
bots with tls1.3 : issue35031 . Can you please add SSL info with ./python -m 
test.pythoninfo | grep ssl ?

Test runs fine on my ubuntu 16.04 machine with below info

$ ./python -m test.pythoninfo | grep ssl
ssl.HAS_SNI: True
ssl.OPENSSL_VERSION: OpenSSL 1.0.2g  1 Mar 2016
ssl.OPENSSL_VERSION_INFO: (1, 0, 2, 7, 15)
ssl.OP_ALL: 0x83ff
ssl.OP_NO_TLSv1_1: 0x1000

--
nosy: +xtreak

___
Python tracker 

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



[issue35997] ImportError: dlopen failed: cannot locate symbol "PyBool_Type"

2019-02-15 Thread Xavier de Gaye


Xavier de Gaye  added the comment:

It is not yet possible to cross-compile python extensions. The reason is that 
_init_posix() in  Lib/sysconfig.py still reads the sysconfigdata module of the 
native compiler instead of the sysconfigdata of the cross-built one. See the 
patch in issue #28833.

--

___
Python tracker 

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



[issue32947] Support OpenSSL 1.1.1

2019-02-15 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 2149a9ad7a9d39d7d680ec0fb602042c91057484 by Victor Stinner 
(stratakis) in branch '2.7':
[2.7] bpo-32947: Fixes for TLS 1.3 and OpenSSL 1.1.1 (GH-8761) (GH-11876)
https://github.com/python/cpython/commit/2149a9ad7a9d39d7d680ec0fb602042c91057484


--

___
Python tracker 

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



[issue35998] ./python -m test test_asyncio fails

2019-02-15 Thread STINNER Victor


Change by STINNER Victor :


--
nosy: +vstinner

___
Python tracker 

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



[issue5038] urrlib2/httplib doesn't reset file position between requests

2019-02-15 Thread nr


nr  added the comment:

PR 11843 should fix the issue in master, I didn't check python 2.6 or prior 
versions. The problem is that in the first request sent to HTTP service the 
POST data is sent correctly. After that the HTTP server responds with 401 and 
the request is resent but the mmap file pointer is pointing now to the end of 
the file because it has been fully read in the requests before. The PR just 
seeks to the beginning of the file after the file has been read and sends the 
request with auth credentials including POST body.

--
nosy: +nr

___
Python tracker 

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



[issue35998] ./python -m test test_asyncio fails

2019-02-15 Thread STINNER Victor


Change by STINNER Victor :


--
components: +Tests, asyncio
nosy: +asvetlov, yselivanov

___
Python tracker 

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



[issue33570] OpenSSL 1.1.1 / TLS 1.3 cipher suite changes

2019-02-15 Thread Charalampos Stratakis


Change by Charalampos Stratakis :


--
pull_requests: +11913

___
Python tracker 

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



[issue35813] shared memory construct to avoid need for serialization between processes

2019-02-15 Thread Davin Potts


Davin Potts  added the comment:

These questions (originally asked in comments on GH-11816) seemed more 
appropriate to discuss here:
Why should the user want to use `SharedMemory` directly?
Why not just go through the manager?  Also, perhaps a
naive question: don't you _always_ need a `start()`ed
manager in order for the processes to communicate?
Doesn't `SharedMemoryServer` has to be involved?

I think it helps to discuss the last question first.  A SharedMemoryManager is 
*not* needed for two processes to share information across a shared memory 
block, nor is a SharedMemoryServer required.  The docs have examples 
demonstrating this but here is another meant to showcase exactly this:

Start up a Python shell and do the following:
>>> from multiprocessing import shared_memory
>>> shm = shared_memory.SharedMemory(name=None, size=10)
>>> shm.buf[:5] = b'Feb15'
>>> shm.name  # Note this name and use it in the next steps
'psm_26792_26631'

Start up a second Python shell in a new window and do the following:
>>> from multiprocessing import shared_memory
>>> also_shm = shared_memory.SharedMemory(name='psm_26792_26631')  # 
Use that same name
>>> bytes(also_shm.buf[:5])
b'Feb15'

If also_shm.buf is further modified in the second shell, those
changes will be visible on shm.buf in the first shell.  The same
is true of the reverse.

The key point is that there is no sending of messages between the processes at 
all.  In stark contrast, SyncManager offers and supports objects held in 
"distributed shared memory" where messages must be sent from one process to 
another to access or manipulate data; those objects held in "distributed shared 
memory" *must* have a SyncManager+Server to enable their use.  That is not 
needed at all for SharedMemory because access to and manipulation of the data 
is performed directly without the cost-delay of messaging.

This begs a new question, "so what is the SharedMemoryManager used for then?"  
The docs answer:
To assist with the life-cycle management of shared memory
especially across distinct processes, a BaseManager subclass,
SharedMemoryManager, is also provided.
Because shared memory blocks are not "owned" by a single process, they are not 
destroyed/freed when a process exits.  A SharedMemoryManager is used to ensure 
the free-ing of a shared memory block when it is no longer needed.

New SharedMemory instances may be created via a SharedMemoryManager (in which 
case their birth-to-death life-cycle is being managed) or they may be created 
directly as seen in the above example.  Returning to the first question, "Why 
should the user want to use `SharedMemory` directly?", there are more use cases 
than these two:
1. In process 1, a shared memory block is created by calling 
SharedMemoryManager.SharedMemory().  In process 2, we need to attach to that 
existing shared memory block and can do so by referring to its name.  This is 
accomplished as in the above example by simply calling 
SharedMemory(name='uniquename').  We do not want to attach to it via a second 
SharedMemoryManager because only one manager should oversee the life-cycle of a 
single shared memory block.
2. Sometimes direct management of the life-cycle of a shared memory block is 
desirable.  For example, on systems supporting POSIX shared memory, it is a 
feature that shared memory blocks outlive processes.  Some services choose to 
speed a service restart by preserving state data in shared memory, saving the 
newly restarted service from rebuilding it.  The SharedMemoryManager provides 
one life-cycle strategy but can not cover all scenarios so the option to 
directly manage it is important.

--

___
Python tracker 

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



[issue36005] [2.7] test_ssl failures on ARMv7 Ubuntu 2.7 with OpenSSL 1.1.1a

2019-02-15 Thread STINNER Victor


Change by STINNER Victor :


--
nosy: +cstratak, gregory.p.smith

___
Python tracker 

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



[issue36005] [2.7] test_ssl failures on ARMv7 Ubuntu 2.7 with OpenSSL 1.1.1a

2019-02-15 Thread STINNER Victor


STINNER Victor  added the comment:

It seems like this worker was offline for 1 month: build 324 was 1 month ago, 
whereas build 325 was 3 hours ago.

--

___
Python tracker 

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



[issue35880] math.sin has no backward error; this isn't documented

2019-02-15 Thread Mark Dickinson


Mark Dickinson  added the comment:

@jneb: Please could you clarify what sort of addition to the documentation 
you're proposing? Again, it's not clear what you mean by "backward error" here, 
or what sort of addition would be useful given the divergence of math function 
behaviours across platforms. Any documentation addition should cover more than 
just sin here; sin isn't at all special.

Setting to pending.

--
status: open -> pending

___
Python tracker 

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



[issue35996] Optional modulus argument for new math.prod() function

2019-02-15 Thread Mark Dickinson


Change by Mark Dickinson :


--
nosy: +mark.dickinson

___
Python tracker 

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



[issue35928] socket makefile read-write discards received data

2019-02-15 Thread nr


Change by nr :


--
keywords: +patch
pull_requests: +11912
stage: needs patch -> patch review

___
Python tracker 

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



[issue36005] [2.7] test_ssl failures on ARMv7 Ubuntu 2.7 with OpenSSL 1.1.1a

2019-02-15 Thread STINNER Victor


New submission from STINNER Victor :

Extract of pythoninfo:

ssl.HAS_SNI: True
ssl.OPENSSL_VERSION: OpenSSL 1.1.1a  20 Nov 2018
ssl.OPENSSL_VERSION_INFO: (1, 1, 1, 1, 15)
ssl.OP_ALL: -0x7fac
ssl.OP_NO_TLSv1_1: 0x1000

https://buildbot.python.org/all/#/builders/92/builds/325

Many tests with TLS errors. A few examples:

ERROR: test_connect (test.test_ssl.NetworkedTests)
...
SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed 
(_ssl.c:727)

ERROR: test_protocol_sslv23 (test.test_ssl.ThreadedTests)
Connecting to an SSLv23 server with various client options
--
...
self._sslobj.do_handshake()
SSLError: [SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version 
(_ssl.c:727)

ERROR: test_networked_good_cert (test.test_httplib.HTTPSTest)
...
SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed 
(_ssl.c:727)

ERROR: test_context_argument (test.test_urllibnet.urlopen_HttpsTests)
...
IOError: [Errno socket error] [SSL: CERTIFICATE_VERIFY_FAILED] certificate 
verify failed (_ssl.c:727)

--

There are other failures which may be unrelated:

ERROR: test_fileno (test.test_urllib2net.OtherNetworkTests)
...
HTTPError: HTTP Error 404: Not Found



This buildbot build contains 5 changes:

[2.7] bpo-33570: TLS 1.3 ciphers for OpenSSL 1.1.1 (GH-6976) (GH-8760) 
(GH-10607)(3 hours ago)
bpo-35746: Credit Colin Read and Nicolas Edet (GH-11866)(5 hours ago)
Doc sidebar: 3.6 has moved to security-fix mode. (GH-11810)(5 days ago)
[2.7] Fix url to core-mentorship mailing list (GH-11775). (GH-11778)(9 days 
ago)
bpo-25592: Improve documentation of distutils data_files (GH-9767) 
(GH-11734)(13 days ago)

I bet that it's a regression caused by:

https://github.com/python/cpython/commit/c49f63c1761ce03df7850b9e0b31a18c432dac64

--
components: Tests
messages: 335619
nosy: vstinner
priority: normal
severity: normal
status: open
title: [2.7] test_ssl failures on ARMv7 Ubuntu 2.7 with OpenSSL 1.1.1a
type: security
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



[issue29136] Add OP_NO_TLSv1_3

2019-02-15 Thread Charalampos Stratakis


Change by Charalampos Stratakis :


--
pull_requests: +11911

___
Python tracker 

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



[issue35132] python-gdb error: Python Exception Type does not have a target

2019-02-15 Thread Dylan Cali


Dylan Cali  added the comment:

> Hum, Dylan: what is your gdb version?

$ gdb --version
GNU gdb (Ubuntu 7.11.1-0ubuntu1~16.5) 7.11.1

> On Fedora 29 with gdb 8.2-6.fc29, it seems like .target() is useless

I can confirm removing the .target() call in libpython.py resolved the issue 
for me with no ill effects

> You can try faulthandler has a workaround.

I'll give this a try, thank you

--

___
Python tracker 

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



[issue32947] Support OpenSSL 1.1.1

2019-02-15 Thread Charalampos Stratakis


Change by Charalampos Stratakis :


--
pull_requests: +11910

___
Python tracker 

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



[issue36003] set better defaults for TCPServer options

2019-02-15 Thread Giampaolo Rodola'


Change by Giampaolo Rodola' :


--
keywords: +patch
pull_requests: +11908
stage:  -> patch review

___
Python tracker 

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



[issue36004] Add datetime.fromisocalendar

2019-02-15 Thread Stéphane Wirtel

Stéphane Wirtel  added the comment:

+1

--
nosy: +matrixise

___
Python tracker 

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



[issue36004] Add datetime.fromisocalendar

2019-02-15 Thread Paul Ganssle


New submission from Paul Ganssle :

Datetime has many methods that "serializes" an instance to some other format - 
toordinal, timestamp, isoformat, etc. Most methods that "serialize" a datetime 
have a corresponding method that "deserializes" that method, or another way to 
reverse the operation:

- strftime / strptime
- timestamp / fromtimestamp
- isoformat / fromisoformat
- toordinal / fromordinal
- timetuple / datetime(*thetuple[0:6])

However, as I found out when implementing `dateutil.parser.isoparse`, there is 
no simple way to invert `isocalendar()`.

I have an implementation as part of dateutil.parser.isoparse:

https://github.com/dateutil/dateutil/blob/master/dateutil/parser/isoparser.py#L297

If there are no objections, I'd like to add an implementation in CPython 
itself. Thinking the name should be `fromisocalendar`.

--
components: Library (Lib)
messages: 335616
nosy: belopolsky, lemburg, p-ganssle
priority: low
severity: normal
status: open
title: Add datetime.fromisocalendar
type: enhancement
versions: Python 3.8

___
Python tracker 

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



[issue28043] Sane defaults for SSLContext options and ciphers

2019-02-15 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset b8eaec697a2b5d9d2def2950a0aa50e8ffcf1059 by Victor Stinner 
(stratakis) in branch '2.7':
[2.7] bpo-28043: improved default settings for SSLContext (GH-10608)
https://github.com/python/cpython/commit/b8eaec697a2b5d9d2def2950a0aa50e8ffcf1059


--
nosy: +vstinner

___
Python tracker 

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



[issue36003] set better defaults for TCPServer options

2019-02-15 Thread Giampaolo Rodola'


Giampaolo Rodola'  added the comment:

Update: because "request_queue_size" is passed to server_activate() method 
which can be subclassed, a better default for not breaking backward 
compatibility is 0 (not None).

--

___
Python tracker 

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



[issue35986] print() documentation typo?

2019-02-15 Thread Stéphane Wirtel

Stéphane Wirtel  added the comment:

not in the CPython repo, just ask to regenerate the PyPI package. thanks

--

___
Python tracker 

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



[issue36003] set better defaults for TCPServer options

2019-02-15 Thread Giampaolo Rodola'


New submission from Giampaolo Rodola' :

socketserver.TCPServer provides the following defaults:

allow_reuse_address = False
request_queue_size = 5

Proposal is to:
* have "allow_reuse_address = True" on POSIX in order to immediately reuse 
previous sockets which were bound on the same address and remained in TIME_WAIT 
state
* have "request_queue_size = None" so that it's up to socket.listen() to choose 
a default reasonable value (usually 128)

--
components: Library (Lib)
keywords: easy
messages: 335612
nosy: asvetlov, giampaolo.rodola, neologix, yselivanov
priority: normal
severity: normal
status: open
title: set better defaults for TCPServer options
type: enhancement
versions: Python 3.8

___
Python tracker 

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



[issue35986] print() documentation typo?

2019-02-15 Thread Cheryl Sabella


Cheryl Sabella  added the comment:

Yes, but I thought that would be up to @theacodes to release a new version of 
python-docs-theme to PyPI?  Since the last release was 6 months ago and the 
previous one to that was February 2018, I was hoping the new release would come 
soon.

In any event, I didn't think there was anything else that could be done on this 
issue, which is why I closed it.  Is there something that needs to be updated 
in the CPython repository?

--

___
Python tracker 

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



[issue36002] configure --enable-optimizations with clang fails to detect llvm-profdata

2019-02-15 Thread Martijn Pieters


New submission from Martijn Pieters :

This is probably a automake bug.

When running CC=clang CXX=clang++ ./configure --enable-optimizations, configure 
tests for a non-existing -llvm-profdata binary:

checking for --enable-optimizations... yes
checking for --with-lto... no
checking for -llvm-profdata... no
configure: error: llvm-profdata is required for a --enable-optimizations build 
but could not be found.

The generated configure script looks for "$target_alias-llvm-profdata", and 
$target_alias is an empty string.

This problem is not visible on Macs, where additional checks for 
"/usr/bin/xcrun -find llvm-profdata" locate the binary.

The work-around would be to specify a target when configuring.

--
components: Build
messages: 335610
nosy: mjpieters
priority: normal
severity: normal
status: open
title: configure --enable-optimizations with clang fails to detect llvm-profdata
versions: Python 3.6, Python 3.7, Python 3.8

___
Python tracker 

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



[issue33570] OpenSSL 1.1.1 / TLS 1.3 cipher suite changes

2019-02-15 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset c49f63c1761ce03df7850b9e0b31a18c432dac64 by Victor Stinner 
(stratakis) in branch '2.7':
[2.7] bpo-33570: TLS 1.3 ciphers for OpenSSL 1.1.1 (GH-6976) (GH-8760) 
(GH-10607)
https://github.com/python/cpython/commit/c49f63c1761ce03df7850b9e0b31a18c432dac64


--
nosy: +vstinner

___
Python tracker 

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



[issue35688] "pip install --user numpy" fails on Python from the Windows Store

2019-02-15 Thread mattip


mattip  added the comment:

Closing. It seems the days of modifying os.environ['PATH'] on windows are over, 
and packages need to adopt to calling AddDllDirectory. As long as python is 
built with ctypes, this is easy enough to adopt, even though there are some 
caveats. See the issue from anaconda 
https://github.com/ContinuumIO/anaconda-issues/issues/10628

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



[issue35411] FTP tests of test_urllib2net fail on Travis CI: 425 Security: Bad IP connecting.

2019-02-15 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +11907

___
Python tracker 

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



[issue33376] [pysqlite] Duplicate rows can be returned after rolling back a transaction

2019-02-15 Thread Ma Lin


Change by Ma Lin :


--
nosy: +Ma Lin

___
Python tracker 

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



[issue36000] __debug__ is a keyword but not a keyword

2019-02-15 Thread Stéphane Wirtel

Change by Stéphane Wirtel :


--
nosy: +matrixise

___
Python tracker 

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



  1   2   >