[issue38200] Adding itertools.pairwise to the standard library?

2019-09-17 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

FWIW, pairwise() is in the more-itertools module.  A quick code search does 
show occasional use in the wild:  
https://github.com/search?q=language%3Apython+more_itertools.pairwise=Code 
 

In my own code, I've had some cases that almost fit but they needed custom 
padding on one end or both ends:  zip([0.0] + data, data + [1.0]). Also, its 
unclear where anyone would want a wider sliding window.

Tim, do you have any thoughts about pairwise()?

--
nosy: +tim.peters

___
Python tracker 

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



[issue37812] Make implicit returns explicit in longobject.c (in CHECK_SMALL_INT)

2019-09-17 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

Greg, would you be willing to work on a PR that reverts pr15216 and pr15710 
while preserving the efforts of pr15192 ?

--

___
Python tracker 

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



[issue37812] Make implicit returns explicit in longobject.c (in CHECK_SMALL_INT)

2019-09-17 Thread Greg Price


Greg Price  added the comment:

> We're wasted a lot of dev time on something that never promised much value in 
> the first place.  So, I'll revert and close this tracker issue

OK, so be it.  I'll certainly agree that this series of threads consumed a lot 
more time than I anticipated or hoped, though I think we have different 
analyses of why that was.

(As you can probably guess, my previous message crossed with yours.)

--

___
Python tracker 

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



[issue37812] Make implicit returns explicit in longobject.c (in CHECK_SMALL_INT)

2019-09-17 Thread Ma Lin


Ma Lin  added the comment:

> I agree that both changes should be reverted.

There is another commit after the two commits:
https://github.com/python/cpython/commit/c6734ee7c55add5fdc2c821729ed5f67e237a096

It is troublesome to revert them.

PR 16146 is on-going, maybe we can request the author to replace 
`Py_UNREACHABLE()` with `assert(0)`.

--

___
Python tracker 

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



[issue38015] inline function generates slightly inefficient machine code

2019-09-17 Thread Greg Price


Greg Price  added the comment:

See followup at https://bugs.python.org/issue38205 and 
https://bugs.python.org/issue37812#msg352670 .

The patch in GH-15710 had a side effect of introducing a call to 
`Py_UNREACHABLE` inside a comma-expression.  A subsequent commit 3ab61473b 
changed `Py_UNREACHABLE` in a way that made that a syntax error; the issue 
wasn't caught then because the code is only compiled if `NSMALLNEGINTS + 
NSMALLPOSINTS <= 0`.  Detailed discussion on those threads.

--

___
Python tracker 

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



[issue37812] Make implicit returns explicit in longobject.c (in CHECK_SMALL_INT)

2019-09-17 Thread Greg Price


Greg Price  added the comment:

> if using a static inline function is causing issues

Separately from whether there was or wasn't such an issue here, I think it's 
interesting to note that the build failure bpo-38205 is an example of exactly 
the opposite!  It was caused by a combination of
(a) using a macro *instead* of a plain old C function;
(b) using avoidable preprocessor conditionals.

And both of them led to that build failure in classic ways.

Specifically, the build failure happened because

(a) this `Py_UNREACHABLE` call was in an unusual syntactic context, squished 
into an expression, in order to use it in a macro.

(b) the call was behind an `#ifdef`/`#else`; and the configuration that 
included it wasn't one that got test-built by the authors of 3ab61473b (which 
modified `Py_UNREACHABLE`), nor by CI.

When conditional preprocessing is kept to a minimum -- here, if the `#if 
NSMALLNEGINTS + NSMALLPOSINTS > 0` conditional enclosed just the `small_ints` 
array that it needs to -- then this kind of build regression on non-default 
configurations can't so easily happen.

--

___
Python tracker 

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



[issue37812] Make implicit returns explicit in longobject.c (in CHECK_SMALL_INT)

2019-09-17 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

Sorry Greg, I know you're enthusiastic about this but I think both changes were 
a mistake.  As the person who merged them, I've decided to revert them in favor 
of stable code (FWIW, I do care about Ma Lin's concerns in the other BPO and I 
don't want the generated code to be any different than it was).

We're wasted a lot of dev time on something that never promised much value in 
the first place.  So, I'll revert and close this tracker issue so we can move 
on to something more substantive.

--

___
Python tracker 

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



[issue37812] Make implicit returns explicit in longobject.c (in CHECK_SMALL_INT)

2019-09-17 Thread Ma Lin


Ma Lin  added the comment:

> It's not clear to me if anyone benchmarked to see if the
> conversion to a macro had any measurable performance benefit.

I tested on that day, also use this command: 

python.exe -m pyperf timeit -s "from collections import deque; consume = 
deque(maxlen=0).extend; r = range(256)" "consume(r)"  --duplicate=1000

I remember the results are:
inline function: 1.6  us
macro version  : 1.27 us
(32-bit release build by MSVC 2017)

Since the difference is too obvious, I tested it only once for each version.

--

___
Python tracker 

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



[issue37812] Make implicit returns explicit in longobject.c (in CHECK_SMALL_INT)

2019-09-17 Thread Greg Price


Greg Price  added the comment:

Thanks Victor for linking that issue back here.

> A first change converted a macro to a static inline function. The second 
> change converted the static inline fnuction to a macro

Not quite. The first change converted a macro `CHECK_SMALL_INT` to an 
equivalent sequence, including a `return` that had been hidden inside the macro:

if (is_small_int(ival)) {
return get_small_int((sdigit)ival);
}

The second change converted `is_small_int` to a macro `IS_SMALL_INT`.

The second change also changed an `assert(0)` to say `Py_UNREACHABLE()`. I 
don't know why it did that -- it seems quite orthogonal to the rest of the 
change.


> Morever, if using a static inline function is causing issues,

The change that caused the build failure you're seeing (GH-15710) was intended 
for bpo-38015 .  Details there; briefly, common compilers on x86_32 would emit 
some unsightly extra instructions with `is_small_int`, and converting it to the 
macro `IS_SMALL_INT` eliminated those extra instructions.

It's not clear to me if anyone benchmarked to see if the conversion to a macro 
had any measurable performance benefit.  There's some measurement here:
https://bugs.python.org/issue38015#msg351315
which finds no benefit.  I'm not sure if that was measuring the change in 
GH-15710, or if it was an attempt to replicate the findings in msg351255 (which 
it quotes) about a more invasive change.

So I think the short of it is that the static inline function was not causing 
any issue, and an easy fix for the build failure is to revert GH-15710.

Alternatively, another easy fix would be to replace just the `Py_UNREACHABLE()` 
introduced by GH-15710 with the original `assert(0)`.

Either way, I don't think there's any reason here to revert GH-15216.

--

___
Python tracker 

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



[issue36546] Add quantiles() to the statistics module

2019-09-17 Thread Raymond Hettinger


Raymond Hettinger  added the comment:


New changeset 31af1cce9d799475ba8c3dec3e239b4a75ce268f by Raymond Hettinger 
(Miss Islington (bot)) in branch '3.8':
bpo-36546: No longer a need to make "data" positional only (GH-16252) (GH-16253)
https://github.com/python/cpython/commit/31af1cce9d799475ba8c3dec3e239b4a75ce268f


--

___
Python tracker 

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



[issue36546] Add quantiles() to the statistics module

2019-09-17 Thread miss-islington


Change by miss-islington :


--
pull_requests: +15848
pull_request: https://github.com/python/cpython/pull/16253

___
Python tracker 

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



[issue36546] Add quantiles() to the statistics module

2019-09-17 Thread Raymond Hettinger


Raymond Hettinger  added the comment:


New changeset 272d0d017aef585acf84bb0af99a90a2a8582b2c by Raymond Hettinger in 
branch 'master':
bpo-36546: No longer a need to make "data" positional only (GH-16252)
https://github.com/python/cpython/commit/272d0d017aef585acf84bb0af99a90a2a8582b2c


--

___
Python tracker 

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



[issue27970] ssl: can't verify a trusted site with imcomplete certificate chain

2019-09-17 Thread Greg Lindahl


Change by Greg Lindahl :


--
nosy: +wumpus

___
Python tracker 

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



[issue36546] Add quantiles() to the statistics module

2019-09-17 Thread Raymond Hettinger


Change by Raymond Hettinger :


--
pull_requests: +15847
pull_request: https://github.com/python/cpython/pull/16252

___
Python tracker 

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



[issue37812] Make implicit returns explicit in longobject.c (in CHECK_SMALL_INT)

2019-09-17 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

Victor, I agree that both changes should be reverted.  We should avoid churning 
long stable, bug free code for minimal aesthetic value.

--

___
Python tracker 

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



[issue37657] ERROR: grip 4.5.2 requires docopt>=0.4.0, which is not installed.

2019-09-17 Thread Dima Tisnek


Dima Tisnek  added the comment:

I've nuked 3.8/.../site-packages and the problem is gone; confirmed by 
reinstalling 3.8 from scratch.

It must've been something in the my environment, if/when I find what it was, 
I'll open a bug in the respective package.

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



[issue37657] ERROR: grip 4.5.2 requires docopt>=0.4.0, which is not installed.

2019-09-17 Thread Dima Tisnek


Dima Tisnek  added the comment:

I've just got it again, when running `Install Certificates.command` after 
installing Python 3.8.0b4.

Yes I do have Python 3.7 installed and had earlier 3.8 builds installed.

Could it be referenced by `pip`? Or `certifi` itself? I can't find any 
references...

I can reproduce this at will with:
`python -E -s -m pip install --upgrade certifi --force`

The `-E -s -m pip` is taken from the cert script, and `--force` is added so 
that pip doesn't short circuit.

Could it be that `grip` is installed badly and that even with `-E -s` it's 
somehow loaded?

--
status: pending -> open

___
Python tracker 

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



[issue38203] regrtest fails to stop test_multiprocessing_spawn worker process

2019-09-17 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +15846
pull_request: https://github.com/python/cpython/pull/16250

___
Python tracker 

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



[issue38203] regrtest fails to stop test_multiprocessing_spawn worker process

2019-09-17 Thread STINNER Victor


Change by STINNER Victor :


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

___
Python tracker 

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



[issue38205] Python no longer compiles without small integer singletons

2019-09-17 Thread STINNER Victor


STINNER Victor  added the comment:

See https://bugs.python.org/issue37812#msg352670 and 
https://bugs.python.org/issue38015

--

___
Python tracker 

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



[issue38205] Python no longer compiles without small integer singletons

2019-09-17 Thread Ma Lin


Ma Lin  added the comment:

We can change Py_UNREACHABLE() to assert(0) in longobject.c
Or remove the article in Py_UNREACHABLE()

--

___
Python tracker 

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



[issue38206] Clarify that tp_dealloc must decref for heap allocated type

2019-09-17 Thread Ammar Askar


Change by Ammar Askar :


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

___
Python tracker 

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



[issue38205] Python no longer compiles without small integer singletons

2019-09-17 Thread Ma Lin


Ma Lin  added the comment:

This commit changed Py_UNREACHABLE() five days ago:

https://github.com/python/cpython/commit/3ab61473ba7f3dca32d779ec2766a4faa0657923

If remove this change, it can be compiled successfully.

--
nosy: +Ma Lin

___
Python tracker 

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



[issue37531] Fix regrtest timeout for subprocesses: regrtest -jN --timeout=SECONDS

2019-09-17 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset b9877cd2cc47b6f3512c171814c4f630286279b9 by Victor Stinner in 
branch 'master':
bpo-37531: Skip test_regrtest.test_multiprocessing_timeout() on Windows 
(GH-16247)
https://github.com/python/cpython/commit/b9877cd2cc47b6f3512c171814c4f630286279b9


--

___
Python tracker 

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



[issue38207] subprocess: On Windows, Popen.kill() + Popen.communicate() is blocking until all processes using the pipe close the pipe

2019-09-17 Thread Jeremy Kloth


Change by Jeremy Kloth :


--
nosy: +jkloth

___
Python tracker 

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



[issue38207] subprocess: On Windows, Popen.kill() + Popen.communicate() is blocking until all processes using the pipe close the pipe

2019-09-17 Thread STINNER Victor


STINNER Victor  added the comment:

See also bpo-37424 was has been fixed: "subprocess.run timeout does not 
function if shell=True and capture_output=True".

--

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


STINNER Victor  added the comment:

> On Windows, the following pattern _can_ hang: (...)

I created bpo-38207 "subprocess: On Windows, Popen.kill() + Popen.communicate() 
is blocking until all processes using the pipe close the pipe" to track this 
issue.

--

___
Python tracker 

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



[issue29652] Fix evaluation order of keys/values in dict comprehensions

2019-09-17 Thread Brett Cannon


Change by Brett Cannon :


--
resolution:  -> fixed
stage:  -> resolved
status:  -> closed

___
Python tracker 

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



[issue38070] visit_decref(): add an assertion to check that the object is not freed

2019-09-17 Thread STINNER Victor


STINNER Victor  added the comment:

msg351473 example with the new assertion and enhanced debug functions:
---
Modules/gcmodule.c:379: visit_decref: Assertion "!_PyObject_IsFreed(op)" failed

Fatal Python error: _PyObject_AssertFailed
Python runtime state: finalizing (tstate=0x1d1c9b0)

Current thread 0x7ff010841740 (most recent call first):

Aborted (core dumped)
---

* Obviously, "Modules/gcmodule.c:379: visit_decref: Assertion 
"!_PyObject_IsFreed(op)" failed" is the first most visible enhancement
* Add "Python runtime state: finalizing (tstate=0x1d1c9b0)": Python is 
finalizing (Py_Finalize)
* New "" in the traceback
* "" became "": add the object 
address

--

___
Python tracker 

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



[issue38070] visit_decref(): add an assertion to check that the object is not freed

2019-09-17 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 1ce16fb0977283ae42a9f8917bbca5f44aa69324 by Victor Stinner in 
branch 'master':
bpo-38070: Py_FatalError() logs runtime state (GH-16246)
https://github.com/python/cpython/commit/1ce16fb0977283ae42a9f8917bbca5f44aa69324


--

___
Python tracker 

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



[issue37531] Fix regrtest timeout for subprocesses: regrtest -jN --timeout=SECONDS

2019-09-17 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +15843
pull_request: https://github.com/python/cpython/pull/16247

___
Python tracker 

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



[issue37531] Fix regrtest timeout for subprocesses: regrtest -jN --timeout=SECONDS

2019-09-17 Thread STINNER Victor


STINNER Victor  added the comment:

I created bpo-38207 "subprocess: On Windows, Popen.kill() + Popen.communicate() 
is blocking until all processes using the pipe close the pipe".

--

___
Python tracker 

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



[issue38207] subprocess: On Windows, Popen.kill() + Popen.communicate() is blocking until all processes using the pipe close the pipe

2019-09-17 Thread STINNER Victor


New submission from STINNER Victor :

On Windows, the communicate() method of subprocess.Popen is implemented with 
threads calling:

def _readerthread(self, fh, buffer):
buffer.append(fh.read())
fh.close()

where fh is one the Popen pipes: popen.stdout or popen.stderr.

For stdout=PIPE and/or stderr=PIPE, Popen._get_handles() creates a pipe with 
_winapi.CreatePipe(None, 0).

The fh.read() calls only completes when the write end of the pipe is closed: 
when all open handles of the write end of the pipe are closed.

When using Popen(stdout=PIPE), Python uses the pipe as stdout:

startupinfo.dwFlags |= _winapi.STARTF_USESTDHANDLES
startupinfo.hStdInput = p2cread
startupinfo.hStdOutput = c2pwrite
startupinfo.hStdError = errwrite

So far so good, it works well when Python spawns a single process.

--

Problems arise when the child process itself spawns new processes. In that 
case, the stdout pipe is inherited by other processes.

Popen.communicate() will block until all processes close the pipe.

This behavior is surprising for the following pattern:
--
try:
stdout, stderr = popen.communicate(timeout=5.0)
except subprocess.TimeoutExpired:
popen.kill()
stdout, stderr = popen.communicate()
--

I would expect that the second communicate() call completes immediately since 
we just killed the process: Windows knows that child process is dead, Python 
knows that Popen object has been kill, but fh.read() continues to block (until 
all processes closed the pipe).

I would expect communicate() to complete immediately.

The problem is that fh.read() only returns once all data is returned at once. 
If fh.read() call is cancelled somehow, communicate() would just return empty 
data: we loose all data.

--

Eryk Sun proposed two solutions:
https://bugs.python.org/issue37531#msg350246

"For Windows, subprocess could have a _read_all(file) method that special cases 
a pipe. The read loop for a pipe would check whether the child has exited. Then 
call _winapi.PeekNamedPipe on the handle (from get_osfhandle), and do a raw 
read of the available bytes. If the child has exited or PeekNamedPipe fails 
(EPIPE), then break, join the partial reads, decode and translate newlines if 
it's text mode, and return."

and:
https://bugs.python.org/issue37531#msg350329

"Alternatively, instead of special casing the file type and spinning on 
PeekNamedPipe, the workaround could be based on a multiple-object wait that 
includes the child process handle. In this case, communicate() would always 
call _communicate in Windows, regardless of the timeout or number of pipes -- 
because simplistically calling either self.stdout.read() or self.stderr.read() 
could hang. 

The implementation would be moderately complicated. If we stop waiting on the 
reader threads because the process exited, we can give the threads a short time 
to finish reading and close the files -- maybe 250 ms is enough. But if they 
haven't exited at this time, we can't simply raise a TimeoutExpired exception 
if the call hasn't actually timed out.  To finish the _communicate call, we 
would have to cancel the pending reads and join() the threads.

We can force a reader thread to exit by canceling the read via WINAPI 
CancelIoEx. However, _readerthread has to be modified to support this. It could 
be implemented as a loop that calls _winapi.ReadFile to read the output in 
chunks that get appended to the buffer list. The read loop would break for 
either ERROR_BROKEN_PIPE or ERROR_OPERATION_ABORTED (canceled). 

The final step in _communicate would be to concatenate the partial reads. If 
it's text mode, it would also have to decode the bytes and translate newlines. 
The POSIX implementation of _communicate has to do this, so we already have a 
_translate_newlines method for this case.

Note that _winapi.WaitForMultipleObjects is interruptible in the main thread 
via Ctrl+C, which is a bonus improvement since Thread.join() can't be 
interrupted in Windows."

--

This issue has been discussed in bpo-37531 about regrtest:

https://bugs.python.org/issue37531#msg350181

It impacts the Python test suite when a test uses multiprocessing (for example) 
which spawns new processes.

--
components: Library (Lib)
messages: 352673
nosy: vstinner
priority: normal
severity: normal
status: open
title: subprocess: On Windows, Popen.kill() + Popen.communicate() is blocking 
until all processes using the pipe close the pipe
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



[issue38206] Clarify that tp_dealloc must decref for heap allocated type

2019-09-17 Thread Ammar Askar


New submission from Ammar Askar :

When dealing with a heap allocated type 
(https://docs.python.org/3/c-api/typeobj.html#Py_TPFLAGS_HEAPTYPE / 
PyType_FromSpec), if the type has a custom tp_dealloc function then it MUST 
decrement the references to the type object itself due to this code block: 
https://github.com/python/cpython/blob/4a12a178f4a6b9a59d97fecc727f2b6b28dfc85f/Objects/typeobject.c#L1189-L1192

The only mention of this is within the whatsnew entry for 3.8: 
https://github.com/python/cpython/commit/364f0b0f19cc3f0d5e63f571ec9163cf41c62958#diff-77c703d9a958f6a4b0dc2f692b3fd5b3

This error was made in 
https://github.com/python/cpython/pull/16127#pullrequestreview-288312751 and 
https://github.com/python/cpython/pull/16071#pullrequestreview-287819525

It seems like a common pitfall, let's add a note about this in the doc.

--
assignee: docs@python
components: Documentation
messages: 352672
nosy: ammar2, docs@python
priority: normal
severity: normal
status: open
title: Clarify that tp_dealloc must decref for heap allocated type
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



[issue38204] Cannot compile on RPi with optimizations

2019-09-17 Thread Ammar Askar


Ammar Askar  added the comment:

Could you provide the output of 

  gcc --version

and

  ld --version

--
nosy: +ammar2

___
Python tracker 

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



[issue37812] Make implicit returns explicit in longobject.c (in CHECK_SMALL_INT)

2019-09-17 Thread STINNER Victor


STINNER Victor  added the comment:

Sadly, GH-15710 was merged without mentioning the bpo-37812 (this issue) in the 
final commit message :-(

commit 6b519985d23bd0f0bd072b5d5d5f2c60a81a19f2
Author: animalize 
Date:   Fri Sep 6 14:00:56 2019 +0800

replace inline function `is_small_int` with a macro version (GH-15710)


This second change introduced a regression: bpo-38205 "Python no longer 
compiles without small integer singletons".

I don't understand the whole issue. A first change converted a macro to a 
static inline function. The second change converted the static inline fnuction 
to a macro... but the overall change introduced a regression. Why not reverting 
the first change instead of pushing a new change?

Morever, if using a static inline function is causing issues, it would be nice 
to add a comment to explain why, so the issue will be avoided in the future.

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



[issue38205] Python no longer compiles without small integer singletons

2019-09-17 Thread STINNER Victor


New submission from STINNER Victor :

With the following change, Python no longer compiles. I'm sure that it compiled 
successfully 2 weeks ago.

diff --git a/Objects/longobject.c b/Objects/longobject.c
index 4cf2b0726e..0ad2609882 100644
--- a/Objects/longobject.c
+++ b/Objects/longobject.c
@@ -16,10 +16,10 @@ class int "PyObject *" "_Type"
 /*[clinic end generated code: output=da39a3ee5e6b4b0d input=ec0275e3422a36e3]*/
 
 #ifndef NSMALLPOSINTS
-#define NSMALLPOSINTS   257
+#define NSMALLPOSINTS   0
 #endif
 #ifndef NSMALLNEGINTS
-#define NSMALLNEGINTS   5
+#define NSMALLNEGINTS   0
 #endif
 
 _Py_IDENTIFIER(little);


Main GCC error:

Objects/longobject.c: In function '_PyLong_Copy':
./Include/pymacro.h:119:26: error: expected expression before 'do'
  119 | #define Py_UNREACHABLE() do { \
  |  ^~
Objects/longobject.c:83:30: note: in expansion of macro 'Py_UNREACHABLE'
   83 | #define get_small_int(ival) (Py_UNREACHABLE(), NULL)
  |  ^~


It seems to be a regression introduced by:

commit 6b519985d23bd0f0bd072b5d5d5f2c60a81a19f2
Author: animalize 
Date:   Fri Sep 6 14:00:56 2019 +0800

replace inline function `is_small_int` with a macro version (GH-15710)

--
components: Interpreter Core
messages: 352669
nosy: vstinner
priority: normal
severity: normal
status: open
title: Python no longer compiles without small integer singletons
type: compile error
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



[issue38204] Cannot compile on RPi with optimizations

2019-09-17 Thread Thomas Knox


New submission from Thomas Knox :

Trying to compile 3.8.0b4 on an raspberry pi 3B+ and 4 running:

pi@pi4b:~/Downloads/Python-3.8.0b4 $ uname -a
Linux pi4b 4.19.66-v7l+ #1253 SMP Thu Aug 15 12:02:08 BST 2019 armv7l GNU/Linux

Using arguments:

./configure --disable-shared --enable-optimizations 
--enable-loadable-sqlite-extensions --enable-ipv6 --enable-big-digits 
--with-lto --with-doc-strings --with-ensurepip --with-openssl=/usr

fails compilation at the linking stage with the errors:

/usr/bin/ld: /usr/bin/ld: DWARF error: offset (7602768) greater than or equal 
to .debug_str size (517480)
/usr/bin/ld: DWARF error: offset (2013417729) greater than or equal to 
.debug_str size (517480)
/usr/bin/ld: DWARF error: offset (1375799296) greater than or equal to 
.debug_str size (517480)
/usr/bin/ld: DWARF error: offset (3959620946) greater than or equal to 
.debug_str size (517480)
/usr/bin/ld: DWARF error: offset (150994953) greater than or equal to 
.debug_str size (517480)
/usr/bin/ld: DWARF error: offset (622700) greater than or equal to .debug_str 
size (517480)
/usr/bin/ld: DWARF error: offset (990813185) greater than or equal to 
.debug_str size (517480)
/usr/bin/ld: DWARF error: could not find abbrev number 9630
/tmp/ccX29Gpf.lto.o: in function `copy_base':
:(.text+0x8374): undefined reference to 
`__gcov_one_value_profiler_atomic'
/usr/bin/ld: :(.text+0x8388): undefined reference to 
`__gcov_average_profiler_atomic'
/usr/bin/ld: :(.text+0x8398): undefined reference to 
`__gcov_ior_profiler_atomic'
/usr/bin/ld: :(.text+0x840c): undefined reference to 
`__gcov_one_value_profiler_atomic'
/usr/bin/ld: :(.text+0x8420): undefined reference to 
`__gcov_average_profiler_atomic'
/usr/bin/ld: :(.text+0x8430): undefined reference to 
`__gcov_ior_profiler_atomic'
/usr/bin/ld: :(.text+0x84c8): undefined reference to 
`__gcov_one_value_profiler_atomic'
/usr/bin/ld: :(.text+0x84dc): undefined reference to 
`__gcov_average_profiler_atomic'
/usr/bin/ld: :(.text+0x84ec): undefined reference to 
`__gcov_ior_profiler_atomic'
/usr/bin/ld: :(.text+0x856c): undefined reference to 
`__gcov_one_value_profiler_atomic'
/usr/bin/ld: :(.text+0x8580): undefined reference to 
`__gcov_average_profiler_atomic'
/usr/bin/ld: :(.text+0x8590): undefined reference to 
`__gcov_ior_profiler_atomic'
/usr/bin/ld: :(.text+0x866c): undefined reference to 
`__gcov_one_value_profiler_atomic'
/usr/bin/ld: :(.text+0x867c): undefined reference to 
`__gcov_average_profiler_atomic'
/usr/bin/ld: :(.text+0x868c): undefined reference to 
`__gcov_ior_profiler_atomic'
/usr/bin/ld: :(.text+0x8718): undefined reference to 
`__gcov_one_value_profiler_atomic'
/usr/bin/ld: :(.text+0x8728): undefined reference to 
`__gcov_average_profiler_atomic'
/usr/bin/ld: :(.text+0x8738): undefined reference to 
`__gcov_ior_profiler_atomic'
/usr/bin/ld: :(.text+0x87b0): undefined reference to 
`__gcov_one_value_profiler_atomic'
/usr/bin/ld: :(.text+0x87c8): undefined reference to 
`__gcov_average_profiler_atomic'
/usr/bin/ld: :(.text+0x87d8): undefined reference to 
`__gcov_ior_profiler_atomic'
...
For hundreds of lines.

Removing the --enable-optimizations flag allows it compile and link.

--
components: Build
messages: 352668
nosy: DNSGeek
priority: normal
severity: normal
status: open
title: Cannot compile on RPi with optimizations
type: compile error
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



[issue38070] visit_decref(): add an assertion to check that the object is not freed

2019-09-17 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +15842
pull_request: https://github.com/python/cpython/pull/16246

___
Python tracker 

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



[issue38070] visit_decref(): add an assertion to check that the object is not freed

2019-09-17 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset d3b904144e86e2442961de6a7dccecbe133d5c6d by Victor Stinner in 
branch 'master':
bpo-38070: Add _PyRuntimeState.preinitializing (GH-16245)
https://github.com/python/cpython/commit/d3b904144e86e2442961de6a7dccecbe133d5c6d


--

___
Python tracker 

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



[issue38070] visit_decref(): add an assertion to check that the object is not freed

2019-09-17 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +15841
pull_request: https://github.com/python/cpython/pull/16245

___
Python tracker 

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



[issue38070] visit_decref(): add an assertion to check that the object is not freed

2019-09-17 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset b39afb78768418d9405c4b528c80fa968ccc974d by Victor Stinner in 
branch 'master':
bpo-38070: Enhance _PyObject_Dump() (GH-16243)
https://github.com/python/cpython/commit/b39afb78768418d9405c4b528c80fa968ccc974d


--

___
Python tracker 

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



[issue38070] visit_decref(): add an assertion to check that the object is not freed

2019-09-17 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 8fa3e1740b3f03ea65ddb68411c2238c5f98eec2 by Victor Stinner in 
branch 'master':
bpo-38070: _Py_DumpTraceback() writes  (GH-16244)
https://github.com/python/cpython/commit/8fa3e1740b3f03ea65ddb68411c2238c5f98eec2


--

___
Python tracker 

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



[issue38070] visit_decref(): add an assertion to check that the object is not freed

2019-09-17 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +15840
pull_request: https://github.com/python/cpython/pull/16244

___
Python tracker 

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



[issue38070] visit_decref(): add an assertion to check that the object is not freed

2019-09-17 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +15839
pull_request: https://github.com/python/cpython/pull/16243

___
Python tracker 

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



[issue38203] regrtest fails to stop test_multiprocessing_spawn worker process

2019-09-17 Thread STINNER Victor


STINNER Victor  added the comment:

Moreover, even after I stopped regrtest, two processes are still running in the 
background :-(

 6535 pts/2Sl 0:00 /home/vstinner/python/master/python -c from 
multiprocessing.spawn import spawn_main; spawn_main(tracker_fd=4, 
pipe_handle=9) --multiprocessing-fork

 6560 pts/2Sl 0:00 /home/vstinner/python/master/python -c from 
multiprocessing.spawn import spawn_main; spawn_main(tracker_fd=4, 
pipe_handle=11) --multiprocessing-fork

--

___
Python tracker 

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



[issue38203] regrtest fails to stop test_multiprocessing_spawn worker process

2019-09-17 Thread STINNER Victor


New submission from STINNER Victor :

I ran tests locally on my laptop. Tests were running for 2 minutes. I 
interrupted the process by pressing CTRL+c: regrtest failed to stop immediately 
the worker . Then, regrtest main process hangs in threading._shutdown(). I had 
to press again CTRL+c to unblock it :-(


This bug may be related to bpo-37531 "Fix regrtest timeout for subprocesses: 
regrtest -jN --timeout=SECONDS".

See also bpo-38190 "regrtest: test suite completes but Tests Result is not 
displayed and the process hangs" which might be related?


vstinner@apu$ make && ./python -m test -j0 -r
...
0:02:03 load avg: 8.15 [240/419] test_dynamicclassattribute passed -- running: 
test_multiprocessing_spawn (1 min 17 sec), test_multiprocessing_forkserver (1 
min 17 sec), test_gdb (1 min 32 sec), test_multiprocessing_fork (50 sec 894 ms)
0:02:03 load avg: 8.15 [241/419] test_importlib passed -- running: 
test_multiprocessing_spawn (1 min 17 sec), test_multiprocessing_forkserver (1 
min 17 sec), test_gdb (1 min 32 sec), test_multiprocessing_fork (50 sec 998 ms)
0:02:04 load avg: 8.15 [242/419] test_ensurepip passed -- running: 
test_multiprocessing_spawn (1 min 18 sec), test_multiprocessing_forkserver (1 
min 18 sec), test_gdb (1 min 33 sec), test_multiprocessing_fork (51 sec 937 ms)
^C
Kill worker process 6290 running for 2.7 sec
Kill worker process 6290 running for 2.7 sec
Kill worker process 28037 running for 78.3 sec
Kill worker process 6538 running for 1.2 sec
Kill worker process 6538 running for 1.2 sec
Kill worker process 5567 running for 4.6 sec
Kill worker process 5567 running for 4.6 sec
Kill worker process 28020 running for 79.0 sec
Kill worker process 3314 running for 22.5 sec
Kill worker process 3314 running for 22.5 sec
Kill worker process 28020 running for 79.0 sec
Kill worker process 6533 running for 1.4 sec
Kill worker process 6533 running for 1.4 sec
Kill worker process 27563 running for 93.8 sec
Kill worker process 27563 running for 93.8 sec
Kill worker process 31118 running for 52.1 sec
Kill worker process 31118 running for 52.2 sec
Wait for regrtest worker  for 1.1 sec
Wait for regrtest worker  for 2.1 sec
Wait for regrtest worker  for 3.1 sec
Wait for regrtest worker  for 4.1 sec
Wait for regrtest worker  for 5.1 sec
Wait for regrtest worker  for 6.1 sec
Wait for regrtest worker  for 7.1 sec
Wait for regrtest worker  for 8.1 sec
Wait for regrtest worker  for 9.1 sec
Wait for regrtest worker  for 10.1 sec
Wait for regrtest worker  for 11.1 sec
Wait for regrtest worker  for 12.1 sec
Wait for regrtest worker  for 13.1 sec
Wait for regrtest worker  for 14.1 sec
Wait for regrtest worker  for 15.1 sec
Wait for regrtest worker  for 16.1 sec
Wait for regrtest worker  for 17.1 sec
Wait for regrtest worker  for 18.1 sec
Wait for regrtest worker  for 19.1 sec
Wait for regrtest worker  for 20.1 sec
Wait for regrtest worker  for 21.1 sec
Wait for regrtest worker  for 22.1 sec
Wait for regrtest worker  for 23.1 sec
Wait for regrtest worker  for 24.1 sec
Wait for regrtest worker  for 25.1 sec
Wait for regrtest worker  for 26.1 sec
Wait for regrtest worker  for 27.1 sec
Wait for regrtest worker  for 28.1 sec
Wait for regrtest worker  for 29.1 sec
Wait for regrtest worker  for 30.1 sec
Warning -- failed to join a regrtest worker 

== Tests result: INTERRUPTED ==
Test suite interrupted by signal SIGINT.

177 tests omitted:
test__osx_support test_abstract_numbers test_aifc test_asyncgen
test_atexit test_audit test_base64 test_binascii test_bisect
test_buffer test_bz2 test_c_locale_coercion test_calendar
test_call test_charmapcodec test_clinic test_cmd_line
test_cmd_line_script test_code test_codecencodings_hk
test_codecencodings_iso2022 test_codecencodings_jp
test_codecencodings_kr test_codecmaps_tw test_codecs test_compile
test_complex test_concurrent_futures test_configparser
test_contains test_contextlib test_contextlib_async test_copy
test_copyreg test_coroutines test_crashers test_csv test_ctypes
test_curses test_decorators test_deque test_dictviews test_dis
test_doctest test_dtrace test_dynamic test_email test_embed
test_exception_variations test_exceptions test_faulthandler
test_file test_finalization test_flufl test_fork1 test_format
test_future3 test_future5 test_gdb test_genericclass
test_genericpath test_grp test_heapq test_htmlparser test_httplib
test_imghdr test_imp test_int test_io test_ioctl test_ipaddress
test_isinstance test_itertools test_json test_keyword
test_largefile test_lib2to3 test_linecache test_lltrace
test_logging test_mailcap test_marshal test_math test_memoryio
test_multibytecodec test_multiprocessing_fork
test_multiprocessing_forkserver test_multiprocessing_main_handling
test_multiprocessing_spawn test_named_expressions test_netrc
test_numeric_tower test_openpty test_operator test_ordered_dict
test_os test_ossaudiodev test_parser test_pathlib test_pdb
test_peepholer 

[issue30367] Cannot build CPython3.6 with module “testcapimodule” statically

2019-09-17 Thread STINNER Victor


STINNER Victor  added the comment:

It seems like this issue has been fixed in 3.8 and master branches (I didn't 
test Python 3.7): see below.

I close the issue. Reopen/comment the issue if you consider that Python 3.7 
should be fixed as well.


I made this change:

$ git diff
diff --git a/Modules/Setup b/Modules/Setup
index 983fa014ec..ff2fd14857 100644
--- a/Modules/Setup
+++ b/Modules/Setup
@@ -151,6 +151,10 @@ _symtable symtablemodule.c
 # modules are to be built as shared libraries (see above for more
 # detail; also note that *static* or *disabled* cancels this effect):
 
+*static*
+
+_datetime _datetimemodule.c# datetime accelerator
+
 #*shared*
 
 # GNU readline.  Unlike previous Python incarnations, GNU readline is
@@ -177,7 +181,6 @@ _symtable symtablemodule.c
 #_random _randommodule.c   # Random number generator
 #_elementtree -I$(srcdir)/Modules/expat -DHAVE_EXPAT_CONFIG_H 
-DUSE_PYEXPAT_CAPI _elementtree.c# elementtree accelerator
 #_pickle _pickle.c # pickle accelerator
-#_datetime _datetimemodule.c   # datetime accelerator
 #_bisect _bisectmodule.c   # Bisection algorithms
 #_heapq _heapqmodule.c # Heap queue algorithm
 #_asyncio _asynciomodule.c  # Fast asyncio Future


I built Python: it works as expected, _datetime is a built-in module:

$ ./python
Python 3.9.0a0 (heads/master-dirty:46b0b81220, Sep 17 2019, 22:42:19) 
[GCC 9.2.1 20190827 (Red Hat 9.2.1-1)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import _datetime
>>> _datetime



Note:

$ make
...
The following modules found by detect_modules() in setup.py, have been
built by the Makefile instead, as configured by the Setup files:
_abc  _datetime atexit 
pwd   time 
...

--
resolution:  -> fixed
stage:  -> resolved
status: open -> closed
versions: +Python 3.8, Python 3.9 -Python 3.6

___
Python tracker 

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



[issue13153] IDLE 3.x on Windows exits when pasting non-BMP unicode

2019-09-17 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

Another report today on idle-dev that pasting emoji exits IDLE.

Serhiy, I applied the _tkinter part of your...args_2.patch to a branch of 
current master -- see serhiy_tkinter.patch.  (Could push branch if helpful.).

After recompiling _tkinter.c, pasting  still gives same error.

--

___
Python tracker 

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



[issue38200] Adding itertools.pairwise to the standard library?

2019-09-17 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

Can you show some examples of what you used it for?

--
assignee:  -> rhettinger

___
Python tracker 

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



[issue38191] typing.NamedTuple() should prefix parameters with '_'

2019-09-17 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset 8fc5839a9def34c13b6025c291434ba5fb5d6442 by Serhiy Storchaka in 
branch 'master':
bpo-38191: Turn warnings into errors in NamedTuple() and TypedDict(). (GH-16238)
https://github.com/python/cpython/commit/8fc5839a9def34c13b6025c291434ba5fb5d6442


--

___
Python tracker 

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



[issue38202] A fatal error in test_dictviews

2019-09-17 Thread Zackery Spytz


Change by Zackery Spytz :


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

___
Python tracker 

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



[issue38202] A fatal error in test_dictviews

2019-09-17 Thread Zackery Spytz


New submission from Zackery Spytz :

When running test_dictviews, I sometimes encounter a fatal error.

./python -m test test_dictviews
Run tests sequentially
0:00:00 load avg: 0.36 [1/1] test_dictviews
python: Objects/typeobject.c:3125: _PyType_Lookup: Assertion 
`!PyErr_Occurred()' failed.
Fatal Python error: Aborted

Current thread 0x7fd5506de140 (most recent call first):
  File "/home/lubuntu2/cpython/Lib/test/test_dictviews.py", line 166 in 
test_items_set_operations
  File "/home/lubuntu2/cpython/Lib/unittest/case.py", line 617 in 
_callTestMethod
  File "/home/lubuntu2/cpython/Lib/unittest/case.py", line 663 in run
  File "/home/lubuntu2/cpython/Lib/unittest/case.py", line 725 in __call__
  File "/home/lubuntu2/cpython/Lib/unittest/suite.py", line 122 in run
  File "/home/lubuntu2/cpython/Lib/unittest/suite.py", line 84 in __call__
  File "/home/lubuntu2/cpython/Lib/unittest/suite.py", line 122 in run
  File "/home/lubuntu2/cpython/Lib/unittest/suite.py", line 84 in __call__
  File "/home/lubuntu2/cpython/Lib/unittest/suite.py", line 122 in run
  File "/home/lubuntu2/cpython/Lib/unittest/suite.py", line 84 in __call__
  File "/home/lubuntu2/cpython/Lib/test/support/testresult.py", line 162 in run
  File "/home/lubuntu2/cpython/Lib/test/support/__init__.py", line 1996 in 
_run_suite
  File "/home/lubuntu2/cpython/Lib/test/support/__init__.py", line 2092 in 
run_unittest
  File "/home/lubuntu2/cpython/Lib/test/libregrtest/runtest.py", line 209 in 
_test_module
  File "/home/lubuntu2/cpython/Lib/test/libregrtest/runtest.py", line 234 in 
_runtest_inner2
  File "/home/lubuntu2/cpython/Lib/test/libregrtest/runtest.py", line 270 in 
_runtest_inner
  File "/home/lubuntu2/cpython/Lib/test/libregrtest/runtest.py", line 153 in 
_runtest
  File "/home/lubuntu2/cpython/Lib/test/libregrtest/runtest.py", line 193 in 
runtest
  File "/home/lubuntu2/cpython/Lib/test/libregrtest/main.py", line 409 in 
run_tests_sequential
  File "/home/lubuntu2/cpython/Lib/test/libregrtest/main.py", line 507 in 
run_tests
  File "/home/lubuntu2/cpython/Lib/test/libregrtest/main.py", line 674 in _main
  File "/home/lubuntu2/cpython/Lib/test/libregrtest/main.py", line 628 in main
  File "/home/lubuntu2/cpython/Lib/test/libregrtest/main.py", line 695 in main
  File "/home/lubuntu2/cpython/Lib/test/__main__.py", line 2 in 
  File "/home/lubuntu2/cpython/Lib/runpy.py", line 85 in _run_code
  File "/home/lubuntu2/cpython/Lib/runpy.py", line 192 in _run_module_as_main
Aborted (core dumped)


It seems that this is because the PyObject_GetIter() call in 
_PyDictView_Intersect() is not checked for failure.

--
components: Interpreter Core
messages: 352658
nosy: ZackerySpytz, rhettinger
priority: normal
severity: normal
status: open
title: A fatal error in test_dictviews
type: crash
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



[issue38191] typing.NamedTuple() should prefix parameters with '_'

2019-09-17 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset 69b3718b183a698202bd67488639bffd64a488bc by Serhiy Storchaka in 
branch '3.7':
[3.7] bpo-38191: Accept arbitrary keyword names in NamedTuple(). (GH-16222) 
(GH-16239)
https://github.com/python/cpython/commit/69b3718b183a698202bd67488639bffd64a488bc


--

___
Python tracker 

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



[issue38191] typing.NamedTuple() should prefix parameters with '_'

2019-09-17 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

Oh, when backported to 3.7 I have found that TypedDict is new in 3.8. So I 
think it is better to get rid of deprecations in TypedDict().

--

___
Python tracker 

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



[issue38191] typing.NamedTuple() should prefix parameters with '_'

2019-09-17 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
pull_requests: +15837
pull_request: https://github.com/python/cpython/pull/16240

___
Python tracker 

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



[issue38191] typing.NamedTuple() should prefix parameters with '_'

2019-09-17 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
pull_requests: +15836
pull_request: https://github.com/python/cpython/pull/16239

___
Python tracker 

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



[issue38191] typing.NamedTuple() should prefix parameters with '_'

2019-09-17 Thread miss-islington


miss-islington  added the comment:


New changeset 54ba5f19d4a654768c785468d736ed0bd05947f5 by Miss Islington (bot) 
in branch '3.8':
bpo-38191: Accept arbitrary keyword names in NamedTuple() and TypedDict(). 
(GH-16222)
https://github.com/python/cpython/commit/54ba5f19d4a654768c785468d736ed0bd05947f5


--
nosy: +miss-islington

___
Python tracker 

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



[issue38191] typing.NamedTuple() should prefix parameters with '_'

2019-09-17 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
pull_requests: +15835
pull_request: https://github.com/python/cpython/pull/16238

___
Python tracker 

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



[issue38191] typing.NamedTuple() should prefix parameters with '_'

2019-09-17 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset 2bf31ccab3d17f3f35b42dca97f99576dfe2fc7d by Serhiy Storchaka in 
branch 'master':
bpo-38191: Accept arbitrary keyword names in NamedTuple() and TypedDict(). 
(GH-16222)
https://github.com/python/cpython/commit/2bf31ccab3d17f3f35b42dca97f99576dfe2fc7d


--

___
Python tracker 

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



[issue38191] typing.NamedTuple() should prefix parameters with '_'

2019-09-17 Thread miss-islington


Change by miss-islington :


--
pull_requests: +15834
pull_request: https://github.com/python/cpython/pull/16237

___
Python tracker 

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



[issue37449] Move ensurepip off of pkgutil and to importlib.resources

2019-09-17 Thread Brett Cannon


Change by Brett Cannon :


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



[issue37904] Suggested edit to Python Tutorial - Section 4

2019-09-17 Thread miss-islington


Change by miss-islington :


--
pull_requests: +15833
pull_request: https://github.com/python/cpython/pull/16236

___
Python tracker 

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



[issue37904] Suggested edit to Python Tutorial - Section 4

2019-09-17 Thread miss-islington


Change by miss-islington :


--
pull_requests: +15831
pull_request: https://github.com/python/cpython/pull/16234

___
Python tracker 

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



[issue37904] Suggested edit to Python Tutorial - Section 4

2019-09-17 Thread miss-islington


Change by miss-islington :


--
pull_requests: +15832
pull_request: https://github.com/python/cpython/pull/16235

___
Python tracker 

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



[issue37904] Suggested edit to Python Tutorial - Section 4

2019-09-17 Thread miss-islington

miss-islington  added the comment:


New changeset b57481318e3e3cbacd398b898f9849ec8f2d7eec by Miss Islington (bot) 
(Diego Alberto Barriga Martínez) in branch 'master':
bpo-37904: Edition on python tutorial - section 4 (GH-16169)
https://github.com/python/cpython/commit/b57481318e3e3cbacd398b898f9849ec8f2d7eec


--
nosy: +miss-islington

___
Python tracker 

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



[issue38179] Test subprocess fails on Fedora 30: test_group and test_extra_groups

2019-09-17 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

Thanks for the confirmation. I am closing this as per issue36046.

--
resolution:  -> fixed
stage:  -> resolved
status: open -> closed
superseder:  -> support dropping privileges when running subprocesses

___
Python tracker 

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



[issue38201] Anotation problem at flask_httpauth package

2019-09-17 Thread Ezio Melotti


Ezio Melotti  added the comment:

Please read the documentation for login_required at 
https://flask-login.readthedocs.io/en/latest/#flask_login.login_required and if 
you still think you have found a bug report it to the Flask bug tracker.

--
nosy: +ezio.melotti
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed
type:  -> behavior

___
Python tracker 

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



[issue36876] Global C variables are a problem.

2019-09-17 Thread Vinay Sajip


Change by Vinay Sajip :


--
nosy: +vinay.sajip

___
Python tracker 

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



[issue38201] Anotation problem at flask_httpauth package

2019-09-17 Thread Batuhan


Batuhan  added the comment:

I dont think this is a bug for cpython project. Extension modules category has 
a different meaning.

--
nosy: +BTaskaya

___
Python tracker 

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



[issue38201] Anotation problem at flask_httpauth package

2019-09-17 Thread Serkan


New submission from Serkan :

if I use @auth.login_required anotation before @app.route, it is not working. 
It must be used after @app.route anotation. (flask_httpauth )



Sample:#
from flask_httpauth import HTTPBasicAuth
auth = HTTPBasicAuth()

@auth.login_required
@app.route('/api/v1.0/Scoring', methods=['POST'])
def Scoring():

--
components: Extension Modules
messages: 352649
nosy: Serkan Gecici
priority: normal
severity: normal
status: open
title: Anotation problem at flask_httpauth package
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



[issue27071] unittest.TestCase.assertCountEqual is a very misleading name

2019-09-17 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

In msg266115, Robert Collins suggested  "add a different name and deprecate 
assertCountEqual".

In msg266184, Gregory Smith said "not against adding a new name if it makes 
glorious sense, but we should not remove the old names from unittest as that 
causes unnecessary pain (based on past experience)."

Others suggested status quo.

In msg352556, Michael Ford said "I like assertPermutation", but did not reopen 
the issue.

Coming at this fresh, via the PR that patches idlelib, my first thought was 
that assertCountEqual meant assertEqual(len(a), len(b)).  So the issue seems 
real.  assertPermutation is much better to me and I would like it added.

In unittest/case.py, PR 16228 renames assertCountEqual to assertPermutation and 
adds assertCountEqual as an alias, with no plan for deprecation and removal, as 
eventually done with other duplicates.

However, the PR also immediately renames all instances of assertCountEqual in 
the stdlib.  Perhaps 1/4 of these are in idlelib tests.  Much as I prefer the 
new name, this is unacceptible as it immediately makes backporting test changes 
in these areas (and I plan to make some) a manual process.  So I don't want 
IDLE tests renamed until 3.8 is off maintenance and the name change can be made 
in all maintenance versions at once.

I leave it to the rest of you to decide on the rest of the stdlib.

--
nosy: +terry.reedy
versions: +Python 3.9 -Python 3.6

___
Python tracker 

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



[issue38179] Test subprocess fails on Fedora 30: test_group and test_extra_groups

2019-09-17 Thread Diego Barriga


Diego Barriga  added the comment:

That's right. The test result was success on latest master. Should i close this 
issue?

--

___
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-09-17 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

PR 16233 fixes the reference leaks but the original error is still present and

./python -m test test_tools -v -R 3:3

is still failing (as in the test fails, instead of failing because there are 
leaks).

--

___
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-09-17 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
Removed message: https://bugs.python.org/msg352645

___
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-09-17 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

The original error is still present and

./python -m test test_tools -v -R 3:3

is still failing some times, but when it suceeds there are no leaks being 
reported.

--

___
Python tracker 

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



[issue38200] Adding itertools.pairwise to the standard library?

2019-09-17 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


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



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

2019-09-17 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset 6fbc924696b4b5097c273c06ca2d82662940e184 by Pablo Galindo in 
branch 'master':
bpo-38187: Fix reference leak in test_tools (GH-16233)
https://github.com/python/cpython/commit/6fbc924696b4b5097c273c06ca2d82662940e184


--

___
Python tracker 

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



[issue38081] Different behavior of os.path.realpath('nul') in 3.7 and 3.8

2019-09-17 Thread Eryk Sun


Eryk Sun  added the comment:

Sorry, I mistakenly left out ERROR_BAD_NETPATH (53). It's at least used with 
mapped drives. For example, I have drive "M:" mapped to WebDAV 
"//live.sysinternals.com/tools", and I see this error if I disconnect the 
network:

>>> try: nt._getfinalpathname('M:/')
... except OSError as e: print(e.winerror)
...
53

whereas if I access the underlying UNC path directly the error in this case is 
ERROR_BAD_NET_NAME (67):

>>> try: nt._getfinalpathname('//live.sysinternals.com/tools')
... except OSError as e: print(e.winerror)
...
67

(Not that this case would normally succeed. A WebDAV share fails the internal 
request to get a normalized name, as expected for most network providers, but 
with an unexpected error code that's not handled by the API. It would succeed 
if we changed _getfinalpathname to fall back on getting the final name as 
opened, which skips expanding short component names.)

---
Discussion

The Multiple UNC Provider device (i.e. "\??\UNC" -> "\Device\Mup") resolves a 
UNC path prefix to a network provider (e.g. "Microsoft Windows Network" for 
SMB) by checking all providers in a registered order until one claims to handle 
the path. Typically a provider claims the server/share prefix, but the claimed 
prefix can be just the server, or a variable path length. Typically, if the 
"server" component isn't found, a provider returns STATUS_BAD_NETWORK_PATH. If 
the "share" component isn't found, it returns STATUS_BAD_NETWORK_NAME. However, 
since the request is to MUP, the final status is whatever MUP returns. As far 
as I can tell, post-Vista MUP prefix resolution returns STATUS_BAD_NETWORK_NAME 
even if all providers return STATUS_BAD_NETWORK_PATH. 

That said, MUP prefix resolution isn't used for mapped drives. A mapped drive 
sends the request directly to the provider that created the drive. Prior to 
Vista, this used to be a top-level named device such as 
"\Device\LanmanRedirector" (SMB). Since Vista, all redirected create/open 
requests are routed through MUP, but it doesn't use prefix resolution in this 
case. It has a sneaky way of implementing this. The provider's device name 
nowadays is an object SymbolicLink that targets MUP, but with a reserved 
component that indicates the redirector to use, e.g. "\Device\LanmanRedirector" 
-> "\Device\Mup\;LanmanRedirector". (A valid server name cannot begin with a 
semicolon, so this syntax is reserved by MUP. It also supports an optional 
second reserved component, with the drive name and logon session ID, such as 
";Z:1234". These reserved components are removed from the parsed 
path, i.e. they are not included in the final path.) Nothing stops us from 
using this undocumented fea
 ture manually in a UNC path, as demonstrated by the examples below. 

The following shows that MUP parses ";LanmanRedirector" as the redirector name, 
not the "server" component.

>>> os.path.samefile('//localhost/C$', '//;LanmanRedirector/localhost/C$')
True

The following shows that an explicit redirector path does not use prefix 
resolution. This open fails because there's no WebDAV server on localhost.

>>> try: os.stat('//;WebDavRedirector/localhost/C$')
... except OSError as e: print(e.winerror)
...
53

The following shows that MUP fails an open with STATUS_OBJECT_PATH_INVALID 
(i.e. ERROR_BAD_PATHNAME, 161) if the redirector name is unknown:

>>> try: os.stat('//;Lanman/localhost/C$')
... except OSError as e: print(e.winerror)
...
161

When we misspell the server name as "localhos", we see that the error for an 
explicit redirector path, as is used in a mapped drive, is ERROR_BAD_NETPATH 
(53):

>>> try: os.stat('//;LanmanRedirector/localhos/C$')
... except OSError as e: print(e.winerror)
...
53

If we omit the explicit redirector name, then MUP tries prefix resolution, and 
the error is instead ERROR_BAD_NET_NAME (67):

>>> try: os.stat('//localhos/C$')
... except OSError as e: print(e.winerror)
...
67

--

___
Python tracker 

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



[issue38200] Adding itertools.pairwise to the standard library?

2019-09-17 Thread Matteo Dell'Amico


New submission from Matteo Dell'Amico :

I use itertools.pairwise all the time and I wonder if the same happens to 
others. I'm thinking that others may be in the same situation, and having this 
simple recipe already included in the library would be definitely more 
convenient than copy/pasting the recipe. Also, it may improve its visibility...

--
components: Library (Lib)
messages: 352642
nosy: della
priority: normal
severity: normal
status: open
title: Adding itertools.pairwise to the standard library?

___
Python tracker 

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



[issue38180] Test pyexpat fails on Fedora 30

2019-09-17 Thread Diego Barriga


Diego Barriga  added the comment:

$ rpm -qa expat
expat-2.2.7-1.fc30.x86_64
expat-2.2.7-1.fc30.i686

--

___
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-09-17 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


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

___
Python tracker 

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



[issue38183] test_idle should not access or modify user config directory

2019-09-17 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
title: test_idle fails on AMD64 FreeBSD CURRENT Shared 3.x: GetUserCfgDir() 
fails with PermissionError -> test_idle should not access or modify user config 
directory

___
Python tracker 

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



[issue38183] test_idle fails on AMD64 FreeBSD CURRENT Shared 3.x: GetUserCfgDir() fails with PermissionError

2019-09-17 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

When I thought a simple change to one file was enough, I thought to backport to 
2.7.  But given that I will not backport the followup changes that will affect 
users, I am not going to backport the more complicated changes.

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

___
Python tracker 

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



[issue38199] python3.8-config --ldflags must not generate -L/usr/lib64

2019-09-17 Thread STINNER Victor


New submission from STINNER Victor :

Example on Fedora 30:

$ python3.8-config --ldflags
 -L/usr/lib64  -lcrypt -lpthread -ldl  -lutil -lm -lm 

This command output must not generate "-L/usr/lib64".

This bug report is based on this Fedora bug report:
https://bugzilla.redhat.com/show_bug.cgi?id=1724190#c3


== Using "-L /usr/lib64" is wrong ==

If for example you are building something against a non-system version of a 
library, while you have a system version of that library installed. You would 
then have -L/ in your LDFLAGS. If some configure 
script then adds -L/usr/lib64 to your LDFLAGS from python-config you might link 
to the system version instead, depending on in which order the Makefiles puts 
the options together.

If your are building a new version of a software of which you already have an 
older version installed. If the software provides both libraries and 
executables, the executables should be linked to the new version of the library 
you just built and not the system version in /usr/lib64. Depending on how the 
Makefiles are written you might get the wrong version if -L/usr/lib64 is added 
to LDFLAGS.


== pkg-config default is correct ==

pkg-config --libs does not generate any -L flags if the .pc file contains 
"libdir=/usr/lib64", "Libs: -L${libdir}". Example on Fedora 30:

$ pkg-config python-3.8 --libs # empty output

$ pkg-config python-3.8-embed --libs
-lpython3.8 

pkg-config has a --keep-system-libs flag which includes -L/usr/lib64 as 
expected:

$ pkg-config python-3.8-embed --libs --keep-system-libs
-L/usr/lib64 -lpython3.8


If PKG_CONFIG_SYSTEM_LIBRARY_PATH env var is set to a directory different than 
/usr/lib64, -L/usr/lib64 is generated:

$ PKG_CONFIG_SYSTEM_LIBRARY_PATH=/xxx pkg-config python-3.8-embed --libs  
-L/usr/lib64 -lpython3.8 


== pkg-config internals ==

Look at pkgconfig internals, so we can mimick the behavior.

On my Fedora 30, /usr/lib64/pkgconfig/python3.pc contains "Libs: -L${libdir} 
-lpython3.7m" with "libdir=/usr/lib64", but "pkg-config python3 --libs" only 
returns "-lpython3.7m": no -L flag.

pkg-config:

* https://github.com/pkgconf/pkgconf/tree/master/libpkgconf
* https://src.fedoraproject.org/rpms/pkgconf/blob/master/f/pkgconf.spec

pkg-config uses PKG_CONFIG_SYSTEM_LIBRARY_PATH environment variable if set, 
otherwise it uses >filter_libdirs. "SystemLibraryPaths" value 
(>filter_libdirs) can be read using the command:
---
$ pkg-config --dump-personality
Triplet: default
DefaultSearchPaths: /usr/lib64/pkgconfig /usr/share/pkgconfig
SystemIncludePaths: /usr/include
SystemLibraryPaths: /usr/lib64
---

The default personality uses SYSTEM_LIBDIR, macro defines by CMakeLists.txt, 
extract:
---
SET(libdir ${prefix}/lib)
SET(system_libdir "${libdir}" CACHE STRING "specify the system library 
directory (default LIBDIR)")
SET(SYSTEM_LIBDIR "${system_libdir}")
ADD_DEFINITIONS(-DSYSTEM_LIBDIR=\"${system_libdir}\")
---

Fedora pkgconf specfile overrides the system libdir:
--- 
%configure --disable-static \
   --with-pkg-config-dir=%{pkgconf_libdirs} \
   --with-system-includedir=%{_includedir} \
   --with-system-libdir=%{_libdir}
---
https://src.fedoraproject.org/rpms/pkgconf/blob/master/f/pkgconf.spec#_110


== How to fix python3.8-config? ==

The logic to detect the "system library path(s)" looks highly platform 
dependent. Maybe Python configure script should get an optional 
--with-system-libdir=PATH which would strip -L option in python-config if it's 
value is equal to PATH.

pkg-config also supports PKG_CONFIG_SYSTEM_LIBRARY_PATH env var and 
--keep-system-libs command line option.


== Options ==

* Deprecate python3.8-config: promote pkg-config. Is pkg-config available on 
all platforms? (Linux, macOS, FreeBSD, AIX, etc.) => easy option, least work to 
do!

* Document python3.8-config current behavior (document that -L/usr/lib64), 
modify python3.8-config & update the doc. Need to decide which features do we 
want (env var and/or cmdline option?).

--
components: Build
messages: 352639
nosy: vstinner
priority: normal
severity: normal
status: open
title: python3.8-config --ldflags must not generate -L/usr/lib64
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



[issue30367] Cannot build CPython3.6 with module “testcapimodule” statically

2019-09-17 Thread Paul Ganssle


Paul Ganssle  added the comment:

Is this issue only in Python 3.6? I believe Python 3.6 is only receiving 
security fixes at the moment, so this could only be fixed in 3.7, 3.8 and 3.9.

--
nosy: +p-ganssle

___
Python tracker 

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



[issue38013] AsyncGenerator breaks when not iterated fully with RuntimeError("can't send non-None value to a just-started coroutine")

2019-09-17 Thread Andrew Svetlov


Change by Andrew Svetlov :


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



[issue38013] AsyncGenerator breaks when not iterated fully with RuntimeError("can't send non-None value to a just-started coroutine")

2019-09-17 Thread miss-islington


miss-islington  added the comment:


New changeset 3c1786f18b1542e71454f37e3f3ca1ef3eec0e5f by Miss Islington (bot) 
in branch '3.8':
bpo-38013: make async_generator_athrow object tolerant to throwing exceptions 
(GH-16070)
https://github.com/python/cpython/commit/3c1786f18b1542e71454f37e3f3ca1ef3eec0e5f


--

___
Python tracker 

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



[issue38013] AsyncGenerator breaks when not iterated fully with RuntimeError("can't send non-None value to a just-started coroutine")

2019-09-17 Thread miss-islington


miss-islington  added the comment:


New changeset fc022f04b41a79cacdff380435c30c8042c82b99 by Miss Islington (bot) 
in branch '3.7':
bpo-38013: make async_generator_athrow object tolerant to throwing exceptions 
(GH-16070)
https://github.com/python/cpython/commit/fc022f04b41a79cacdff380435c30c8042c82b99


--

___
Python tracker 

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



[issue37828] Fix default mock_name in unittest.mock.assert_called error message

2019-09-17 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


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



[issue37828] Fix default mock_name in unittest.mock.assert_called error message

2019-09-17 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

I don't think 3.7 needs a backport of the fix. I am closing this as fixed since 
all PRs are merged. Please reopen if a backport is needed. Thanks @categulario.

--

___
Python tracker 

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



[issue38013] AsyncGenerator breaks when not iterated fully with RuntimeError("can't send non-None value to a just-started coroutine")

2019-09-17 Thread miss-islington


Change by miss-islington :


--
pull_requests: +15829
pull_request: https://github.com/python/cpython/pull/16232

___
Python tracker 

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



[issue38013] AsyncGenerator breaks when not iterated fully with RuntimeError("can't send non-None value to a just-started coroutine")

2019-09-17 Thread miss-islington


miss-islington  added the comment:


New changeset c275312a6284bd319ea33c9abd7e15c230eca43f by Miss Islington (bot) 
(Andrew Svetlov) in branch 'master':
bpo-38013: make async_generator_athrow object tolerant to throwing exceptions 
(GH-16070)
https://github.com/python/cpython/commit/c275312a6284bd319ea33c9abd7e15c230eca43f


--
nosy: +miss-islington

___
Python tracker 

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



[issue38013] AsyncGenerator breaks when not iterated fully with RuntimeError("can't send non-None value to a just-started coroutine")

2019-09-17 Thread miss-islington


Change by miss-islington :


--
pull_requests: +15828
pull_request: https://github.com/python/cpython/pull/16231

___
Python tracker 

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



[issue37531] Fix regrtest timeout for subprocesses: regrtest -jN --timeout=SECONDS

2019-09-17 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 6591b4bbb1c0b9c26b99e4b2dba1e5cc8546732d by Victor Stinner (Miss 
Islington (bot)) in branch '3.7':
bpo-37531: regrtest main process uses shorter timeout (GH-16220) (GH-16223)
https://github.com/python/cpython/commit/6591b4bbb1c0b9c26b99e4b2dba1e5cc8546732d


--

___
Python tracker 

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



[issue37531] Fix regrtest timeout for subprocesses: regrtest -jN --timeout=SECONDS

2019-09-17 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 5f1590d5e679f4dd0b611ef54ae512f137e78f1b by Victor Stinner (Miss 
Islington (bot)) in branch '3.8':
bpo-37531: regrtest main process uses shorter timeout (GH-16220) (GH-16224)
https://github.com/python/cpython/commit/5f1590d5e679f4dd0b611ef54ae512f137e78f1b


--

___
Python tracker 

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



[issue37828] Fix default mock_name in unittest.mock.assert_called error message

2019-09-17 Thread miss-islington


miss-islington  added the comment:


New changeset f668d2b775da4bcd07e142c4bc5ebd88165fadf4 by Miss Islington (bot) 
in branch '3.8':
bpo-37828: Fix default mock_name in unittest.mock.assert_called error (GH-16166)
https://github.com/python/cpython/commit/f668d2b775da4bcd07e142c4bc5ebd88165fadf4


--
nosy: +miss-islington

___
Python tracker 

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



[issue38198] Attributes of pathlib classes are not indexed in Windows help file

2019-09-17 Thread Francesco Ricciardi


New submission from Francesco Ricciardi :

Attributes of pathlib classes (e.g. 'stem' or 'root') cannot be searched for in 
Python Windows help file index.

--
assignee: docs@python
components: Documentation
messages: 352630
nosy: docs@python, francescor
priority: normal
severity: normal
status: open
title: Attributes of pathlib classes are not indexed in Windows help file
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



[issue37828] Fix default mock_name in unittest.mock.assert_called error message

2019-09-17 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset 5f5f11faf9de0d8dcbe1a8a4eb35d2a4232d6eaa by Pablo Galindo 
(Abraham Toriz Cruz) in branch 'master':
bpo-37828: Fix default mock_name in unittest.mock.assert_called error (GH-16166)
https://github.com/python/cpython/commit/5f5f11faf9de0d8dcbe1a8a4eb35d2a4232d6eaa


--
nosy: +pablogsal

___
Python tracker 

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



[issue37828] Fix default mock_name in unittest.mock.assert_called error message

2019-09-17 Thread miss-islington


Change by miss-islington :


--
pull_requests: +15827
pull_request: https://github.com/python/cpython/pull/16229

___
Python tracker 

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



  1   2   >