[issue36144] Dictionary addition.

2019-02-27 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

> * It is natural to expect the plus operator to be commutative, but this 
> operation would necessarily be non-commutative.

In Python, the plus operator for sequences (strings, lists, tuples) is 
non-commutative.

But I have other arguments against it:

* It conflicts with the plus operator of Counter (which is a specialized dict): 
Counter(a=2) + Counter(a=3) == Counter(a=5), but the proposed idea makes 
dict(a=2) + dict(a=3) == dict(a=3).

* We already have a syntax for dict merging: {**d1, **d2}. It works with 
arbitrary mappings, in contrary to the plus operator, which needs a special 
support in argument types.

--

___
Python tracker 

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



[issue36144] Dictionary addition.

2019-02-27 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

For the record, I'm opposed to the idea.

* Use of the + operator is a temptation to produce new dictionaries rather than 
update an existing dict in-place which is usually what you want.

* We already have ChainMap() which presents a single view of multiple mappings 
with any copying.

* It is natural to expect the plus operator to be commutative, but this 
operation would necessarily be non-commutative.

* Many other APIs are modeled on the dict API, so we should not grow the API 
unless there is a big win.  The effects would be pervasive.

* I don't see other languages going down this path, nor am I seeing dict 
subclasses that implement this functionality.  Those are indications that this 
more of a "fun thing we could do" rather than a "thing that people need".

* The existing code already reads nicely:

 options.update(user_selections)

  That reads more like self explanatory English than:

 options += user_selections

  The latter takes more effort to correctly parse and
  makes it less clear that you're working with dicts.

* It isn't self-evident that the right operand needs to be another dictionary. 
If a person is trying to "add a key / value pair" to an existing dictionary, 
the "+=" operator would be tempting but it wouldn't work.

--

___
Python tracker 

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



[issue36144] Dictionary addition.

2019-02-27 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

I believe it was proposed and rejected multiple times.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue33944] Deprecate and remove pth files

2019-02-27 Thread Peter L


Peter L  added the comment:

+1 for python -v listing .pth files found and loaded.

For debugging, I just add a:
import sys; print('Loading mypth.pth')
to the start of the pth file.
A plain print doesn't work(?).
breakpoint() doesn't work(?).
It would be nice to be able to get the filename (__file__ is site.py)

--

___
Python tracker 

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



[issue36144] Dictionary addition.

2019-02-27 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

Python ideas discussion in 2015 : 
https://mail.python.org/pipermail/python-ideas/2015-February/031748.html
LWN summary : https://lwn.net/Articles/635397/

--
nosy: +xtreak

___
Python tracker 

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



[issue33085] *** Error in `python': double free or corruption (out): 0x00007ff5254d50d0 ***

2019-02-27 Thread chenkai


chenkai <13016135...@163.com> added the comment:

OS:
(python36) [root@localhost ~]# uname -a
Linux localhost.localdomain 3.10.0-862.el7.x86_64 #1 SMP Fri Apr 20 16:44:24 
UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

Python 3.6.5 (default, Feb 28 2019, 01:43:16) 
[GCC 4.8.5 20150623 (Red Hat 4.8.5-28)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> 
*** Error in `python': free(): invalid pointer: 0x7f4eb7a64558 ***
=== Backtrace: =
/lib64/libc.so.6(+0x81499)[0x7f4eb6c45499]
python(PyOS_Readline+0xec)[0x5cc48c]
python[0x447250]
python[0x448b98]
python(PyTokenizer_Get+0x9)[0x4499d9]
python[0x4457dd]
python(PyParser_ASTFromFileObject+0x89)[0x427909]
python[0x427b1b]
python(PyRun_InteractiveLoopFlags+0x76)[0x427e46]
python(PyRun_AnyFileExFlags+0x3c)[0x427fcc]
python(Py_Main+0xc44)[0x43b934]
python(main+0x162)[0x41d8b2]
/lib64/libc.so.6(__libc_start_main+0xf5)[0x7f4eb6be6445]
python[0x41d970]
=== Memory map: 

--

___
Python tracker 

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



[issue33944] Deprecate and remove pth files

2019-02-27 Thread Peter L


Change by Peter L :


--
nosy: +Peter L3

___
Python tracker 

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



[issue36137] SSL verification fails for some sites inside windows docker container

2019-02-27 Thread Mika Fischer


Mika Fischer  added the comment:

The easiest workaround I found (on Windows 10) is to use
```
certutil -generateSSTFromWU roots.sst && certutil -addstore -f root roots.sst 
&& del roots.sst
```
before using Python...

--

___
Python tracker 

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



[issue13850] Summary tables for argparse add_argument options

2019-02-27 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

I like the idea of having various summary tables for argparse, but the one in 
the PR isn't visually attractive or self-explanatory.

--

___
Python tracker 

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



[issue36137] SSL verification fails for some sites inside windows docker container

2019-02-27 Thread Mika Fischer


Mika Fischer  added the comment:

> This is probably a duplicate of #36137.

I think you mixed up the issue number, #36137 is this issue.

> Windows doesn't have CA certs pre-installed. They are downloaded from the 
> update server on demand. Python doesn't trigger the update but only uses 
> certs that are already present. It's a design flaw in my implementation. I 
> wasn't aware of Windows' behavior when I hooked up the Windows cert store to 
> the SSL module.

Oh, so that means that it is broken on normal Windows as well and only works 
coincidentally?

In any case, I can confirm that when the certificate is fetched using some 
other means, the request works:
```
docker run -ti python:3.7-windowsservercore-1809 powershell -command 
"(New-Object System.Net.WebClient).DownloadString(\"https://google.com\;) 
>$null; python -c \"import urllib.request as r; 
r.urlopen('https://google.com').close()\""
```

--

___
Python tracker 

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



[issue36144] Dictionary addition.

2019-02-27 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

I believe that Guido rejected this when it was proposed a few years ago.

--
nosy: +gvanrossum

___
Python tracker 

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



[issue36131] test.test_urllib2net.TimeoutTest ftp related tests fail due to ftp://www.pythontest.net/ being unavailable

2019-02-27 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

That was my impression.

--

___
Python tracker 

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



[issue30235] Validate shutil supports path-like objects, update docs accordingly

2019-02-27 Thread Thrlwiti


Change by Thrlwiti :


--
nosy: +THRlWiTi

___
Python tracker 

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



[issue36131] test.test_urllib2net.TimeoutTest ftp related tests fail due to ftp://www.pythontest.net/ being unavailable

2019-02-27 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

Just curious if it was some regression or infrastructure related issue in 
pythontest.net ?

--

___
Python tracker 

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



[issue35975] Put back the ability to parse files where async/await aren't keywords

2019-02-27 Thread Yury Selivanov


Yury Selivanov  added the comment:

> And the same tokenizer trick that detects 'async def' could detect 'async 
> for' easily.

Exactly.  I just never thought that we could support async generator 
expressions with the kind of hacks in tokenizer we had in 3.5-3.6.  FWIW I 
still believe that it's better for async & await tokens to be proper keywords, 
but in case we ever realize we want them to become "soft" keywords we 
apparently have options.

--

___
Python tracker 

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



[issue36144] Dictionary addition.

2019-02-27 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +rhettinger

___
Python tracker 

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



[issue36143] Auto-generate Lib/keyword.py

2019-02-27 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +cheryl.sabella

___
Python tracker 

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



[issue36143] Auto-generate Lib/keyword.py

2019-02-27 Thread Zachary Ware


Zachary Ware  added the comment:

Lib/keyword.py already regenerates itself from Python/graminit.c when run as a 
script, but there should be a `regen-keyword.py` target added to 
Makefile.pre.in and included as a dependency of the `regen-all` target.  Agreed 
that this is a good starting issue, particularly for anyone wanting to get more 
familiar with Makefiles.

See also issue30638.

--
keywords: +easy
nosy: +zach.ware

___
Python tracker 

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



[issue36144] Dictionary addition.

2019-02-27 Thread Brandt Bucher


Change by Brandt Bucher :


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

___
Python tracker 

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



[issue36144] Dictionary addition.

2019-02-27 Thread Brandt Bucher


New submission from Brandt Bucher :

...as discussed in python-ideas. Semantically:

d1 + d2 <-> d3 = d1.copy(); d3.update(d2); d3
d1 += d2 <-> d1.update(d2)

Attached is a working implementation with new/fixed tests for consideration. 
I've also updated collections.UserDict with the new __add__/__radd__/__iadd__ 
methods.

--
components: Interpreter Core
messages: 336798
nosy: brandtbucher
priority: normal
severity: normal
status: open
title: Dictionary addition.
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



[issue36143] Auto-generate Lib/keyword.py

2019-02-27 Thread Arfrever Frehtes Taifersar Arahesis


Change by Arfrever Frehtes Taifersar Arahesis :


--
title: AUto-generate Lib/keyword.py -> Auto-generate Lib/keyword.py

___
Python tracker 

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



[issue36143] AUto-generate Lib/keyword.py

2019-02-27 Thread Guido van Rossum


New submission from Guido van Rossum :

The stdib keyword.py module must be regenerated after adding/removing keywords 
from the grammar. While this is rare, we now generate everything else derived 
from the grammar. Hopefully someone can add some rules to the Makefile to 
auto-generate this one too when regen-grammar is run.

This is probably an easy project for a beginning contributor.

--
components: Build
messages: 336797
nosy: gvanrossum
priority: normal
severity: normal
status: open
title: AUto-generate Lib/keyword.py
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



[issue24740] make patchcheck doesn't detect changes if commit is done first

2019-02-27 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

I am pretty sure I have done the same after making all commits to the local 
branch.  Plus we have the better workflow.  So closing until there is a 
confirmed problem with the new workflow.

--
resolution:  -> out of date
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



[issue35975] Put back the ability to parse files where async/await aren't keywords

2019-02-27 Thread Guido van Rossum


Guido van Rossum  added the comment:

And the same tokenizer trick that detects 'async def' could detect 'async for' 
easily. See 
https://github.com/python/cpython/pull/12086/files#diff-30b8266a4285de981f8b1b82a8cc6231R1418

--

___
Python tracker 

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



[issue36046] support dropping privileges when running subprocesses

2019-02-27 Thread Patrick McLean


Patrick McLean  added the comment:

I have updated the pull request to include 'group' and 'extra_groups' as 
separate parameters.

--

___
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-27 Thread STINNER Victor


STINNER Victor  added the comment:

I created bpo-36142: "Add a new _PyPreConfig step to Python initialization to 
setup memory allocator and encodings".

--

___
Python tracker 

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



[issue36142] Add a new _PyPreConfig step to Python initialization to setup memory allocator and encodings

2019-02-27 Thread STINNER Victor


STINNER Victor  added the comment:

PR 12087 is a WIP change which implements everything as a single commit.

I'm not 100% sure yet that it's best approach for Python initialization, but 
I'm sure that it solves real interdependencies issues between _PyCoreConfig 
parameters. IHMO have a "pre-initialization" step to setup the memory allocator 
and the encodings is a better design.

--

___
Python tracker 

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



[issue36142] Add a new _PyPreConfig step to Python initialization to setup memory allocator and encodings

2019-02-27 Thread STINNER Victor


Change by STINNER Victor :


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

___
Python tracker 

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



[issue36142] Add a new _PyPreConfig step to Python initialization to setup memory allocator and encodings

2019-02-27 Thread STINNER Victor


New submission from STINNER Victor :

I added a _PyCoreConfig structure to Python 3.7 which contains almost all 
parameters used to configure Python. Problems: _PyCoreConfig uses bytes and 
Unicode strings (char* and wchar_t*) whereas it is also used to setup the 
memory allocator and (filesystem, locale and stdio) encodings.

I propose to add a new _PyPreConfig which is the "strict minimum" configuration 
to setup encodings and the memory allocator. In practice, it also contains 
parameters which directly or indirectly impacts the allocator and encodings. 
For example, isolated impacts use_environment which impacts the allocator 
(PYTHONMALLOC environment variable). Another example: dev_mode=1 sets the 
allocator to "debug".

The command line arguments are now parsed twice. _PyPreConfig only parses a few 
parameters like -E, -I and -X. A temporary _PyPreCmdline is used to store 
command line arguments like -X options.

I moved structures closer to where they are used. "Global" _PyMain structure 
has been removed. _PyCmdline now lives way shorter than previously and is moved 
from main.c to coreconfig.c. The idea is to better control when and how memory 
is allocated.

In term of API, we get something like:

_PyCoreConfig config = _PyCoreConfig_INIT;
config.preconfig.stdio_encoding = "iso8859-1";
config.preconfig.stdio_errors = "replace";
config.user_site_directory = 0;
...

_PyInitError err = _Py_InitializeFromConfig();
if (_Py_INIT_FAILED(err)) {
_Py_ExitInitError(err);
}
...
Py_Finalize();
return 0;

"config.preconfig.stdio_errors" syntax isn't great, but it's simpler to 
implement than duplicating all _PyPreConfig fields into _PyCoreConfig.

--
components: Interpreter Core
messages: 336791
nosy: vstinner
priority: normal
severity: normal
status: open
title: Add a new _PyPreConfig step to Python initialization to setup memory 
allocator and encodings
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



[issue27640] add the '--disable-test-suite' option to configure

2019-02-27 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



[issue35975] Put back the ability to parse files where async/await aren't keywords

2019-02-27 Thread Yury Selivanov


Yury Selivanov  added the comment:

> But why would we? I already have a working solution. 

I've heard some complaints that it's hard to migrate to Python 3.7 because 
async and await are keywords (although I think by now all popular libraries 
have migrated already), so in case you ever considered to revert that decision 
I think we could actually make it work.  But for the current PR you're working 
on we don't need that, you're right.

--

___
Python tracker 

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



[issue34095] [2.7] Seg fault on archlinux 32 when run tests with xvfb-run

2019-02-27 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



[issue23794] http package should support HTTP/2

2019-02-27 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



[issue29397] linux/random.h present but cannot be compiled

2019-02-27 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



[issue35975] Put back the ability to parse files where async/await aren't keywords

2019-02-27 Thread Guido van Rossum


Guido van Rossum  added the comment:

But why would we? I already have a working solution. (Literally reverting 
Jelle's PR won't work anyway, because Serhiy changed how regen-token works.)

--

___
Python tracker 

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



[issue35975] Put back the ability to parse files where async/await aren't keywords

2019-02-27 Thread Yury Selivanov


Yury Selivanov  added the comment:

Actually, I think we could revert to old lexer hacks in 3.8 if we modify them 
to treat 'async for' tocken sequence as one meta-tocken.

--

___
Python tracker 

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



[issue24740] make patchcheck doesn't detect changes if commit is done first

2019-02-27 Thread Cheryl Sabella


Cheryl Sabella  added the comment:

I believe this issue has been resolved under the new Github workflow.  I ran 
`make patchcheck` on a commit that had been pushed and it identified the 
changes.

--
nosy: +cheryl.sabella

___
Python tracker 

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



[issue35975] Put back the ability to parse files where async/await aren't keywords

2019-02-27 Thread Guido van Rossum


Change by Guido van Rossum :


--
keywords: +patch
pull_requests: +12096
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



[issue35975] Put back the ability to parse files where async/await aren't keywords

2019-02-27 Thread Guido van Rossum


Guido van Rossum  added the comment:

That should still work. The strategy is as follows:

- For Python 3.7 or higher, 'async' and 'await' are *always* recognized.

- For Python 3.5 and 3.6, the hacks from the PEP are used.

--

___
Python tracker 

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



[issue35975] Put back the ability to parse files where async/await aren't keywords

2019-02-27 Thread Yury Selivanov


Yury Selivanov  added the comment:

Well, it's not just rolling back async/await from being keywords. Since 3.7 
it's possible to create async generator expressions in non-async functions. 
This wasn't possible to do with old hacks on the lexer. So if you want to 
revert the change you risk losing some functionality we enabled in 3.7

--
nosy: +yselivanov

___
Python tracker 

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



[issue36132] Python cannot access hci_channel field in sockaddr_hci

2019-02-27 Thread Andrew P. Lentvorski, Jr.


Andrew P. Lentvorski, Jr.  added the comment:

It's up to you how you folks want to deal with this, but classifying it as a 
"bug" for those versions in bugfix is likely acceptable.

You already have to call bind with a tuple, so as long as it is *optional* to 
add an extra field to that tuple (and I can't imagine that any fix would not do 
that as it would break existing code), it's not going to break things.

However, since nobody seems to have felt the need to file this, fixing this in 
3.8 is probably just fine.

--

___
Python tracker 

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



[issue30406] async and await should be keywords in 3.7

2019-02-27 Thread Guido van Rossum


Guido van Rossum  added the comment:

Sadly if I get my way this will all be reverted -- see 
https://bugs.python.org/issue35975.  I'm working on a PR.

--

___
Python tracker 

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



[issue36128] ResourceReader for FileLoader inconsistently handles path separators

2019-02-27 Thread Brett Cannon


Change by Brett Cannon :


--
nosy: +brett.cannon

___
Python tracker 

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



[issue36116] test_multiprocessing_spawn fails on AMD64 Windows8 3.x

2019-02-27 Thread Eryk Sun


Eryk Sun  added the comment:

> And depending on the OS, abort() calls (via Py_FatalError) sometimes 
> appear to be segfaults, so it could be any number of issues. 
> (Aside - I'd love to replace the abort() calls with specific exit
> codes for configuration errors - they really mess up the crash data 
> we see on Windows.)

In particular, with the Universal CRT, an unhandled abort() is implemented by a 
__fastfail intrinsic [1] (int 0x29 instruction in x86) with the argument 
FAST_FAIL_FATAL_APP_EXIT (7). 

Prior to Windows 8 this appears as an access violation. In Windows 8+ it's 
implemented as a second-chance STATUS_STACK_BUFFER_OVERRUN (0xC409) 
exception, which is overloaded from its previous use to support failure codes. 
(The old usage appears as the failure code FAST_FAIL_LEGACY_GS_VIOLATION, 
defined to be 0.) It starts as a second-chance exception in order to bypass 
normal exception handling (i.e. SEH, VEH, UnhandledExceptionFilter). The 
second-chance exception event is sent to an attached debugger and/or the 
session server (csrss.exe).

Python's normal signal handling for SIGABRT can't prevent this, since the C 
handler just sets a flag and returns. But enabling faulthandler sets a C signal 
handler that restores the previous handler and calls raise(SIGABRT). The 
default SIGABRT handler for the explicit raise() code path simply calls 
_exit(3). 

Alternatively, we could prevent the __fastfail call via _set_abort_behavior 
[2], if implemented in msvcrt. For example: msvcrt.set_abort_behavior(0, 
msvcrt.CALL_REPORTFAULT).

[1]: https://docs.microsoft.com/en-us/cpp/intrinsics/fastfail
[2]: 
https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/set-abort-behavior

--
nosy: +eryksun

___
Python tracker 

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



[issue36141] configure: error: could not find pthreads on your system during cross compilation

2019-02-27 Thread Xavier de Gaye


Xavier de Gaye  added the comment:

What is the NDK version ?

There is no Android pthread library. It is possible that the failure comes from 
the fact that the first configure test on pthread_create links with pthread and 
that the Android linker fails now instead of ignoring this error as it did 
before.

Can you add "ac_cv_pthread_is_default=yes" to the configure command line in 
order to tell configure that the pthread functions are in the main libc (i.e. 
bionic) to see if this fixes the problem.

--

___
Python tracker 

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



[issue13501] Make libedit support more generic; port readline / libedit to FreeBSD

2019-02-27 Thread Robert Marshall


Robert Marshall  added the comment:

I have rebased this to recent master hash 53b9e1a1c1 and submitted a pull 
request.

It built in my CI environment, so seems to be OK as far as compiling.

I'll run the test suite against it later this evening when I have time to stand 
up a quick build enviroment with the full dependency list.

--
nosy: +Robert Marshall
pull_requests: +12095
Added file: 
https://bugs.python.org/file48175/0001-Build-or-disable-readline-module-with-Editline.patch

___
Python tracker 

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



[issue25737] array is not a Sequence

2019-02-27 Thread Manuel Cerón

Change by Manuel Cerón :


--
nosy: +ceronman

___
Python tracker 

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



[issue23864] issubclass without registration only works for "one-trick pony" collections ABCs.

2019-02-27 Thread Manuel Cerón

Change by Manuel Cerón :


--
nosy: +ceronman

___
Python tracker 

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



[issue36141] configure: error: could not find pthreads on your system during cross compilation

2019-02-27 Thread muhzi


Change by muhzi :


--
type:  -> compile error

___
Python tracker 

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



[issue36141] configure: error: could not find pthreads on your system during cross compilation

2019-02-27 Thread muhzi


Change by muhzi :


--
components: +Cross-Build
nosy: +Alex.Willmer

___
Python tracker 

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



[issue36141] configure: error: could not find pthreads on your system during cross compilation

2019-02-27 Thread muhzi


New submission from muhzi :

I am facing a problem while trying to compile Python for android armv7a using 
the latest NDK version (clang). The configure script fails to find pthread 
library, which should be bundled in libc. Here is the full configure output:


Building for armv7a-linux-androideabi
configure: loading site script ./config.site
checking build system type... x86_64-pc-linux-gnu
checking host system type... armv7a-unknown-linux-androideabi
checking for python3.7... python3.7
checking for python interpreter for cross build... python3.7
checking for --enable-universalsdk... no
checking for --with-universal-archs... no
checking MACHDEP... checking for --without-gcc... no
checking for --with-icc... no
checking for armv7a-linux-androideabi-gcc... armv7a-linux-androideabi16-clang
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... yes
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether armv7a-linux-androideabi16-clang accepts -g... yes
checking for armv7a-linux-androideabi16-clang option to accept ISO C89... none 
needed
checking how to run the C preprocessor... armv7a-linux-androideabi16-clang -E
checking for grep that handles long lines and -e... /bin/grep
checking for a sed that does not truncate output... /bin/sed
checking for --with-cxx-main=... no
checking for the platform triplet based on compiler characteristics... none
checking for -Wl,--no-as-needed... yes
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking for the Android API level... 16
checking for the Android arm ABI... 7
checking for --with-suffix... 
checking for case-insensitive build directory... no
checking LIBRARY... libpython$(VERSION)$(ABIFLAGS).a
checking LINKCC... $(PURIFY) $(MAINCC)
checking for GNU ld... yes
checking for --enable-shared... yes
checking for --enable-profiling... no
checking LDLIBRARY... libpython$(LDVERSION).so
checking for armv7a-linux-androideabi-ar... arm-linux-androideabi-ar
checking for armv7a-linux-androideabi-readelf... arm-linux-androideabi-readelf
checking for a BSD-compatible install... /usr/bin/install -c
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for --with-pydebug... no
checking for --with-assertions... no
checking for --enable-optimizations... no
checking for --with-lto... no
checking for -llvm-profdata... no
checking for -Wextra... yes
checking whether armv7a-linux-androideabi16-clang accepts and needs 
-fno-strict-aliasing... no
checking if we can turn off armv7a-linux-androideabi16-clang unused result 
warning... yes
checking if we can turn off armv7a-linux-androideabi16-clang unused parameter 
warning... yes
checking if we can turn off armv7a-linux-androideabi16-clang missing field 
initializers warning... yes
checking if we can turn off armv7a-linux-androideabi16-clang invalid function 
cast warning... no
checking if we can turn on armv7a-linux-androideabi16-clang mixed sign 
comparison warning... yes
checking if we can turn on armv7a-linux-androideabi16-clang unreachable code 
warning... yes
checking if we can turn on armv7a-linux-androideabi16-clang strict-prototypes 
warning... yes
checking if we can make implicit function declaration an error in 
armv7a-linux-androideabi16-clang... yes
checking whether pthreads are available without options... no
checking whether armv7a-linux-androideabi16-clang accepts -Kpthread... no
checking whether armv7a-linux-androideabi16-clang accepts -Kthread... no
checking whether armv7a-linux-androideabi16-clang accepts -pthread... no
checking whether armv7a-linux-androideabi16-clang++ also accepts flags for 
thread support... no
checking for ANSI C header files... (cached) yes
checking asm/types.h usability... yes
checking asm/types.h presence... yes
checking for asm/types.h... yes
checking crypt.h usability... no
checking crypt.h presence... no
checking for crypt.h... no
checking conio.h usability... no
checking conio.h presence... no
checking for conio.h... no
checking direct.h usability... no
checking direct.h presence... no
checking for direct.h... no
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking errno.h usability... yes
checking errno.h presence... yes
checking for errno.h... yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking grp.h usability... yes
checking 

[issue35360] Update SQLite to 3.26 in Windows and macOS installer builds

2019-02-27 Thread Manuel Cerón

Change by Manuel Cerón :


--
nosy: +ceronman

___
Python tracker 

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



[issue36116] test_multiprocessing_spawn fails on AMD64 Windows8 3.x

2019-02-27 Thread Steve Dower


Steve Dower  added the comment:

It's also possible that the child process is causing the segfault because of 
misconfiguration (e.g. broken environment variables).

And depending on the OS, abort() calls (via Py_FatalError) sometimes appear to 
be segfaults, so it could be any number of issues. (Aside - I'd love to replace 
the abort() calls with specific exit codes for configuration errors - they 
really mess up the crash data we see on Windows.)

I'll try some tests locally to see if this is reproducible, but if anyone can 
extract the original stdout/stderr from the buildbot, that would be helpful.

--

___
Python tracker 

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



[issue36096] IDLE: Refactor class variables to instance variables in colorizer

2019-02-27 Thread Terry J. Reedy


Change by Terry J. Reedy :


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



[issue36096] IDLE: Refactor class variables to instance variables in colorizer

2019-02-27 Thread Terry J. Reedy


Terry J. Reedy  added the comment:


New changeset 488aabafe2f1c5db05a6c1a7a8b49d7b89b1f36b by Terry Jan Reedy (Miss 
Islington (bot)) in branch '3.7':
bpo-36096: IDLE: Refactor class variables in colorizer (GH-12002) (GH-12075)
https://github.com/python/cpython/commit/488aabafe2f1c5db05a6c1a7a8b49d7b89b1f36b


--

___
Python tracker 

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



[issue36096] IDLE: Refactor class variables to instance variables in colorizer

2019-02-27 Thread miss-islington


Change by miss-islington :


--
pull_requests: +12094

___
Python tracker 

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



[issue36140] An incorrect check in _msi.c's msidb_getsummaryinformation()

2019-02-27 Thread Zackery Spytz


Change by Zackery Spytz :


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

___
Python tracker 

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



[issue36140] An incorrect check in _msi.c's msidb_getsummaryinformation()

2019-02-27 Thread Zackery Spytz


New submission from Zackery Spytz :

msidb_getsummaryinformation() checks the wrong variable after calling 
PyObject_NEW().

--
components: Windows
messages: 336776
nosy: ZackerySpytz, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: An incorrect check in _msi.c's msidb_getsummaryinformation()
type: behavior
versions: Python 2.7, 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



[issue36139] release GIL on mmap dealloc

2019-02-27 Thread Roundup Robot


Change by Roundup Robot :


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

___
Python tracker 

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



[issue36139] release GIL on mmap dealloc

2019-02-27 Thread Davide Rizzo


New submission from Davide Rizzo :

munmap() can take a long time. I think mmap_object_dealloc can trivially 
release the GIL around this operation. Something similar was already mentioned 
in https://bugs.python.org/issue1572968 but a general patch was never provided. 
The dealloc case alone is significant enough to deserve fixing.

--
components: Library (Lib)
messages: 336775
nosy: davide.rizzo
priority: normal
severity: normal
status: open
title: release GIL on mmap dealloc
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



[issue36116] test_multiprocessing_spawn fails on AMD64 Windows8 3.x

2019-02-27 Thread Pablo Galindo Salgado

Pablo Galindo Salgado  added the comment:

Adding Łukasz, as I think this is a release blocker (the Windows 8 and 7 
multiprocessing module may be causing segfaults).

--
nosy: +lukasz.langa
priority: normal -> high

___
Python tracker 

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



[issue36131] test.test_urllib2net.TimeoutTest ftp related tests fail due to ftp://www.pythontest.net/ being unavailable

2019-02-27 Thread Pablo Galindo Salgado

Pablo Galindo Salgado  added the comment:

Almost all buildbots have failed due to this issue. It seems that is fixed now:

❯ ./python.exe -m test -v test_urllib2net -u all
== CPython 3.8.0a2+ (heads/master:d5a551c269, Feb 27 2019, 09:17:08) [Clang 
10.0.0 (clang-1000.10.44.4)]
== macOS-10.14.3-x86_64-i386-64bit little-endian
== cwd: /Users/pgalindo3/github/cpython/build/test_python_15573
== CPU count: 8
== encodings: locale=UTF-8, FS=utf-8
Run tests sequentially
0:00:00 load avg: 2.02 [1/1] test_urllib2net
test_close (test.test_urllib2net.CloseSocketTest) ... ok
test_custom_headers (test.test_urllib2net.OtherNetworkTests) ... ok
test_file (test.test_urllib2net.OtherNetworkTests) ... ok
test_ftp (test.test_urllib2net.OtherNetworkTests) ... ok
test_redirect_url_withfrag (test.test_urllib2net.OtherNetworkTests) ... ok
test_sites_no_connection_close (test.test_urllib2net.OtherNetworkTests) ... 
skipped 'XXX: http://www.imdb.com is gone'
test_urlwithfrag (test.test_urllib2net.OtherNetworkTests) ... ok
test_ftp_basic (test.test_urllib2net.TimeoutTest) ... ok
test_ftp_default_timeout (test.test_urllib2net.TimeoutTest) ... ok
test_ftp_no_timeout (test.test_urllib2net.TimeoutTest) ... ok
test_ftp_timeout (test.test_urllib2net.TimeoutTest) ... ok
test_http_basic (test.test_urllib2net.TimeoutTest) ... ok
test_http_default_timeout (test.test_urllib2net.TimeoutTest) ... ok
test_http_no_timeout (test.test_urllib2net.TimeoutTest) ... ok
test_http_timeout (test.test_urllib2net.TimeoutTest) ... ok

--

Ran 15 tests in 9.531s

OK (skipped=1)

== Tests result: SUCCESS ==

1 test OK.

Total duration: 10 sec 17 ms
Tests result: SUCCESS

I am going to re-trigger a build in all affected buildbots.

--

___
Python tracker 

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



[issue23607] Inconsistency in datetime.utcfromtimestamp(Decimal)

2019-02-27 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

No, the bug is not fixed, and this is not easy issue. You should use 
non-integer Decimals to reproduce it. In 3.8 this emits a deprecation warning:

>>> import datetime
>>> from decimal import Decimal as D
>>> datetime.datetime.utcfromtimestamp(D(1425808327.307651))
:1: DeprecationWarning: an integer is required (got type 
decimal.Decimal).  Implicit conversion to integers using __int__ is deprecated, 
and may be removed in a future version of Python.
datetime.datetime(2015, 3, 8, 9, 52, 7)

--

___
Python tracker 

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



[issue23607] Inconsistency in datetime.utcfromtimestamp(Decimal)

2019-02-27 Thread Rémi Lapeyre

Change by Rémi Lapeyre :


--
nosy: +remi.lapeyre

___
Python tracker 

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



[issue23607] Inconsistency in datetime.utcfromtimestamp(Decimal)

2019-02-27 Thread Paul Ganssle


Paul Ganssle  added the comment:

Oh actually that's my mistake. I can't reproduce the failure in the constructor 
in the Python version of the module, and also it seems to be fixed in the pure 
Python version as of at least 3.6:

Python 3.6.7 (default, Oct 25 2018, 16:11:17) 
[GCC 8.2.1 20180831] on linux
>>> import sys
>>> sys.modules['_datetime'] = None
>>> from decimal import Decimal as D
>>> from datetime import datetime
>>> datetime.utcfromtimestamp(D(123456.12345))
datetime.datetime(1970, 1, 2, 10, 17, 36, 123450)

But the truncation behavior is still present in the C version as of Python 
3.8.0a1+:

Python 3.8.0a1+ (heads/master:3766f18, Feb 11 2019, 12:52:31) 
[GCC 8.2.1 20181127] on linux
>>> from datetime import datetime
>>> from decimal import Decimal as D
>>> datetime.utcfromtimestamp(D(123456.12345))
datetime.datetime(1970, 1, 2, 10, 17, 36)


I still think we need a test for the constructor behavior, but I'm going to 
remove "easy", since we still need to fix truncation in the C version.

--
keywords:  -easy

___
Python tracker 

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



[issue28441] Change sys.executable to include executable suffix

2019-02-27 Thread Ned Deily


Change by Ned Deily :


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



[issue31078] pdb's debug command (Pdb.do_debug) doesn't use rawinput even if the parent pdb uses rawinput

2019-02-27 Thread daniel hahler


daniel hahler  added the comment:

I can confirm that this fixes cursor keys not working properly after "debug 
foo()" (recursive debugging) with pdb.

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



[issue23607] Inconsistency in datetime.utcfromtimestamp(Decimal)

2019-02-27 Thread Paul Ganssle


Paul Ganssle  added the comment:

I'm not sure if either of these patches got merged, but at some point this was 
fixed:

Python 3.7.2 (default, Feb  9 2019, 13:18:43) 
[GCC 8.2.1 20181127] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from datetime import datetime
>>> from decimal import Decimal
>>> datetime.utcfromtimestamp(Decimal(123456.0))
datetime.datetime(1970, 1, 2, 10, 17, 36)


I recommend that someone add some regression tests to this, then we can close 
the issue.

I'm also going to mark this as "easy" since adding tests for this particular 
example should be pretty simple.

--
keywords: +easy

___
Python tracker 

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



[issue15237] Add capsule API to _decimal

2019-02-27 Thread Paul Ganssle


Change by Paul Ganssle :


--
nosy: +p-ganssle

___
Python tracker 

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



[issue22194] access to cdecimal / libmpdec API

2019-02-27 Thread Paul Ganssle


Change by Paul Ganssle :


--
nosy: +p-ganssle

___
Python tracker 

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



[issue36121] csv: Non global alternative to csv.field_size_limit

2019-02-27 Thread Rémi Lapeyre

Change by Rémi Lapeyre :


--
components: +Library (Lib) -Extension Modules

___
Python tracker 

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



[issue36121] csv: Non global alternative to csv.field_size_limit

2019-02-27 Thread Rémi Lapeyre

Change by Rémi Lapeyre :


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

___
Python tracker 

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



[issue36138] Improve documentation about converting datetime.timedelta to scalars

2019-02-27 Thread Fred L. Drake, Jr.


Change by Fred L. Drake, Jr. :


--
nosy: +fdrake

___
Python tracker 

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



[issue13850] Summary tables for argparse add_argument options

2019-02-27 Thread Stéphane Wirtel

Stéphane Wirtel  added the comment:

just for 2.7, 3.7 & 3.8 because they are in bugfix mode.

--
versions: +Python 3.7, Python 3.8 -Python 3.4, Python 3.5

___
Python tracker 

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



[issue36137] SSL verification fails for some sites inside windows docker container

2019-02-27 Thread Christian Heimes


Christian Heimes  added the comment:

This is probably a duplicate of #36137. Windows doesn't have CA certs 
pre-installed. They are downloaded from the update server on demand. Python 
doesn't trigger the update but only uses certs that are already present.

It's a design flaw in my implementation. I wasn't aware of Windows' behavior 
when I hooked up the Windows cert store to the SSL module.

--

___
Python tracker 

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



[issue36137] SSL verification fails for some sites inside windows docker container

2019-02-27 Thread Tianon


Change by Tianon :


--
nosy: +tianon

___
Python tracker 

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



[issue36137] SSL verification fails for some sites inside windows docker container

2019-02-27 Thread Stéphane Wirtel

Stéphane Wirtel  added the comment:

sure, I have just confirmed that this error does not occur with the last python 
3.8a2 and that I don't have a Windows system for an eventual debugging session.

--

___
Python tracker 

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



[issue36138] Improve documentation about converting datetime.timedelta to scalars

2019-02-27 Thread Paul Ganssle


New submission from Paul Ganssle :

In a recent python-dev thread, there was some confusion about how to get 
something like `timedelta.total_microseconds()`. There is already an existing, 
supported idiom for this, which is that `timedelta` implements division:

td = timedelta(hours=1)
num_microseconds = td / timedelta(microseconds=1)

In this e-mail ( 
https://mail.python.org/pipermail/python-dev/2019-February/156351.html ), Nick 
Coghlan proposed that we update the documentation and there were no objections, 
quoting:

* In the "Supported Operations" section of 
https://docs.python.org/3/library/datetime.html#timedelta-objects,
  change "Division (3) of t2 by t3." to "Division (3) of overall
  duration t2 by interval unit t3."
* In the total_seconds() documentation, add a sentence "For interval units
  other than seconds, use the division form directly (e.g. `td / 
timedelta(microseconds=1)`)"


I am starting this issue to track that change.

--
assignee: docs@python
components: Documentation, Library (Lib)
messages: 336765
nosy: belopolsky, docs@python, ncoghlan, p-ganssle
priority: normal
severity: normal
status: open
title: Improve documentation about converting datetime.timedelta to scalars
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



[issue36137] SSL verification fails for some sites inside windows docker container

2019-02-27 Thread Mika Fischer


Mika Fischer  added the comment:

Sorry if I wasn't completely clear. This issue occurs only on Windows and only 
when running python inside a windows docker container.

The question is what is python using on Windows to verify SSL certificates and 
what might be different inside the container that might let that process fail 
for some hosts and not for others...

--

___
Python tracker 

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



[issue36137] SSL verification fails for some sites inside windows docker container

2019-02-27 Thread Stéphane Wirtel

Stéphane Wirtel  added the comment:

I can't reproduce it with python 3.8a2 and I don't have a laptop with Windows.

--
nosy: +matrixise

___
Python tracker 

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



[issue35417] Double parenthesis in print function running 2to3 in already correct call

2019-02-27 Thread Paul Ganssle


Paul Ganssle  added the comment:

> 2to3 is designed as a tool to convert a Python 2 code base to Python 3 at 
> once. I understand that once the code base is converted, you may want to 
> revert some unwanted "useless" changes.

While this problem is likely to show up because someone has run 2to3 on a 
codebase more than once, I have *always* used parentheses around my print 
statements, even in pure Python 2, so it's not necessarily the case that this 
will cause problems.

I think this is a legitimate bug but also harmless since the code it generates 
is equivalent to the version with only one set of parentheses. I don't see a 
great deal of harm in marking this as low priority and leaving the bug open for 
someone to fix later, other than the fact that if someone comes along and fixes 
it, they may be discouraged to find that there are not really core developers 
interested in reviewing and merging the PR.

I will note that with the end of Python 2, 2to3 may become *more* relevant as 
fewer and fewer people are looking to translate code from 2->2/3 and more 
people will be looking to translate 2->3 directly.

--
nosy: +p-ganssle

___
Python tracker 

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



[issue36137] SSL verification fails for some sites inside windows docker container

2019-02-27 Thread Mika Fischer


New submission from Mika Fischer :

Inside a windows docker container, SSL verification fails for some but not all 
hosts. 

See this issue over in the docker repo:
https://github.com/docker-library/python/issues/359

Maybe you guys could shed some light on what could be the possible.

To reproduce, install Docker for Windows and then:

This works:
```
docker run -ti python:3.7-windowsservercore-1809 python -c "import 
urllib.request as r; r.urlopen('https://bootstrap.pypa.io').close()"
```

This doesn't
```
docker run -ti python:3.7-windowsservercore-1809 python -c "import 
urllib.request as r; r.urlopen('https://google.com').close()"
Traceback (most recent call last):
  File "C:\Python\lib\urllib\request.py", line 1317, in do_open
encode_chunked=req.has_header('Transfer-encoding'))
  File "C:\Python\lib\http\client.py", line 1229, in request
self._send_request(method, url, body, headers, encode_chunked)
  File "C:\Python\lib\http\client.py", line 1275, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
  File "C:\Python\lib\http\client.py", line 1224, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
  File "C:\Python\lib\http\client.py", line 1016, in _send_output
self.send(msg)
  File "C:\Python\lib\http\client.py", line 956, in send
self.connect()
  File "C:\Python\lib\http\client.py", line 1392, in connect
server_hostname=server_hostname)
  File "C:\Python\lib\ssl.py", line 412, in wrap_socket
session=session
  File "C:\Python\lib\ssl.py", line 853, in _create
self.do_handshake()
  File "C:\Python\lib\ssl.py", line 1117, in do_handshake
self._sslobj.do_handshake()
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate 
verify failed: unable to get local issuer certificate (_ssl.c:1056)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "", line 1, in 
  File "C:\Python\lib\urllib\request.py", line 222, in urlopen
return opener.open(url, data, timeout)
  File "C:\Python\lib\urllib\request.py", line 525, in open
response = self._open(req, data)
  File "C:\Python\lib\urllib\request.py", line 543, in _open
'_open', req)
  File "C:\Python\lib\urllib\request.py", line 503, in _call_chain
result = func(*args)
  File "C:\Python\lib\urllib\request.py", line 1360, in https_open
context=self._context, check_hostname=self._check_hostname)
  File "C:\Python\lib\urllib\request.py", line 1319, in do_open
raise URLError(err)
urllib.error.URLError: 
```

--
assignee: christian.heimes
components: SSL
messages: 336761
nosy: Mika Fischer, christian.heimes
priority: normal
severity: normal
status: open
title: SSL verification fails for some sites inside windows docker container
type: behavior
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



[issue36136] Windows: python._pth sets isolated mode late during Python initialization

2019-02-27 Thread STINNER Victor


New submission from STINNER Victor :

The read_pth_file() of PC/getpathp.c sets Py_IsolatedFlag and Py_NoSiteFlag to 
1 in Python 3.6. calculate_path() checked if a file with a "._pth" extension 
exists in "dllpath" or "progpath".

I refactored deeply the Python initialization in Python 3.7 and I'm not sure I 
introduced a regression or not.

In Python 3.7, _PyCoreConfig_Read() calls config_init_path_config() which 
indirectly calls read_pth_file(). pymain_read_conf_impl() detects if 
Py_IsolatedFlag and Py_NoSiteFlag have been modified and store the new value in 
cmdline->isolated and cmdline->no_site_import.

Later, cmdline_set_global_config() sets Py_IsolatedFlag and Py_NoSiteFlag; and 
_PyCoreConfig_SetGlobalConfig() sets Py_IgnoreEnvironmentFlag.

The problem is the relationship between isolated/cmdline.Py_IsolatedFlag, 
no_site_import/cmdline.Py_NoSiteFlag and 
Py_IgnoreEnvironmentFlag/config.ignore_environment. The isolated mode must set 
Py_NoSiteFlag to 1 and Py_IgnoreEnvironmentFlag to 1.

For example, pymain_read_conf_impl() uses:

/* Set Py_IgnoreEnvironmentFlag for Py_GETENV() */
Py_IgnoreEnvironmentFlag = config->ignore_environment || cmdline->isolated;

But it's done before calling _PyCoreConfig_Read().

Moreover, _PyCoreConfig_Read() reads PYTHONxxx environment variables before 
calling indirectly read_pth_file(), and so PYTHONxxx env vars are read whereas 
they are supposed to be ignored.

Calling read_pth_file() earlier is challenging since it depends on 
configuration parameters which are before calling it.

At the end, I'm not sure if it's a real issue. I'm not sure if there is a 
regression in Python 3.7.

--

But the code in Python 3.8 changed a lot again: _PyCoreConfig_Read() is now 
responsible to read all environment variables.

In Python 3.8, read_pth_file() uses a _PyPathConfig structure to set isolated 
and site_import parameters. These parameters are then copied to _PyCoreConfig 
in _PyCoreConfig_CalculatePathConfig().

Moreover, _PyCoreConfig_Read() is more explicit with the relationship between 
isolated, use_environment and user_site_directory. The function *starts* with:

if (config->isolated > 0) {
config->use_environment = 0;
config->user_site_directory = 0;
}

Problems (inconsistencies) arise if isolated is set from 0 to 1 after this code.

--
components: Interpreter Core
messages: 336760
nosy: vstinner
priority: normal
severity: normal
status: open
title: Windows: python._pth sets isolated mode late during Python initialization
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



[issue36135] altinstall error Makefile:1140: recipe for target 'altinstall' failed

2019-02-27 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

This might help : https://devguide.python.org/setup/#install-dependencies

--
nosy: +xtreak

___
Python tracker 

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



[issue13850] Summary tables for argparse add_argument options

2019-02-27 Thread Stéphane Wirtel

Change by Stéphane Wirtel :


--
pull_requests: +12090

___
Python tracker 

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



[issue36134] test failure : test_re; recipe for target 'test' failed

2019-02-27 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

Thanks for the details. This seems to be the same as issue29571 where the issue 
was reported on Ubuntu for en_IN but not happening in Gentoo.

--

___
Python tracker 

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



[issue36096] IDLE: Refactor class variables to instance variables in colorizer

2019-02-27 Thread miss-islington


Change by miss-islington :


--
pull_requests: +12089

___
Python tracker 

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



[issue36096] IDLE: Refactor class variables to instance variables in colorizer

2019-02-27 Thread Cheryl Sabella


Cheryl Sabella  added the comment:


New changeset ed1deb0719f0ac1b08a374e30ad26a701d4d51a2 by Cheryl Sabella in 
branch 'master':
bpo-36096: IDLE: Refactor class variables in colorizer (GH-12002)
https://github.com/python/cpython/commit/ed1deb0719f0ac1b08a374e30ad26a701d4d51a2


--

___
Python tracker 

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



[issue36127] Argument Clinic: inline parsing code for functions with keyword parameters

2019-02-27 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

In addition, this change can allow us to get rid of large and complex functions 
_PyArg_ParseTupleAndKeywordsFast() and _PyArg_ParseStackAndKeywords(). The 
former is no longer used in CPython, and the latter is still used in few places 
to support some deprecated formatting codes for which I intentionally not 
implemented inlining. After getting rid of uses of such codes (the patch in 
progress) we could remove both these functions.

--

___
Python tracker 

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



[issue36134] test failure : test_re; recipe for target 'test' failed

2019-02-27 Thread Apoorv Sachan


Apoorv Sachan  added the comment:

###the outputs for the commands:

user@host $ python -m test.pythoninfo
/usr/bin/python: No module named test.pythoninfo
--
user@host $ locale
LANG=en_IN
LANGUAGE=en_IN:en
LC_CTYPE="en_IN"
LC_NUMERIC="en_IN"
LC_TIME="en_IN"
LC_COLLATE="en_IN"
LC_MONETARY="en_IN"
LC_MESSAGES="en_IN"
LC_PAPER="en_IN"
LC_NAME="en_IN"
LC_ADDRESS="en_IN"
LC_TELEPHONE="en_IN"
LC_MEASUREMENT="en_IN"
LC_IDENTIFICATION="en_IN"
LC_ALL=


user@host $ ./python -m test -v test_re
== CPython 3.7.2 (default, Feb 27 2019, 17:26:06) [GCC 6.3.0 20170516]
== Linux-4.9.0-8-amd64-x86_64-with-debian-9.8 little-endian
== cwd: /home/apoos-maximus/packages/Python-3.7.2/build/test_python_32039
== CPU count: 4
== encodings: locale=UTF-8, FS=utf-8
Run tests sequentially
0:00:00 load avg: 0.60 [1/1] test_re
test_re_benchmarks (test.test_re.ExternalTests)
re_tests benchmarks ... ok
test_re_tests (test.test_re.ExternalTests)
re_tests test suite ... ok
test_overlap_table (test.test_re.ImplementationTest) ... ok
test_bytes (test.test_re.PatternReprTests) ... ok
test_inline_flags (test.test_re.PatternReprTests) ... ok
test_locale (test.test_re.PatternReprTests) ... ok
test_long_pattern (test.test_re.PatternReprTests) ... ok
test_multiple_flags (test.test_re.PatternReprTests) ... ok
test_quotes (test.test_re.PatternReprTests) ... ok
test_single_flag (test.test_re.PatternReprTests) ... ok
test_unicode_flag (test.test_re.PatternReprTests) ... ok
test_unknown_flags (test.test_re.PatternReprTests) ... ok
test_without_flags (test.test_re.PatternReprTests) ... ok
test_anyall (test.test_re.ReTests) ... ok
test_ascii_and_unicode_flag (test.test_re.ReTests) ... ok
test_backref_group_name_in_exception (test.test_re.ReTests) ... ok
test_basic_re_sub (test.test_re.ReTests) ... ok
test_big_codesize (test.test_re.ReTests) ... ok
test_bigcharset (test.test_re.ReTests) ... ok
test_bug_113254 (test.test_re.ReTests) ... ok
test_bug_114660 (test.test_re.ReTests) ... ok
test_bug_117612 (test.test_re.ReTests) ... ok
test_bug_1661 (test.test_re.ReTests) ... ok
test_bug_16688 (test.test_re.ReTests) ... ok
test_bug_20998 (test.test_re.ReTests) ... ok
test_bug_2537 (test.test_re.ReTests) ... ok
test_bug_29444 (test.test_re.ReTests) ... ok
test_bug_3629 (test.test_re.ReTests) ... ok
test_bug_418626 (test.test_re.ReTests) ... ok
test_bug_448951 (test.test_re.ReTests) ... ok
test_bug_449000 (test.test_re.ReTests) ... ok
test_bug_449964 (test.test_re.ReTests) ... ok
test_bug_527371 (test.test_re.ReTests) ... ok
test_bug_581080 (test.test_re.ReTests) ... ok
test_bug_612074 (test.test_re.ReTests) ... ok
test_bug_6509 (test.test_re.ReTests) ... ok
test_bug_6561 (test.test_re.ReTests) ... ok
test_bug_725106 (test.test_re.ReTests) ... ok
test_bug_725149 (test.test_re.ReTests) ... ok
test_bug_764548 (test.test_re.ReTests) ... ok
test_bug_817234 (test.test_re.ReTests) ... ok
test_bug_926075 (test.test_re.ReTests) ... ok
test_bug_931848 (test.test_re.ReTests) ... ok
test_bytes_str_mixing (test.test_re.ReTests) ... ok
test_case_helpers (test.test_re.ReTests) ... ok
test_category (test.test_re.ReTests) ... ok
test_character_set_errors (test.test_re.ReTests) ... ok
test_compile (test.test_re.ReTests) ... ok
test_constants (test.test_re.ReTests) ... ok
test_copying (test.test_re.ReTests) ... ok
test_dealloc (test.test_re.ReTests) ... ok
test_debug_flag (test.test_re.ReTests) ... ok
test_dollar_matches_twice (test.test_re.ReTests)
$ matches the end of string, and just before the terminating ... ok
test_empty_array (test.test_re.ReTests) ... ok
test_enum (test.test_re.ReTests) ... ok
test_error (test.test_re.ReTests) ... ok
test_expand (test.test_re.ReTests) ... ok
test_finditer (test.test_re.ReTests) ... ok
test_flags (test.test_re.ReTests) ... ok
test_getattr (test.test_re.ReTests) ... ok
test_group (test.test_re.ReTests) ... ok
test_group_name_in_exception (test.test_re.ReTests) ... ok
test_groupdict (test.test_re.ReTests) ... ok
test_ignore_case (test.test_re.ReTests) ... ok
test_ignore_case_range (test.test_re.ReTests) ... ok
test_ignore_case_set (test.test_re.ReTests) ... ok
test_inline_flags (test.test_re.ReTests) ... ok
test_issue17998 (test.test_re.ReTests) ... ok
test_keep_buffer (test.test_re.ReTests) ... ok
test_keyword_parameters (test.test_re.ReTests) ... ok
test_large_search (test.test_re.ReTests) ... ok
test_large_subn (test.test_re.ReTests) ... ok
test_locale_caching (test.test_re.ReTests) ... skipped 'test needs 
en_US.iso88591 locale'
test_locale_compiled (test.test_re.ReTests) ... skipped 'test needs 
en_US.iso88591 locale'
test_locale_flag (test.test_re.ReTests) ... FAIL
test_lookahead (test.test_re.ReTests) ... ok
test_lookbehind (test.test_re.ReTests) ... ok
test_match_getitem (test.test_re.ReTests) ... ok
test_match_repr (test.test_re.ReTests) ... ok
test_misc_errors (test.test_re.ReTests) ... ok
test_multiple_repeat (test.test_re.ReTests) ... ok
test_not_literal 

[issue36127] Argument Clinic: inline parsing code for functions with keyword parameters

2019-02-27 Thread STINNER Victor


STINNER Victor  added the comment:

About the stack memory usage, in the past, I used a subfunction tagged with 
_Py_NO_INLINE to work on temporary stack but then drop it:

void function()
{
   subfunction(); /* use temporary stack */
   /* don't waste stack memory */
   ...
}

I'm not sure if such pattern could be used here for things like " PyObject 
*argsbuf[12];".

The problem is that argument parsing uses a lot of local variables allocated on 
the stack. In practice, it's more like:

void function(args)
{
   int x;
   parse_args(args, ); /* use temporary stack */
   /* don't waste stack memory */
   ...
}

I expect a long list of "" where arg is a local variable of function(). 
Well, that's basically the design of the current PyArg_ParseTuple() function 
family :-)

PyArg_ParseTuple() does its stuff in private and uses more stack memory, but 
once PyArg_ParseTuple() returns, the memory on the stack is "released" just 
because we exited the function.

--

___
Python tracker 

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



[issue36127] Argument Clinic: inline parsing code for functions with keyword parameters

2019-02-27 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

As for depending the optimization on the size of CPU cache, I have repeated 
mickrobenchmarks on the computer with 6 MiB cache and two computers with 512 
KiB caches (64- and 32-bit).

Intel(R) Core(TM) i7-6700HQ CPU @ 2.60GHz (cache size: 6144 KB):

+-+--+--+
| Benchmark   | baseline | inline   |
+=+==+==+
| round_(4.2) | 113 ns   | 81.3 ns: 1.39x faster (-28%) |
+-+--+--+
| sum_(())| 83.8 ns  | 56.7 ns: 1.48x faster (-32%) |
+-+--+--+
| sum_(a) | 98.0 ns  | 72.1 ns: 1.36x faster (-26%) |
+-+--+--+
| 'abc'.split()   | 107 ns   | 83.1 ns: 1.29x faster (-22%) |
+-+--+--+
| b'abc'.split()  | 101 ns   | 75.4 ns: 1.34x faster (-25%) |
+-+--+--+
| 'abc'.split('-')| 123 ns   | 89.9 ns: 1.37x faster (-27%) |
+-+--+--+
| 'abc'.encode()  | 79.6 ns  | 59.2 ns: 1.34x faster (-26%) |
+-+--+--+
| b'abc'.decode() | 105 ns   | 84.7 ns: 1.24x faster (-20%) |
+-+--+--+
| int_(4.2)   | 88.9 ns  | 64.1 ns: 1.39x faster (-28%) |
+-+--+--+
| int_('5')   | 137 ns   | 108 ns: 1.28x faster (-22%)  |
+-+--+--+
| 42 .to_bytes(2, 'little')   | 113 ns   | 77.6 ns: 1.45x faster (-31%) |
+-+--+--+
| int_from_bytes(b'ab', 'little') | 83.4 ns  | 51.5 ns: 1.62x faster (-38%) |
+-+--+--+
| struct_i32_unpack_from(b'abcd') | 96.0 ns  | 71.6 ns: 1.34x faster (-25%) |
+-+--+--+
| re_word_match('a')  | 221 ns   | 180 ns: 1.22x faster (-18%)  |
+-+--+--+
| datetime_now()  | 282 ns   | 248 ns: 1.14x faster (-12%)  |
+-+--+--+

Not significant (1): zlib_compress(b'abc')

AMD Athlon(tm) 64 X2 Dual Core Processor 4600+ (cache size: 512 KB):

+-+--+-+
| Benchmark   | baseline | inline  |
+=+==+=+
| round_(4.2) | 391 ns   | 272 ns: 1.44x faster (-31%) |
+-+--+-+
| sum_(())| 212 ns   | 160 ns: 1.32x faster (-24%) |
+-+--+-+
| sum_(a) | 256 ns   | 211 ns: 1.21x faster (-18%) |
+-+--+-+
| 'abc'.split()   | 290 ns   | 233 ns: 1.25x faster (-20%) |
+-+--+-+
| b'abc'.split()  | 263 ns   | 226 ns: 1.16x faster (-14%) |
+-+--+-+
| 'abc'.split('-')| 316 ns   | 262 ns: 1.21x faster (-17%) |
+-+--+-+
| 'abc'.encode()  | 197 ns   | 154 ns: 1.28x faster (-22%) |
+-+--+-+
| b'abc'.decode() | 303 ns   | 250 ns: 1.21x faster (-18%) |
+-+--+-+
| int_(4.2)   | 234 ns   | 171 ns: 1.37x faster (-27%) |
+-+--+-+
| int_('5')   | 372 ns   | 310 ns: 1.20x faster (-17%) |
+-+--+-+
| 42 .to_bytes(2, 'little')   | 370 ns   | 245 ns: 1.51x faster (-34%) |
+-+--+-+
| int_from_bytes(b'ab', 'little') | 251 ns   | 167 ns: 1.50x faster (-33%) |

[issue36135] altinstall error Makefile:1140: recipe for target 'altinstall' failed

2019-02-27 Thread Stéphane Wirtel

Stéphane Wirtel  added the comment:

fix your compilation with the zlib headers

zipimport.ZipImportError: can't decompress data; zlib not available

not related to python itself.

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



[issue36134] test failure : test_re; recipe for target 'test' failed

2019-02-27 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

Search gives me issue29571 that looks similar to this report. This seems to be 
locale specific and information on your locale, OS etc would be helpful. Can 
you please add the output of below?

* python -m test.pythoninfo
* locale
* ./python -m test -v test_re

Thanks

--
nosy: +xtreak

___
Python tracker 

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



[issue35431] Add a function for computing binomial coefficients to the math module

2019-02-27 Thread Yash Aggarwal


Yash Aggarwal  added the comment:

@mark.dickinson
Ok, then I will work on comb for now then.

--

___
Python tracker 

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



[issue36135] altinstall error Makefile:1140: recipe for target 'altinstall' failed

2019-02-27 Thread Apoorv Sachan


New submission from Apoorv Sachan :

#as directed in the README.rst file
#doing a 'make altinstall' instead of install to install python3.7.2 along side 
other versions

this is to be performed after './configure' 'make' and 'make test' commands.
please refer issue 36134 :titled :: (two issues could be related)
"test failure : test_re; recipe for target 'test' failed"

as there was also a make test failure prior to 'make altinstall'

---terminal--

user@host $ make altinstall

#... everything goes well
#... process ends with this traceback


.
.
.
.

Traceback (most recent call last):
  File "/home/apoos-maximus/packages/Python-3.7.2/Lib/runpy.py", line 193, in 
_run_module_as_main
"__main__", mod_spec)
  File "/home/apoos-maximus/packages/Python-3.7.2/Lib/runpy.py", line 85, in 
_run_code
exec(code, run_globals)
  File "/home/apoos-maximus/packages/Python-3.7.2/Lib/ensurepip/__main__.py", 
line 5, in 
sys.exit(ensurepip._main())
  File "/home/apoos-maximus/packages/Python-3.7.2/Lib/ensurepip/__init__.py", 
line 204, in _main
default_pip=args.default_pip,
  File "/home/apoos-maximus/packages/Python-3.7.2/Lib/ensurepip/__init__.py", 
line 117, in _bootstrap
return _run_pip(args + [p[0] for p in _PROJECTS], additional_paths)
  File "/home/apoos-maximus/packages/Python-3.7.2/Lib/ensurepip/__init__.py", 
line 27, in _run_pip
import pip._internal
zipimport.ZipImportError: can't decompress data; zlib not available
Makefile:1140: recipe for target 'altinstall' failed
make: *** [altinstall] Error 1

=end==

i do end up with a python 3.7 installation and still can't make sense of the 
failure.

--
components: Installation
messages: 336749
nosy: apoos-maximus
priority: normal
severity: normal
status: open
title: altinstall error Makefile:1140: recipe for target 'altinstall' failed
type: compile error
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



[issue36127] Argument Clinic: inline parsing code for functions with keyword parameters

2019-02-27 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

Good questions Josh!

The size of the python binary has been increased from 17494944 bytes (17085 
KiB) to 17657112 bytes (17243 KiB) -- by 1%.

I think that this change can not increase memory consumption, because the new 
code does not use the heap (the old code can allocate additional memory 
dynamically).

As for using the stack memory, it is not so clear. On one side, the new code 
allocates an array on the stack for references to all parameters, and this 
memory is left in use until you return from the function. On other side, the 
old code allocates a lot of variables and static-sized buffers, and creates 
several function frames, but this memory is released after the end of arguments 
parsing. I think that for non-recursive functions the new code has smaller 
stack memory consumption (while the function has less than several tens of 
parameters), but for recursive functions it can increase stack memory 
consumption. Although I do not know whether any of affected functions is 
recursive.

--

___
Python tracker 

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



[issue36134] test failure : test_re; recipe for target 'test' failed

2019-02-27 Thread Apoorv Sachan


New submission from Apoorv Sachan :

## while building python3.7 from source code on debian9.8 stretch.
hardware : intel corei5 3337U
4 Gib -- physical ram//4 Gib -- swap space

following the instructions given in the README.rst file:
user@host $ ./configure --enable-optimizations
#---works fine : no issues

user@host $ make 
#---works fine : noissues

user@host $ make test
produces this 
FAIL: test_locale_flag (test.test_re.ReTests)
--
Traceback (most recent call last):
  File "/home/apoos-maximus/packages/Python-3.7.2/Lib/test/test_re.py", line 
1540, in test_locale_flag
self.assertTrue(pat.match(bletter))
AssertionError: None is not true

--

Ran 123 tests in 1.048s

FAILED (failures=1, skipped=2)
test test_re failed
1 test failed again:
test_re

== Tests result: FAILURE then FAILURE ==

384 tests OK.

1 test failed:
test_re

29 tests skipped:
test_bz2 test_ctypes test_curses test_dbm_gnu test_dbm_ndbm
test_devpoll test_gdb test_gzip test_idle test_kqueue test_lzma
test_msilib test_ossaudiodev test_readline test_smtpnet
test_sqlite test_ssl test_startfile test_tcl test_tix test_tk
test_ttk_guionly test_ttk_textonly test_turtle test_winconsoleio
test_winreg test_winsound test_zipfile64 test_zlib

1 re-run test:
test_re

2 tests run no tests:
test_dtrace test_future4

Total duration: 4 min 44 sec
Tests result: FAILURE then FAILURE
Makefile:1074: recipe for target 'test' failed
make: *** [test] Error 2


#on rerunning the same test 
user@host $  make test TESTOPTS="-v test_re"

FAIL: test_locale_flag (test.test_re.ReTests)
--
Traceback (most recent call last):
  File "/home/apoos-maximus/packages/Python-3.7.2/Lib/test/test_re.py", line 
1540, in test_locale_flag
self.assertTrue(pat.match(bletter))
AssertionError: None is not true

--

Ran 123 tests in 0.750s

FAILED (failures=1, skipped=2)
test test_re failed
1 test failed again:
test_re

== Tests result: FAILURE then FAILURE ==

1 test failed:
test_re

1 re-run test:
test_re

Total duration: 1 sec 646 ms
Tests result: FAILURE then FAILURE
Makefile:1074: recipe for target 'test' failed
make: *** [test] Error 2




## this is how the bug could be reproduced 
PS: do have a look at the traceback ::it makes no sense to me, it might to you !

--
components: Build
messages: 336747
nosy: apoos-maximus
priority: normal
severity: normal
status: open
title: test failure : test_re; recipe for target 'test' failed
type: compile error
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



[issue36131] test.test_urllib2net.TimeoutTest ftp related tests fail due to ftp://www.pythontest.net/ being unavailable

2019-02-27 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

> Right now, ftp://www.pythontest.net/ fails with "500 OOPS: vsf_sysutil_bind" 
> according to Firefox. It's not the first time that I see this error.

Related issue in the past due to disk space issue35386 . When I first created 
the issue opening the FTP URL on Firefox used to give me result or raise 425 
Bad IP error but now it's now consistently returning "500 OOPS: 
vsf_sysutil_bind" consistently.

--

___
Python tracker 

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



[issue36133] ThreadPoolExecutor and ProcessPoolExecutor, dynamic worker count

2019-02-27 Thread Fabian Dill


New submission from Fabian Dill :

The request is, that the _max_workers attribute of the pools are exposed as a 
proper interface, that would allow changing of the worker amount after 
initialisation.

--
components: Library (Lib)
messages: 336745
nosy: Fabian Dill
priority: normal
severity: normal
status: open
title: ThreadPoolExecutor and ProcessPoolExecutor, dynamic worker count
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



  1   2   >