[issue38342] ImportError: cannot import name 'MetadataPathFinder' from 'importlib.metadata'

2019-10-01 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +jaraco

___
Python tracker 

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



[issue38345] Add end lines to pyclbr objects

2019-10-01 Thread Robert Kearns


Change by Robert Kearns :


--
keywords: +patch
pull_requests: +16124
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/16534

___
Python tracker 

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



[issue38344] activate.bat else needs to be on the same line as the if

2019-10-01 Thread James Abel


Change by James Abel :


--
keywords: +patch
pull_requests: +16122
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/16533

___
Python tracker 

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



[issue38344] activate.bat else needs to be on the same line as the if

2019-10-01 Thread James Abel


New submission from James Abel :

In activate.bat, the else needs to be on the same line as the if

--
components: Windows
messages: 353722
nosy: James Abel, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: activate.bat else needs to be on the same line as the if
type: behavior
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



[issue38345] Add end lines to pyclbr objects

2019-10-01 Thread Robert Kearns


Change by Robert Kearns :


--
components: Library (Lib)
nosy: RobertKearns
priority: normal
severity: normal
status: open
title: Add end lines to pyclbr objects
type: enhancement
versions: Python 3.9

___
Python tracker 

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



[issue38342] ImportError: cannot import name 'MetadataPathFinder' from 'importlib.metadata'

2019-10-01 Thread Александр Семенов

Александр Семенов  added the comment:

on windows
```C:\>py -c "import sys;from importlib.metadata import version, requires, 
files;print(sys.version);print(version('requests'))"
3.8.0b4 (tags/v3.8.0b4:d93605d, Aug 29 2019, 23:21:28) [MSC v.1916 64 bit 
(AMD64)]
2.22.0
```

--
nosy: +iamsav

___
Python tracker 

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



[issue18309] Make python slightly more relocatable

2019-10-01 Thread Mathias Fröhlich

Mathias Fröhlich  added the comment:

Ok, so far.
But what shall I do now?
It would be nice that python is a bit smarter in finding its increasing 
important module files when being embedded into an application.
Anybody out there who wants to look at that contribution?
best
Mathias

--

___
Python tracker 

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



[issue36670] regrtest: win_utils decodes typeperf output from the wrong encoding (test suite broken due to cpu usage feature on win 10/ german)

2019-10-01 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +16121
pull_request: https://github.com/python/cpython/pull/16530

___
Python tracker 

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



[issue38332] invalid content-transfer-encoding in encoded-word causes KeyError

2019-10-01 Thread Emmanuel Arias


Emmanuel Arias  added the comment:

Hi Andrei sorry for my last message. Now I understand perfectly your idea and 
your PR. IMO this is a correct patch.

--

___
Python tracker 

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



[issue38334] zipfile: Seeking encrypted file breaks after seeking backwards

2019-10-01 Thread Daniel Hillier


Change by Daniel Hillier :


--
keywords: +patch
pull_requests: +16120
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/16529

___
Python tracker 

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



[issue38187] test.test_tools.test_c_analyzer fails in refleak mode

2019-10-01 Thread Eric Snow


Change by Eric Snow :


--
status: pending -> closed

___
Python tracker 

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



[issue38343] Version name in PC/layout read incorrectly for RC

2019-10-01 Thread miss-islington


miss-islington  added the comment:


New changeset a11df75269b5d47248be617ed02e96c1d1938fd1 by Miss Islington (bot) 
in branch '3.8':
bpo-38343: Fixes version handling for nuget packages (GH-16527)
https://github.com/python/cpython/commit/a11df75269b5d47248be617ed02e96c1d1938fd1


--
nosy: +miss-islington

___
Python tracker 

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



[issue38343] Version name in PC/layout read incorrectly for RC

2019-10-01 Thread Steve Dower


Change by Steve Dower :


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



[issue38343] Version name in PC/layout read incorrectly for RC

2019-10-01 Thread Steve Dower


Steve Dower  added the comment:

I already republished correctly-versioned files and unlisted the wrong ones (as 
well as contacting support to see whether they can delete them completely so 
they don't impact the final release).

The change above fixes the issue. It will need cherry-picking for the v3.8.0 
tag (or the v3.8.0rc2 tag...).

--

___
Python tracker 

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



[issue38343] Version name in PC/layout read incorrectly for RC

2019-10-01 Thread Steve Dower


Steve Dower  added the comment:


New changeset b9a8b8296cd7be22f8b5bf92af686a788c47c7bf by Steve Dower in branch 
'master':
bpo-38343: Fixes version handling for nuget packages (GH-16527)
https://github.com/python/cpython/commit/b9a8b8296cd7be22f8b5bf92af686a788c47c7bf


--

___
Python tracker 

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



[issue38343] Version name in PC/layout read incorrectly for RC

2019-10-01 Thread miss-islington


Change by miss-islington :


--
pull_requests: +16119
pull_request: https://github.com/python/cpython/pull/16528

___
Python tracker 

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



[issue38343] Version name in PC/layout read incorrectly for RC

2019-10-01 Thread Steve Dower


Change by Steve Dower :


--
keywords: +patch
pull_requests: +16118
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/16527

___
Python tracker 

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



[issue38343] Version name in PC/layout read incorrectly for RC

2019-10-01 Thread Steve Dower


Change by Steve Dower :


--
nosy: +lukasz.langa

___
Python tracker 

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



[issue38343] Version name in PC/layout read incorrectly for RC

2019-10-01 Thread Steve Dower


New submission from Steve Dower :

I noticed that when the nuget.org packages published for 3.8.0rc1, they were 
given the version "3.8.0".

3.7.5rc1 was okay because it's still using the old approach to setting the 
version.

This needs to be fixed before any more RCs are released. I'll see if I can get 
the incorrectly versioned files removed from nuget and replace them with RCs.

--
assignee: steve.dower
components: Windows
keywords: 3.8regression
messages: 353715
nosy: paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
stage: needs patch
status: open
title: Version name in PC/layout read incorrectly for RC
type: behavior
versions: Python 3.8, Python 3.9

___
Python tracker 

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



[issue38227] Setting a signal handler gets multiprocessing.Pool stuck

2019-10-01 Thread Ionel Cristian Mărieș

Change by Ionel Cristian Mărieș :


--
components: +Library (Lib)

___
Python tracker 

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



[issue38342] ImportError: cannot import name 'MetadataPathFinder' from 'importlib.metadata'

2019-10-01 Thread Anthony Tuininga


New submission from Anthony Tuininga :

Running the suggested code found at 
https://docs.python.org/3.8/whatsnew/3.8.html regarding the new 
importlib.metadata module

from importlib.metadata import version, requires, files
version('requests')

yields the error

Traceback (most recent call last):
  File "", line 1, in 
  File "/usr/local/lib/python3.8/importlib/metadata/__init__.py", line 365, in 
version
return distribution(package).version
  File "/usr/local/lib/python3.8/importlib/metadata/__init__.py", line 338, in 
distribution
return Distribution.from_name(package)
  File "/usr/local/lib/python3.8/importlib/metadata/__init__.py", line 159, in 
from_name
dists = resolver(name)
  File "", line 1381, in 
find_distributions
ImportError: cannot import name 'MetadataPathFinder' from 'importlib.metadata' 
(/usr/local/lib/python3.8/importlib/metadata/__init__.py)

--
components: Library (Lib)
messages: 353714
nosy: atuining
priority: normal
severity: normal
status: open
title: ImportError: cannot import name 'MetadataPathFinder' from 
'importlib.metadata'
type: behavior
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



[issue38006] Crash in remove() weak reference callback of weakref.WeakValueDictionary at Python exit

2019-10-01 Thread Neil Schemenauer

Neil Schemenauer  added the comment:

Łukasz, is there some reason you removed old versions (2.7, 3.6, etc)?  The bug 
is present on those versions of Python and it should be trivial to backport the 
fix.  If those branches are maintained, I think we should fix it.

Attached is a small test program (gc_weakref_bug_demo2.py) that causes the same 
crash as in this bug report (SEGV inside _PyFunction_Vectorcall).  Setting 
things up is quite tricky and it depends on the order that things are cleared 
in delete_garbage().  Maybe still worth making a unit test for it?

Instead of using the 'dummy' function, you can also use 
types.SimpleNamespace().  Calling repr() on it after tp_clear will result in a 
crash or an assert failure.  Those two crashes are not needed to confirm the 
bug.  Just the fact that 'callback' runs is proof enough.  So, in a unit test, 
the callback to just set a global to indicate failure.

--
Added file: https://bugs.python.org/file48637/gc_weakref_bug_demo2.py

___
Python tracker 

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



[issue38341] Add SMTPNotSupportedError in the exports of smtplib

2019-10-01 Thread Roundup Robot


Change by Roundup Robot :


--
keywords: +patch
pull_requests: +16116
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/16525

___
Python tracker 

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



[issue38341] Add SMTPNotSupportedError in the exports of smtplib

2019-10-01 Thread Norman Denayer


New submission from Norman Denayer :

Long story short:
smtplib.SMTPNotSupportedError seems the only exception not present in __all__ 
variable exposed by smtplib.py

Context:
I currently face an issue running mypy on one of my module:
...tools/email.py:46: error: Module has no attribute "SMTPNotSupportedError"
except smtplib.SMTPNotSupportedError:

Digging into the context of this error, I note this exception is not exposed in 
the list __all__.

Regards,
Norman

--
components: email
messages: 353712
nosy: Norman.Denayer, barry, r.david.murray
priority: normal
severity: normal
status: open
title: Add SMTPNotSupportedError in the exports of smtplib
type: enhancement
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



[issue36470] dataclasses.replace raises an exception if InitVar with default argument is not provided.

2019-10-01 Thread Eric V. Smith


Change by Eric V. Smith :


--
assignee:  -> eric.smith

___
Python tracker 

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



[issue38331] Exec not recognizing global variables inside function

2019-10-01 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

I don't think this is a bug.

def func():
   print(var)

This captures the globals at the time of definition, that is "global" 
references are resolved using the func.__globals__ attribute which is the 
globals dictionary at the time the function is created

exec("func()", globals=my_globals;locals=my_globals)

This runs code with a different globals dictionary, but that doesn't affect the 
already defined function because it resolves names with the previously captured 
globals dictionary.

This is basically the mechanism that ensures that functions defined in a module 
use that modules global namespace, and not the globals from where they are 
called.

--
nosy: +ronaldoussoren

___
Python tracker 

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



[issue37424] subprocess.run timeout does not function if shell=True and capture_output=True

2019-10-01 Thread STINNER Victor


STINNER Victor  added the comment:

> I'm still seeing hangs with subprocess.run() in Python 3.7.4

That's not surprising, the fix has been pushed at 2019-09-11. Python 3.7.5 will 
include the fix and it will be released soon:
https://www.python.org/dev/peps/pep-0537/

--

___
Python tracker 

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



[issue37096] Add large-file tests for modules using sendfile(2)

2019-10-01 Thread STINNER Victor


STINNER Victor  added the comment:

> checking whether to enable large file support... no

That's only at the C level to decide how to pass a file position.

It's unrelated to the regrtest "largefile" resource.

--

___
Python tracker 

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



[issue38006] Crash in remove() weak reference callback of weakref.WeakValueDictionary at Python exit

2019-10-01 Thread Tim Peters


Tim Peters  added the comment:

Neil, about this comment:

#   - ct is not yet trash (it actually is but the GC doesn't know because of
# the missing tp_traverse method).

I believe gc should know ct is trash.  ct is in the cf list, and the latter 
does have tp_traverse.

What gc won't know is that `a` is trash, because `a` is attached to ct, and ct 
doesn't have tp_traverse.

It should blow up anyway :-)

Maybe with a simpler structure it would be easier to rearrange code to nudge 
the callback into getting cleared before use?

Z <- Y <- A <-> B -> WZ -> C

where WZ is a weakref to Z with callback C, and Y doesn't implement 
tp_traverse.  The only cycle is between A and B, which could just as well be 
the same object.  All the other stuff hangs off that cycle.

It's all trash, but we won't know in advance that Z is part of it.

--

___
Python tracker 

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



[issue37424] subprocess.run timeout does not function if shell=True and capture_output=True

2019-10-01 Thread Tony Cappellini


Tony Cappellini  added the comment:

Using Python 3.7.4, I'm calling subprocess.run() with the following arguments. 
.run() still hangs even though a timeout is being passed in.

subprocess.run(cmd_list,
stdout=subprocess.PIPE,   
stderr=subprocess.STDOUT,   
shell=False,   timeout=timeout_val, 
  check=True,   
universal_newlines=True)



cmd_list contains the name of the bash script below, which is
./rescan.sh

--
#!/usr/bin/bash

echo Rescanning system for PCIe devices

echo "Rescan device"
echo 1 > /sys/bus/pci/rescan

sleep 5

if [ `lspci | grep -ic "Non-Volatile memory controller"` -gt 0 ]
then
echo "Device Detected after Rescan"
else 
echo "Device NOT detected after Rescan"
exit 1
fi 

echo Rescan Done


This script is scanning for NVME SSDs, so duplicating the issue is not as 
straightforward as submitting a python script.

The OS is CentOS 7. 

uname  -a shows
 3.10.0-693.el7.x86_64 #1 SMP Tue Aug 22 21:09:27 UTC 2017 x86_64 x86_64 x86_64 
GNU/Linux

I know the Kernel is old, but we have a restriction against updating it.

--

___
Python tracker 

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



[issue38333] add type signatures to library function docs

2019-10-01 Thread Guido van Rossum

Guido van Rossum  added the comment:

I'm sorry, but that's unacceptable.

On Mon, Sep 30, 2019 at 23:42 Vedran Čačić  wrote:

>
> Vedran Čačić  added the comment:
>
> > Many docs are ... vague about types.
>
> ... and I consider that a feature. At least if you do that, make an
> explicit decision not to introduce TypeErrors for "disagreeing with the
> documented signature".
>
> For example, I'd be ok with sum being documented as taking an iterable of
> numbers and returning a number, but it would be a catastrophe if as a
> consequence of that, sum of a list of lists would stop working.
>
> --
> nosy: +veky
>
> ___
> Python tracker 
> 
> ___
>
-- 
--Guido (mobile)

--

___
Python tracker 

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



[issue37424] subprocess.run timeout does not function if shell=True and capture_output=True

2019-10-01 Thread Tony Cappellini


Tony Cappellini  added the comment:

I'm still seeing hangs with subprocess.run() in Python 3.7.4
Unfortunately, it involves talking to an NVME SSD on Linux, so I cannot
easily submit code to duplicate it.

--
nosy: +cappy

___
Python tracker 

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



[issue37096] Add large-file tests for modules using sendfile(2)

2019-10-01 Thread Charalampos Stratakis


Charalampos Stratakis  added the comment:

It seems that the -uall argument is passed to regrtest invocation for the 
buildbot run [0] which invokes the largefile tests (including all the resource 
intensive tests). However when configure is run you can see: checking whether 
to enable large file support... no

[0] 
https://github.com/python/cpython/blob/master/Lib/test/libregrtest/cmdline.py#L81

--

___
Python tracker 

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



[issue37096] Add large-file tests for modules using sendfile(2)

2019-10-01 Thread STINNER Victor


STINNER Victor  added the comment:

Should we decorate the new files with @requires('largefile', '...')? 
Documentation:

largefile - It is okay to run some test that may create huge
files.  These tests can take a long time and may
consume >2 GiB of disk space temporarily.

It may be interesting to add an option to regrtest to specify how much space 
can be used by tests, an option similar to -M/--memlimit which is for memory.

I don't recall if largefile is enabled by default on buildbots or not :-p

--

___
Python tracker 

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



[issue38313] Crash/No start

2019-10-01 Thread Zachary Ware


Zachary Ware  added the comment:

Feel free to reopen if you can answer the questions in my previous message.

--
resolution:  -> works for me
stage:  -> resolved
status: pending -> closed

___
Python tracker 

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



[issue37096] Add large-file tests for modules using sendfile(2)

2019-10-01 Thread Giampaolo Rodola'


Giampaolo Rodola'  added the comment:

Sorry about that. I'm attaching a patch which skips those tests if there's not 
enough free disk space. If you confirm it works I'll make a PR.

--
Added file: https://bugs.python.org/file48636/disk-space.patch

___
Python tracker 

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



[issue38248] inconsistency in asyncio.Task between cancellation while running vs. cancellation immediately after it finishes

2019-10-01 Thread Yury Selivanov


Change by Yury Selivanov :


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



[issue37146] opcode cache for LOAD_GLOBAL emits false alarm in memory leak hunting

2019-10-01 Thread Yury Selivanov


Yury Selivanov  added the comment:

> It seems like nobody came up with a solution for the debug mode since June. I 
> close the issue. Reopen it if you would like to propose a solution.

I think the only solution is to have a flag to disable optimizations, 
inlcluding this one.

--

___
Python tracker 

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



[issue37096] Add large-file tests for modules using sendfile(2)

2019-10-01 Thread Charalampos Stratakis


Charalampos Stratakis  added the comment:

After this change I get some disk space issues on the Fedora rawhide buildbot 
for the clang installed build only (and strangely enough not for the other 
jobs). There are currently around 9GB of free space there:

https://buildbot.python.org/all/#/builders/188/builds/1110

==
ERROR: test_tofromfile (test.test_array.DoubleTest)
--
Traceback (most recent call last):
  File 
"/home/buildbot/buildarea/3.x.cstratak-fedora-rawhide-x86_64.clang-installed/build/target/lib/python3.9/test/test_array.py",
line 374, in test_tofromfile
f.close()
OSError: [Errno 28] No space left on device

--
nosy: +cstratak

___
Python tracker 

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



[issue38337] inspect: getmembers calls properties

2019-10-01 Thread Sanjay


Sanjay  added the comment:

the issue happens in 2.7 as well

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



[issue38339] [3.5] The doc job of Travis CI fails on Python 3.5: needs at least Sphinx v1.8

2019-10-01 Thread STINNER Victor


STINNER Victor  added the comment:

I proposed PR 16522 to update Sphinx from version 1.6.1 to 1.8.2.

--

___
Python tracker 

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



[issue38340] ERROR WHILE BUILDING pyworld for x86_64-linux-gnu-gcc

2019-10-01 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

This is an issue tracker for CPython. The build log seems like an issue with 
pyworld package. I would suggest creating an issue in their tracker.

--
nosy: +xtreak

___
Python tracker 

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



[issue38339] [3.5] The doc job of Travis CI fails on Python 3.5: needs at least Sphinx v1.8

2019-10-01 Thread STINNER Victor


Change by STINNER Victor :


--
keywords: +patch
pull_requests: +16115
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/16522

___
Python tracker 

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



[issue38339] [3.5] The doc job of Travis CI fails on Python 3.5: needs at least Sphinx v1.8

2019-10-01 Thread STINNER Victor


STINNER Victor  added the comment:

I suggest to backport https://github.com/python/cpython/pull/10676 to 3.5: use 
Sphinx 1.8.2 in .travis.yml. Commit in the 3.6 branch:

commit 23a98abd4256f931ed89b65ec6babd4f06dbff97
Author: Miss Islington (bot) <31488909+miss-isling...@users.noreply.github.com>
Date:   Sat Dec 8 21:34:30 2018 -0800

[3.7] Doc: Bump sphinx. (GH-10676) (GH-10803)

(cherry picked from commit 2db96ae7444880d66d4ef65abab8a5e6ff328711)

Co-authored-by: Julien Palard 

diff --git a/.travis.yml b/.travis.yml
index ed4e46c782..8250fd91b3 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -43,7 +43,7 @@ matrix:
 - cd Doc
 # Sphinx is pinned so that new versions that introduce new warnings 
won't suddenly cause build failures.
 # (Updating the version is fine as long as no warnings are raised by 
doing so.)
-- python -m pip install sphinx~=1.6.1 blurb
+- python -m pip install sphinx==1.8.2 blurb
   script:
 - make check suspicious html SPHINXOPTS="-q -W -j4"
 - os: linux

--

___
Python tracker 

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



[issue38340] ERROR WHILE BUILDING pyworld for x86_64-linux-gnu-gcc

2019-10-01 Thread ECAS India


New submission from ECAS India :

creating build/temp.linux-x86_64-3.7/lib/World
  creating build/temp.linux-x86_64-3.7/lib/World/src
  x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g 
-fstack-protector-strong -Wformat -Werror=format-security -Wdate-time 
-D_FORTIFY_SOURCE=2 -fPIC -Ilib/World/src -I/usr/include/python3.7m 
-I/usr/local/lib/python3.7/dist-packages/numpy/core/include -c 
pyworld/pyworld.cpp -o build/temp.linux-x86_64-3.7/pyworld/pyworld.o
  x86_64-linux-gnu-gcc: error: pyworld/pyworld.cpp: No such file or directory
  x86_64-linux-gnu-gcc: fatal error: no input files
  compilation terminated.
  error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
  
  
  Failed building wheel for pyworld
  Running setup.py clean for pyworld
Failed to build pyworld

--
files: Screenshot from 2019-10-01 18-53-25.png
messages: 353694
nosy: ECAS India
priority: normal
severity: normal
status: open
title: ERROR WHILE BUILDING pyworld for x86_64-linux-gnu-gcc
type: compile error
versions: Python 3.7
Added file: https://bugs.python.org/file48635/Screenshot from 2019-10-01 
18-53-25.png

___
Python tracker 

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



[issue38339] [3.5] The doc job of Travis CI fails on Python 3.5: needs at least Sphinx v1.8

2019-10-01 Thread STINNER Victor


STINNER Victor  added the comment:

This issue prevents to merge the following 3.5 pull requests:
https://github.com/python/cpython/pulls?utf8=%E2%9C%93&q=is%3Apr+is%3Aopen+base%3A3.5+

--
nosy: +larry

___
Python tracker 

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



[issue38339] [3.5] The doc job of Travis CI fails on Python 3.5: needs at least Sphinx v1.8

2019-10-01 Thread STINNER Victor


New submission from STINNER Victor :

Example:
https://travis-ci.org/python/cpython/jobs/590339147

$ python --version

Python 3.6.3

$ pip --version

pip 9.0.1 from /home/travis/virtualenv/python3.6.3/lib/python3.6/site-packages 
(python 3.6)

Could not locate requirements.txt. Override the install: key in your 
.travis.yml to install dependencies.
before_script.1

0.00s$ cd Doc
before_script.2

8.58s$ python -m pip install sphinx~=1.6.1 blurb

1.88s$ make check suspicious html SPHINXOPTS="-q -W -j4"

python3 tools/rstlint.py -i tools -i ./venv -i README.rst

No problems found.

make[1]: Entering directory `/home/travis/build/python/cpython/Doc'

mkdir -p build

Building NEWS from Misc/NEWS.d with blurb

PATH=./venv/bin:$PATH sphinx-build -b suspicious -d build/doctrees -D 
latex_elements.papersize= -q -W -j4 . build/suspicious 

Sphinx version error:

This project needs at least Sphinx v1.8 and therefore cannot be built with this 
version.

make[1]: *** [build] Error 1

make[1]: Leaving directory `/home/travis/build/python/cpython/Doc'

Suspicious check complete; look for any errors in the above output or in 
build/suspicious/suspicious.csv.  If all issues are false positives, append 
that file to tools/susp-ignored.csv.

make: *** [suspicious] Error 1

The command "make check suspicious html SPHINXOPTS="-q -W -j4"" exited with 2.
cache.2

store build cache

--
assignee: docs@python
components: Documentation
messages: 353692
nosy: docs@python, mdk, vstinner
priority: normal
severity: normal
status: open
title: [3.5] The doc job of Travis CI fails on Python 3.5: needs at least 
Sphinx v1.8
versions: Python 3.5

___
Python tracker 

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



[issue38338] [2.7] test_ssl fails on RHEL8

2019-10-01 Thread STINNER Victor


Change by STINNER Victor :


--
title: [2.7] test_ssl fails -> [2.7] test_ssl fails on RHEL8

___
Python tracker 

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



[issue38338] [2.7] test_ssl fails

2019-10-01 Thread STINNER Victor


New submission from STINNER Victor :

SSLv23 and TLS v1.0 are disabled by RHEL8 crypto policy.

AMD64 RHEL8 2.7:
https://buildbot.python.org/all/#/builders/245/builds/5

test_protocol_sslv23 (test.test_ssl.ThreadedTests)
Connecting to an SSLv23 server with various client options ... 
 Could not scan /etc/ssl/openssl.cnf for MinProtocol: [Errno 2] No such file or 
directory: '/etc/ssl/openssl.cnf'

 PROTOCOL_TLS->PROTOCOL_TLS CERT_NONE
 PROTOCOL_TLSv1->PROTOCOL_TLS CERT_NONE
ERROR

==
ERROR: test_protocol_sslv23 (test.test_ssl.ThreadedTests)
Connecting to an SSLv23 server with various client options
--
Traceback (most recent call last):
  File 
"/home/buildbot/buildarea/2.7.cstratak-RHEL8-x86_64/build/Lib/test/test_ssl.py",
 line 189, in f
return func(*args, **kwargs)
  File 
"/home/buildbot/buildarea/2.7.cstratak-RHEL8-x86_64/build/Lib/test/test_ssl.py",
 line 2402, in test_protocol_sslv23
try_protocol_combo(ssl.PROTOCOL_SSLv23, ssl.PROTOCOL_TLSv1, 'TLSv1')
  File 
"/home/buildbot/buildarea/2.7.cstratak-RHEL8-x86_64/build/Lib/test/test_ssl.py",
 line 2134, in try_protocol_combo
chatty=False, connectionchatty=False)
  File 
"/home/buildbot/buildarea/2.7.cstratak-RHEL8-x86_64/build/Lib/test/test_ssl.py",
 line 2062, in server_params_test
s.connect((HOST, server.port))
  File "/home/buildbot/buildarea/2.7.cstratak-RHEL8-x86_64/build/Lib/ssl.py", 
line 864, in connect
self._real_connect(addr, False)
  File "/home/buildbot/buildarea/2.7.cstratak-RHEL8-x86_64/build/Lib/ssl.py", 
line 855, in _real_connect
self.do_handshake()
  File "/home/buildbot/buildarea/2.7.cstratak-RHEL8-x86_64/build/Lib/ssl.py", 
line 828, in do_handshake
self._sslobj.do_handshake()
SSLError: [SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version 
(_ssl.c:727)

and

test_protocol_tlsv1_1 (test.test_ssl.ThreadedTests)
Connecting to a TLSv1.1 server with various client options. ... 
 Could not scan /etc/ssl/openssl.cnf for MinProtocol: [Errno 2] No such file or 
directory: '/etc/ssl/openssl.cnf'

 PROTOCOL_TLSv1_1->PROTOCOL_TLSv1_1 CERT_NONE
 {PROTOCOL_TLS->PROTOCOL_TLSv1_1} CERT_NONE
 PROTOCOL_TLSv1_1->PROTOCOL_TLS CERT_NONE
ERROR

==
ERROR: test_protocol_tlsv1_1 (test.test_ssl.ThreadedTests)
Connecting to a TLSv1.1 server with various client options.
--
Traceback (most recent call last):
  File 
"/home/buildbot/buildarea/2.7.cstratak-RHEL8-x86_64/build/Lib/test/test_ssl.py",
 line 189, in f
return func(*args, **kwargs)
  File 
"/home/buildbot/buildarea/2.7.cstratak-RHEL8-x86_64/build/Lib/test/test_ssl.py",
 line 2477, in test_protocol_tlsv1_1
try_protocol_combo(ssl.PROTOCOL_SSLv23, ssl.PROTOCOL_TLSv1_1, 'TLSv1.1')
  File 
"/home/buildbot/buildarea/2.7.cstratak-RHEL8-x86_64/build/Lib/test/test_ssl.py",
 line 2134, in try_protocol_combo
chatty=False, connectionchatty=False)
  File 
"/home/buildbot/buildarea/2.7.cstratak-RHEL8-x86_64/build/Lib/test/test_ssl.py",
 line 2062, in server_params_test
s.connect((HOST, server.port))
  File "/home/buildbot/buildarea/2.7.cstratak-RHEL8-x86_64/build/Lib/ssl.py", 
line 864, in connect
self._real_connect(addr, False)
  File "/home/buildbot/buildarea/2.7.cstratak-RHEL8-x86_64/build/Lib/ssl.py", 
line 855, in _real_connect
self.do_handshake()
  File "/home/buildbot/buildarea/2.7.cstratak-RHEL8-x86_64/build/Lib/ssl.py", 
line 828, in do_handshake
self._sslobj.do_handshake()
SSLError: [SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version 
(_ssl.c:727)

--
assignee: christian.heimes
components: SSL, Tests
messages: 353691
nosy: christian.heimes, vstinner
priority: normal
severity: normal
status: open
title: [2.7] test_ssl fails
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



[issue38338] [2.7] test_ssl fails

2019-10-01 Thread STINNER Victor


Change by STINNER Victor :


--
nosy: +cstratak

___
Python tracker 

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



[issue36054] On Linux, os.count() should read cgroup cpu.shares and cpu.cfs (CPU count inside docker container)

2019-10-01 Thread STINNER Victor


Change by STINNER Victor :


--
title: Way to detect CPU count inside docker container -> On Linux, os.count() 
should read cgroup cpu.shares and cpu.cfs (CPU count inside docker container)

___
Python tracker 

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



[issue36054] Way to detect CPU count inside docker container

2019-10-01 Thread Mike


Mike  added the comment:

Is this issue still being worked on as a core feature? I needed a solution for 
this using 2.7.11 to enable some old code to work properly/nicely in a 
container environment on AWS Batch and was forced to figure out what OpenJDK 
was doing and came up with a solution. The process in OpenJDK seems to be, find 
where the cgroups for docker are located in the file system, then depending on 
the values in different files you can determine the number of CPUs available. 

The inelegant code below is what worked for me:

def query_cpu():
if os.path.isfile('/sys/fs/cgroup/cpu/cpu.cfs_quota_us'):
cpu_quota = 
int(open('/sys/fs/cgroup/cpu/cpu.cfs_quota_us').read().rstrip())
#print(cpu_quota) # Not useful for AWS Batch based jobs as 
result is -1, but works on local linux systems
if cpu_quota != -1 and 
os.path.isfile('/sys/fs/cgroup/cpu/cpu.cfs_period_us'):
cpu_period = 
int(open('/sys/fs/cgroup/cpu/cpu.cfs_period_us').read().rstrip())
#print(cpu_period)
avail_cpu = int(cpu_quota / cpu_period) # Divide quota by 
period and you should get num of allotted CPU to the container, rounded down if 
fractional.
elif os.path.isfile('/sys/fs/cgroup/cpu/cpu.shares'):
cpu_shares = 
int(open('/sys/fs/cgroup/cpu/cpu.shares').read().rstrip())
#print(cpu_shares) # For AWS, gives correct value * 1024.
avail_cpu = int(cpu_shares / 1024)
return avail_cpu


This solution makes several assumptions about the cgroup locations within the 
container vs dynamically finding where those files are located as OpenJDK does. 
I also haven't included the more robust method in case cpu.quota and cpu.shares 
are -1.

Hopefully this is a start for getting this implemented.

--
nosy: +mcnelsonphd

___
Python tracker 

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



[issue38243] A reflected XSS in python/Lib/DocXMLRPCServer.py

2019-10-01 Thread Dong-hee Na


Dong-hee Na  added the comment:

> I prefer to keep it open until the 3.5 backport is merged.
Sorry, I didn't find it.
Yes, we should let it open until the PR is merged.

--

___
Python tracker 

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



[issue38337] inspect: getmembers calls properties

2019-10-01 Thread Jonas Drotleff


Change by Jonas Drotleff :


--
keywords: +patch
pull_requests: +16113
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/16521

___
Python tracker 

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



[issue38337] inspect: getmembers calls properties

2019-10-01 Thread Jonas Drotleff


New submission from Jonas Drotleff :

When calling inspect.getmembers on a class that has a property (@property), the 
property will be called by the getattr call in getmembers.

Example:

import inspect

class Example:
def __init__(self, var):
self._var = var
print('__init__')

def foo(self, bar):
print(bar)
print('foo')

@property
def var(self):
print('Access property')
return self._var


if __name__ == '__main__':
ex = Example('Hello')
print('--- getmembers from instance ---')
print(inspect.getmembers(ex))
print('--- getmembers from class---')
print(inspect.getmembers(Example))


Result:

__init__
--- getmembers from instance ---
Access property
[('__class__', ), ..., ('var', 
'Hello')]
--- getmembers from class---
[('__class__', ), ..., ('var', 
)]


Expected:

__init__
--- getmembers from instance ---
[('__class__', ), ..., ('var', 
)]
--- getmembers from class---
[('__class__', ), ..., ('var', 
)]

--
components: Library (Lib)
messages: 353688
nosy: jnsdrtlf
priority: normal
severity: normal
status: open
title: inspect: getmembers calls properties
type: behavior
versions: Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 3.9

___
Python tracker 

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



[issue38336] Remove the __set__ method restriction on data descriptors for attribute lookup precedence

2019-10-01 Thread Géry

Change by Géry :


--
nosy: +rhettinger

___
Python tracker 

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



[issue38336] Remove the __set__ method restriction on data descriptors for attribute lookup precedence

2019-10-01 Thread Géry

New submission from Géry :

The [language 
documentation](https://docs.python.org/3/reference/datamodel.html#invoking-descriptors)
 states:

> Data descriptors with __set__() and __get__() defined always override a 
> redefinition in an instance dictionary. In contrast, non-data descriptors can 
> be overridden by instances.

This override is not limited to data descriptors defining `__set__()` (and 
`__get__()`). It is also true for data descriptors defining `__delete__()` (and 
`__get__()`) and data descriptors defining both `__set__()` and `__delete__()` 
(and `__get__()`).

In other words, _any_ data descriptors (objects defining either `__set__()` or 
`__delete__()` or both) defining `__get__()` override an attribute redefinition 
in an instance dictionary.

--
assignee: docs@python
components: Documentation
messages: 353685
nosy: docs@python, maggyero
priority: normal
severity: normal
status: open
title: Remove the __set__ method restriction on data descriptors for attribute 
lookup precedence
type: enhancement
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



[issue38336] Remove the __set__ method restriction on data descriptors for attribute lookup precedence

2019-10-01 Thread Géry

Géry  added the comment:

I have opened a PR here: https://github.com/python/cpython/pull/16520

--

___
Python tracker 

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



[issue38248] inconsistency in asyncio.Task between cancellation while running vs. cancellation immediately after it finishes

2019-10-01 Thread STINNER Victor


STINNER Victor  added the comment:

Can this issue be closed now?

--

___
Python tracker 

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



[issue38321] Compiler warnings when building Python 3.8

2019-10-01 Thread STINNER Victor


STINNER Victor  added the comment:

New changeset bfe1f74e39d0049a829962050e86a6a2d2a2781e by Victor Stinner in 
branch '3.8':
[3.8] bpo-3832: Fix compiler warnings (GH-16518)
https://github.com/python/cpython/commit/bfe1f74e39d0049a829962050e86a6a2d2a2781e

(oops, I made a typo in the bpo number in the commit title.)

--

___
Python tracker 

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



[issue38336] Remove the __set__ method restriction on data descriptors for attribute lookup precedence

2019-10-01 Thread Géry

Change by Géry :


--
keywords: +patch
pull_requests: +16112
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/16520

___
Python tracker 

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



[issue38321] Compiler warnings when building Python 3.8

2019-10-01 Thread STINNER Victor


STINNER Victor  added the comment:

Ok, most warnings have been fixed in 3.8 and master. I close the issue.

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



[issue3832] add force_shared Library option to create shared lib even with use_stub=False

2019-10-01 Thread STINNER Victor


STINNER Victor  added the comment:

Oops, the previous comment should be for bpo-38321.

--

___
Python tracker 

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



[issue38321] Compiler warnings when building Python 3.8

2019-10-01 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset bfe1f74e39d0049a829962050e86a6a2d2a2781e by Victor Stinner in 
branch '3.8':
[3.8] bpo-3832: Fix compiler warnings (GH-16518)
https://github.com/python/cpython/commit/bfe1f74e39d0049a829962050e86a6a2d2a2781e


--

___
Python tracker 

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



[issue38248] inconsistency in asyncio.Task between cancellation while running vs. cancellation immediately after it finishes

2019-10-01 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset bfe1f74e39d0049a829962050e86a6a2d2a2781e by Victor Stinner in 
branch '3.8':
[3.8] bpo-3832: Fix compiler warnings (GH-16518)
https://github.com/python/cpython/commit/bfe1f74e39d0049a829962050e86a6a2d2a2781e


--

___
Python tracker 

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



[issue3832] add force_shared Library option to create shared lib even with use_stub=False

2019-10-01 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset bfe1f74e39d0049a829962050e86a6a2d2a2781e by Victor Stinner in 
branch '3.8':
[3.8] bpo-3832: Fix compiler warnings (GH-16518)
https://github.com/python/cpython/commit/bfe1f74e39d0049a829962050e86a6a2d2a2781e


--
nosy: +vstinner

___
Python tracker 

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



[issue22273] abort when passing certain structs by value using ctypes

2019-10-01 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset bfe1f74e39d0049a829962050e86a6a2d2a2781e by Victor Stinner in 
branch '3.8':
[3.8] bpo-3832: Fix compiler warnings (GH-16518)
https://github.com/python/cpython/commit/bfe1f74e39d0049a829962050e86a6a2d2a2781e


--

___
Python tracker 

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



[issue38243] A reflected XSS in python/Lib/DocXMLRPCServer.py

2019-10-01 Thread STINNER Victor


STINNER Victor  added the comment:

I prefer to keep it open until the 3.5 backport is merged.

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

___
Python tracker 

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



[issue3832] add force_shared Library option to create shared lib even with use_stub=False

2019-10-01 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +16111
pull_request: https://github.com/python/cpython/pull/16518

___
Python tracker 

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



[issue38335] simplify overlaps function in ipaddress.py

2019-10-01 Thread Sanjay


Change by Sanjay :


--
pull_requests: +16110
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/16519

___
Python tracker 

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



[issue38335] simplify overlaps function in ipaddress.py

2019-10-01 Thread Sanjay


New submission from Sanjay :

the current implementation of overlaps function tests either network or 
broadcast address is in other but
we can skip checking broadcast address is in other because we anyway check if 
other.network_address in self 

without loss of generality if we assume self has smaller prefixlen than other 
then when self.broadcast_address in other then other.network_address *SHOULD* 
be in self but the reverse is not true

so my first patch was to make the function logic simply do
`self.network_address in other or other.network_address in self`

but the current PR does a different change. We have introduced two new 
functions subnet_of and supernet_of

for two networks A, B there are only three possibilities 
1. they don't overlap
2. A is subnet of B
3. B is subnet of A

so we can reuse the existing function and just do
`return self.subnet_of(other) or self.supernet_of(other)`
the only thing is while overlaps() function returns false when we try to 
compare with a network or with diff version the other throws exception so I 
added a typecheck in the beginning.

P.S the docstring is slightly convoluted for newcomers, based on the three 
possibilities it should say "Tell if self is supernet or subnet of other" 
because "partly contained" can also mean two ranges intersect which can never 
happen to network prefixes. I have not made that change but can make it.

There are also some other issues I want to address but I want to do one at a 
time.

--
components: Library (Lib)
files: skip_broadcast_in.patch
keywords: patch
messages: 353676
nosy: Sanjay
priority: normal
severity: normal
status: open
title: simplify overlaps function in ipaddress.py
versions: Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 3.9
Added file: https://bugs.python.org/file48634/skip_broadcast_in.patch

___
Python tracker 

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



[issue38321] Compiler warnings when building Python 3.8

2019-10-01 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +16109
pull_request: https://github.com/python/cpython/pull/16518

___
Python tracker 

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



[issue38321] Compiler warnings when building Python 3.8

2019-10-01 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 6314abcc08f5d0f3d3a915dc9455ea223fa65517 by Victor Stinner in 
branch 'master':
bpo-37802: Fix a compiler warning in longobject.c (GH-16517)
https://github.com/python/cpython/commit/6314abcc08f5d0f3d3a915dc9455ea223fa65517


--

___
Python tracker 

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



[issue37802] micro-optimization of PyLong_FromSize_t()

2019-10-01 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 6314abcc08f5d0f3d3a915dc9455ea223fa65517 by Victor Stinner in 
branch 'master':
bpo-37802: Fix a compiler warning in longobject.c (GH-16517)
https://github.com/python/cpython/commit/6314abcc08f5d0f3d3a915dc9455ea223fa65517


--
nosy: +vstinner

___
Python tracker 

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



[issue38243] A reflected XSS in python/Lib/DocXMLRPCServer.py

2019-10-01 Thread Dong-hee Na


Change by Dong-hee Na :


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



[issue38331] Exec not recognizing global variables inside function

2019-10-01 Thread Krishna Oza


Krishna Oza  added the comment:

adding self to nosy list.

--
nosy: +Krishna Oza

___
Python tracker 

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



[issue37474] Should Py_Initialize() control the floating point mode?

2019-10-01 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 5e0ea7540f577c9684e272000fdfc80d29bb78a2 by Victor Stinner in 
branch 'master':
bpo-37474: Don't call fedisableexcept() on FreeBSD (GH-16515)
https://github.com/python/cpython/commit/5e0ea7540f577c9684e272000fdfc80d29bb78a2


--

___
Python tracker 

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



[issue37474] Should Py_Initialize() control the floating point mode?

2019-10-01 Thread STINNER Victor


STINNER Victor  added the comment:

Sorry, I failed to find time to convert attached tests to tests in the Python 
test suite. But I understood that existing tests should be enough to control 
the rounding mode.

I removed the call. If something goes wrong, we can add it back.

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



[issue37802] micro-optimization of PyLong_FromSize_t()

2019-10-01 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +16107
pull_request: https://github.com/python/cpython/pull/16517

___
Python tracker 

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



[issue38321] Compiler warnings when building Python 3.8

2019-10-01 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +16108
pull_request: https://github.com/python/cpython/pull/16517

___
Python tracker 

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



[issue36670] regrtest: win_utils decodes typeperf output from the wrong encoding (test suite broken due to cpu usage feature on win 10/ german)

2019-10-01 Thread STINNER Victor


STINNER Victor  added the comment:

> We could avoid typeperf command by accessing directly performance counters: 
> (...)

Honestly, it sounds very complicated. I don't think that it's worth it. With 
Lorenz's fix, regrtest now "just works". So I think that it's good enough.

--

___
Python tracker 

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



[issue38243] A reflected XSS in python/Lib/DocXMLRPCServer.py

2019-10-01 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +16106
pull_request: https://github.com/python/cpython/pull/16516

___
Python tracker 

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



[issue36670] regrtest: win_utils decodes typeperf output from the wrong encoding (test suite broken due to cpu usage feature on win 10/ german)

2019-10-01 Thread miss-islington


miss-islington  added the comment:


New changeset d6a92b55944bf1ef4992e4375f02a7132717bf53 by Miss Islington (bot) 
in branch '3.7':
bpo-36670: Multiple regrtest bugfixes (GH-16511)
https://github.com/python/cpython/commit/d6a92b55944bf1ef4992e4375f02a7132717bf53


--

___
Python tracker 

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



[issue38243] A reflected XSS in python/Lib/DocXMLRPCServer.py

2019-10-01 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 8eb64155ff26823542ccf0225b3d57b6ae36ea89 by Victor Stinner 
(Dong-hee Na) in branch '2.7':
[2.7] bpo-38243: Escape the server title of DocXMLRPCServer (GH-16447)
https://github.com/python/cpython/commit/8eb64155ff26823542ccf0225b3d57b6ae36ea89


--

___
Python tracker 

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



[issue36670] regrtest: win_utils decodes typeperf output from the wrong encoding (test suite broken due to cpu usage feature on win 10/ german)

2019-10-01 Thread STINNER Victor


STINNER Victor  added the comment:

Thanks Lorenz Mende for the nice bug report, investigating the issue and 
proposing fix. I wrote a PR based on your work with some minor changes. I 
included it in a large regrtest change to fix other bugs.

regrtest should work again with locales other than English.

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



[issue37146] opcode cache for LOAD_GLOBAL emits false alarm in memory leak hunting

2019-10-01 Thread STINNER Victor


STINNER Victor  added the comment:

It seems like nobody came up with a solution for the debug mode since June. I 
close the issue. Reopen it if you would like to propose a solution.

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



[issue38321] Compiler warnings when building Python 3.8

2019-10-01 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 2f90261280e36a179831d72ce794115be31c88bb by Victor Stinner in 
branch 'master':
bpo-38321: Fix compiler warning in _randommodule.c (GH-16512)
https://github.com/python/cpython/commit/2f90261280e36a179831d72ce794115be31c88bb


--

___
Python tracker 

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



[issue37474] Should Py_Initialize() control the floating point mode?

2019-10-01 Thread STINNER Victor


Change by STINNER Victor :


--
keywords: +patch
pull_requests: +16105
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/16515

___
Python tracker 

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



[issue36670] regrtest: win_utils decodes typeperf output from the wrong encoding (test suite broken due to cpu usage feature on win 10/ german)

2019-10-01 Thread miss-islington


miss-islington  added the comment:


New changeset 6b4c70abcaa348c84a2c1bb6f5a46596cf358e36 by Miss Islington (bot) 
in branch '3.8':
bpo-36670: Multiple regrtest bugfixes (GH-16511)
https://github.com/python/cpython/commit/6b4c70abcaa348c84a2c1bb6f5a46596cf358e36


--
nosy: +miss-islington

___
Python tracker 

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



[issue37245] Azure Pipeline 3.8 CI: multiple tests hung and timed out on macOS 10.13

2019-10-01 Thread STINNER Victor


STINNER Victor  added the comment:

It seems like macOS job pass again on Azure Pipelines. I close the issue.

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



[issue36670] regrtest: win_utils decodes typeperf output from the wrong encoding (test suite broken due to cpu usage feature on win 10/ german)

2019-10-01 Thread miss-islington


Change by miss-islington :


--
pull_requests: +16104
pull_request: https://github.com/python/cpython/pull/16514

___
Python tracker 

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



[issue37507] multiprocessing: Add a stop() method to ForkServer

2019-10-01 Thread STINNER Victor


STINNER Victor  added the comment:

_test_multiprocessing.py calls:

# Stop the ForkServer process if it's running
from multiprocessing import forkserver
forkserver._forkserver._stop()

It seems like multiprocessing tests are the main consumer of this method. So 
let's keep it private for now.

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



[issue38190] regrtest: test suite completes but Tests Result is not displayed and the process hangs

2019-10-01 Thread STINNER Victor


STINNER Victor  added the comment:

I pushed different regrtest bugfixes. The situation should now be less worse. I 
close the issue.

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



[issue36670] regrtest: win_utils decodes typeperf output from the wrong encoding (test suite broken due to cpu usage feature on win 10/ german)

2019-10-01 Thread miss-islington


Change by miss-islington :


--
pull_requests: +16103
pull_request: https://github.com/python/cpython/pull/16513

___
Python tracker 

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



[issue36670] regrtest: win_utils decodes typeperf output from the wrong encoding (test suite broken due to cpu usage feature on win 10/ german)

2019-10-01 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 982bfa4da07b2e5749a0f4e68f99e972bcc3a549 by Victor Stinner in 
branch 'master':
bpo-36670: Multiple regrtest bugfixes (GH-16511)
https://github.com/python/cpython/commit/982bfa4da07b2e5749a0f4e68f99e972bcc3a549


--

___
Python tracker 

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



[issue38205] Py_UNREACHABLE() no longer behaves as a function call

2019-10-01 Thread STINNER Victor


STINNER Victor  added the comment:

The initial issue has been fixed in 3.8 and master. I close the issue.

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



[issue38304] PEP 587 implementation is not ABI forward compatible

2019-10-01 Thread STINNER Victor


STINNER Victor  added the comment:

It was decided to abandon the idea of stable ABI for PyConfig: see bpo-38326. I 
now close this issue.

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



[issue38304] PEP 587 implementation is not ABI forward compatible

2019-10-01 Thread miss-islington


miss-islington  added the comment:


New changeset d49f096cc41f57155efe71cd089c29b38c218488 by Miss Islington (bot) 
in branch '3.8':
bpo-38304: PyConfig_InitPythonConfig() cannot fail anymore (GH-16509)
https://github.com/python/cpython/commit/d49f096cc41f57155efe71cd089c29b38c218488


--
nosy: +miss-islington

___
Python tracker 

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



[issue38321] Compiler warnings when building Python 3.8

2019-10-01 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +16102
pull_request: https://github.com/python/cpython/pull/16512

___
Python tracker 

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



[issue36670] regrtest: win_utils decodes typeperf output from the wrong encoding (test suite broken due to cpu usage feature on win 10/ german)

2019-10-01 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +16101
pull_request: https://github.com/python/cpython/pull/16511

___
Python tracker 

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



  1   2   >