[issue37405] socket.getsockname() returns string instead of tuple

2019-06-25 Thread Ned Deily


Change by Ned Deily :


--
nosy: +christian.heimes

___
Python tracker 

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



[issue37407] Update imaplib.py to account for additional padding

2019-06-25 Thread Edward Smith


New submission from Edward Smith :

Regex for imaplib should account for IMAP servers which return one or two 
whitespaces after the * in responses. For example when using davmail as an 
interpreter between exchange to IMAP 

Acceptable response is as follows:
```
  58:24.54 > PJJD3 EXAMINE INBOX
  58:24.77 < * 486 EXISTS
  58:24.78  matched r'\* (?P\d+) (?P[A-Z-]+)( (?P.*))?' 
=> ('486', 'EXISTS', None, None)
  58:24.78 untagged_responses[EXISTS] 0 += ["486"]
```
Davmail response:
```
57:50.86 > KPFE3 EXAMINE INBOX
  57:51.10 < *  953 EXISTS
  57:51.10 last 0 IMAP4 interactions:
  57:51.10 > KPFE4 LOGOUT
```

See additional whitespace after the * on line 2

To be fixed by allowing the regex to account for one or two whitespaces
```python
br'\*[ ]{1,2}(?P\d+) (?P[A-Z-]+)( (?P.*))?'
```

--
components: email
messages: 346584
nosy: barry, edwardmbsmith, r.david.murray
priority: normal
pull_requests: 14202
severity: normal
status: open
title: Update imaplib.py to account for additional padding
type: behavior
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



[issue37251] Mocking a MagicMock with a function spec results in an AsyncMock

2019-06-25 Thread Lisa Roach


Lisa Roach  added the comment:

Yes, sorry I wasn't clear, I was thinking about the functions and testing 
without your PR. I think removing the __code__ object (or working around it) is 
the correct way to go, but just removing it wouldn't solve this particular 
problem.

"If I understand the awaitable examples correctly, mocking the obj which is an 
Awaitable should be returning an AsyncMock. But obj doesn't contain __code__ 
and hence check for inspect.isawaitable is never done causing 
_is_async_obj(obj) to return False and subsequently it's patched with 
MagicMock."

Exactly! This is why I think technically removing the __code__ check is 
correct. Probably removing the __code__ attribute for any AsyncMock that is 
mocking an async object and not an async function is best, but I don't know how 
I would do that. 

I may also be misunderstanding some asyncio concepts, that is just what I 
observed :)


What if instead of checking for the __code__ object at all we check if there it 
is a Mock object (excluding AsyncMock):


def _is_async_obj(obj):
sync_mocks = [MagicMock, Mock, PropertyMock, NonCallableMock, 
NonCallableMagicMock]
if (any(isinstance(obj, sync_mock) for sync_mock in sync_mocks)
and not isinstance(obj, AsyncMock)):
return False
return asyncio.iscoroutinefunction(obj) or inspect.isawaitable(obj)

--

___
Python tracker 

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



[issue13127] xml.dom.Attr.name is not labeled as read-only

2019-06-25 Thread Giovanni Cappellotto


Giovanni Cappellotto  added the comment:

I took a quick look at `minidom.py` and `test_minidom.py`. It seems that you 
should always use `doc.renameNode(attr, namespace, new_name)` for renaming an 
attribute (or an element).

When `doc.renameNode` is applied on an attribute node, it removes the attribute 
from the `ownerElement` and re-set it after renaming it.

For instance:

```
>>> import xml.dom.minidom
>>> from xml.dom import minidom
>>> doc = minidom.parseString("http://foo.com\;>foo")
>>> attr = doc.childNodes[0].attributes.item(0)
>>> doc.renameNode(attr, xml.dom.EMPTY_NAMESPACE, "bar")

>>> doc.toxml()
'http://foo.com;>foo'
```

I agree that this behavior should be documented somewhere.

Maybe there should be a note/warning in the `name` attribute description. It 
should says that resetting an attribute `name` won't change the document 
representation and that `doc.renameNode` should be used instead.

Another approach may be to update the `name` setter implementation to remove 
and then re-set the attribute in the `ownerElement`.

What do you think it's the best approach:

1. update the doc
2. update the `name` setter implementation

I'd be happy to help to fix this issue.

--
nosy: +potomak

___
Python tracker 

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



[issue37380] subprocess.Popen._cleanup() "The handle is invalid" error when some old process is gone

2019-06-25 Thread Eryk Sun


Eryk Sun  added the comment:

> One issue on Linux is that the zombie process keeps the pid used until 
> the parent reads the child exit status, and Linux pids are limited to
> 32768 by default.

Windows allocates Process and Thread IDs out of a kernel handle table, which 
can grow to about 2**24 entries (more than 16 million). So the practical 
resource limit for inactive Process and Thread objects is available memory, not 
running out of PID/TID values.

> Linux (for example) has the same design: the kernel doesn't keep a 
> "full process" alive, but a lightweight structure just for its parent
> process which gets the exit status. That's the concept of "zombie 
> process".

In Unix, the zombie remains visible in the task list (marked as  in 
Linux), but in Windows an exited process is removed from the Process Manager's 
active list, so it's no longer visible to users. Also, a Process object is 
reaped as soon as the last reference to it is closed, since clearly no one 
needs it anymore. 

> The subprocess module uses a magic Handle object which calls 
> CloseHandle(handle) in its __del__() method. I dislike relying on 
> destructors. If an object is kept alive by a reference cycle, it's
> never released: CloseHandle() isn't called.

We could call self._handle.Close() in _wait(), right after calling 
GetExitCodeProcess(self._handle). With this change, __exit__ will ensure that 
_handle gets closed in a deterministic context. Code that needs the handle 
indefinitely can call _handle.Detach() before exiting the with-statement 
context, but that should rarely be necessary.

I don't understand emitting a resource warning in Popen.__del__ if a process 
hasn't been waited on until completion beforehand (i.e. self.returncode is 
None). If a script wants to be strict about this, it can use a with statement, 
which is documented to wait on the process. 

I do understand emitting a resource warning in Popen.__del__ if 
self._internal_poll() is None. In this case, in Unix only now, the process gets 
added to the _active list to try to avoid leaking a zombie. The list gets 
polled in subprocess._cleanup, which is called in Popen.__init__. Shouldn't 
_cleanup also be set as an atexit function?

There should be a way to indicate a Popen instance is intended to continue 
running detached from our process, so scripts don't have to ignore an 
irrelevant resource warning.

--

___
Python tracker 

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



[issue37405] socket.getsockname() returns string instead of tuple

2019-06-25 Thread Brent Gardner


Brent Gardner  added the comment:

Correction, change caused by a30f6d45ac3e72761b96a8df0527182029eaee24 to 
cpython/Modules/socketmodule.c on Aug 28, 2017.

--

___
Python tracker 

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



[issue37405] socket.getsockname() returns string instead of tuple

2019-06-25 Thread Brent Gardner


Brent Gardner  added the comment:

Changed caused by commit effc12f8e9e20d0951d2ba5883587666bd8218e3 to 
cpython/Modules/socketmodule.c on Sep 6, 2017.

--
components: +Extension Modules

___
Python tracker 

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



[issue29412] IndexError thrown on email.message.Message.get

2019-06-25 Thread Abhilash Raj


Change by Abhilash Raj :


--
pull_requests: +14201
pull_request: https://github.com/python/cpython/pull/14387

___
Python tracker 

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



[issue37380] subprocess.Popen._cleanup() "The handle is invalid" error when some old process is gone

2019-06-25 Thread Steve Dower


Steve Dower  added the comment:

The handle can deliberately live beyond the process, but it does not have to. 
If it is closed early then the kernel object will be freed when no handles 
remain, which will be at process exit.

So it's a classic __exit__/__del__ case, where both are needed if you want 
deterministic resource disposal. But it is in no way tied to the life of the 
child process, so waiting first is optional.

--

___
Python tracker 

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



[issue36917] ast.NodeVisitor no longer calls visit_Str

2019-06-25 Thread Daniel Hilst Selli


Change by Daniel Hilst Selli :


--
nosy: +dhilst

___
Python tracker 

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



[issue37406] Disable debug runtime checks in release mode

2019-06-25 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset c6a2320e876354ee62cf8149b849bcff9492d38a by Victor Stinner in 
branch 'master':
bpo-37406: sqlite3 raises TypeError for wrong operation type (GH-14386)
https://github.com/python/cpython/commit/c6a2320e876354ee62cf8149b849bcff9492d38a


--

___
Python tracker 

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



[issue23014] Don't have importlib.abc.Loader.create_module() be optional

2019-06-25 Thread Anthony Sottile


Anthony Sottile  added the comment:

Hi! just stumbled on this as I was updating pytest's import hook.  I notice in 
PEP 451 this is still marked as optional (then again, I don't know whether PEPs 
are supposed to be living standards or not, or if there was a PEP which 
supersedes that one with better direction?)

--
nosy: +Anthony Sottile

___
Python tracker 

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



[issue37406] Disable debug runtime checks in release mode

2019-06-25 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +14200
pull_request: https://github.com/python/cpython/pull/14386

___
Python tracker 

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



[issue37388] unknown error handlers should be reported early

2019-06-25 Thread STINNER Victor


STINNER Victor  added the comment:

I compared ref (commit e1a63c4f21011a3ae77dff624196561070c83446) to patch 
(commit ed076ed467264b43ed01a8223ca65b133b590919). I ran bench.py using:

# edit Makefile.pre.in to use:
PROFILE_TASK=-m test.regrtest --pgo test_unicode test_codecs

./configure --enable-optimizations && make
./python -m venv env && env/bin/python -m pip install -U pyperf
./env/bin/python bench.py -o .json

$ python3 -m pyperf compare_to ref_e1a63c4f2.json patch_ed076ed4.json 
0B: Mean +- std dev: [ref_e1a63c4f2] 76.7 ns +- 0.9 ns -> [patch_ed076ed4] 77.5 
ns +- 2.9 ns: 1.01x slower (+1%)
1B: Mean +- std dev: [ref_e1a63c4f2] 92.9 ns +- 0.8 ns -> [patch_ed076ed4] 94.0 
ns +- 2.4 ns: 1.01x slower (+1%)
5B: Mean +- std dev: [ref_e1a63c4f2] 106 ns +- 2 ns -> [patch_ed076ed4] 110 ns 
+- 2 ns: 1.04x slower (+4%)
10B: Mean +- std dev: [ref_e1a63c4f2] 105 ns +- 1 ns -> [patch_ed076ed4] 109 ns 
+- 1 ns: 1.03x slower (+3%)
25B: Mean +- std dev: [ref_e1a63c4f2] 108 ns +- 3 ns -> [patch_ed076ed4] 111 ns 
+- 3 ns: 1.03x slower (+3%)
100B: Mean +- std dev: [ref_e1a63c4f2] 114 ns +- 1 ns -> [patch_ed076ed4] 115 
ns +- 2 ns: 1.01x slower (+1%)
1000B: Mean +- std dev: [ref_e1a63c4f2] 267 ns +- 3 ns -> [patch_ed076ed4] 253 
ns +- 4 ns: 1.06x faster (-5%)

$ python3 -m pyperf compare_to ref_e1a63c4f2.json patch_ed076ed4.json  --table
+---+---+-+
| Benchmark | ref_e1a63c4f2 | patch_ed076ed4  |
+===+===+=+
| 0B| 76.7 ns   | 77.5 ns: 1.01x slower (+1%) |
+---+---+-+
| 1B| 92.9 ns   | 94.0 ns: 1.01x slower (+1%) |
+---+---+-+
| 5B| 106 ns| 110 ns: 1.04x slower (+4%)  |
+---+---+-+
| 10B   | 105 ns| 109 ns: 1.03x slower (+3%)  |
+---+---+-+
| 25B   | 108 ns| 111 ns: 1.03x slower (+3%)  |
+---+---+-+
| 100B  | 114 ns| 115 ns: 1.01x slower (+1%)  |
+---+---+-+
| 1000B | 267 ns| 253 ns: 1.06x faster (-5%)  |
+---+---+-+

The overhead of my change is around 1 ns, 4 ns (on 106 ns) in the worst case 
(5B).

The change "looks" faster on the 1000B case, but it's likely a glitch of PGO 
compilation which is not really deterministic.

--

___
Python tracker 

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



[issue37388] unknown error handlers should be reported early

2019-06-25 Thread STINNER Victor


STINNER Victor  added the comment:

Ok, the encoding and errors are now checked in almost all cases if you enable 
the development mode using -X dev command line option.

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



[issue37388] unknown error handlers should be reported early

2019-06-25 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset ed076ed467264b43ed01a8223ca65b133b590919 by Victor Stinner in 
branch 'master':
bpo-37388: Add PyUnicode_Decode(str, 0) fast-path (GH-14385)
https://github.com/python/cpython/commit/ed076ed467264b43ed01a8223ca65b133b590919


--

___
Python tracker 

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



[issue37396] [2.7] PCbuild/pythoncore.vcxproj kills the wrong program

2019-06-25 Thread STINNER Victor


STINNER Victor  added the comment:

My question was more for Zachary who proposed: "backporting GH-9901 to 2.7 
would probably also be good even though it was solving a different issue".

But as I wrote, I'm not comfortable to backport such change in Python 2.7. I 
prefer to avoid changes except if we really have to fix it.

So yeah, let's see if the bug strikes back. At least, we should now see if the 
build systems attempt to kill python.exe or python_d.exe.

--

___
Python tracker 

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



[issue37244] test_multiprocessing_forkserver: test_resource_tracker() failed on x86 Gentoo Refleaks 3.8

2019-06-25 Thread STINNER Victor


STINNER Victor  added the comment:

Thanks Pierre Glaser. I close the issue.

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
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



[issue37388] unknown error handlers should be reported early

2019-06-25 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +14199
pull_request: https://github.com/python/cpython/pull/14385

___
Python tracker 

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



[issue37163] dataclasses.replace() fails with the field named "obj"

2019-06-25 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


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



[issue37163] dataclasses.replace() fails with the field named "obj"

2019-06-25 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


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



[issue37406] Disable debug runtime checks in release mode

2019-06-25 Thread STINNER Victor


Change by STINNER Victor :


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

___
Python tracker 

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



[issue37406] Disable debug runtime checks in release mode

2019-06-25 Thread STINNER Victor


Change by STINNER Victor :


--
title: Disable runtime checks in release mode -> Disable debug runtime checks 
in release mode

___
Python tracker 

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



[issue37406] Disable runtime checks in release mode

2019-06-25 Thread STINNER Victor


New submission from STINNER Victor :

A Python debug build is ABI compatible with a Python release build since Python 
3.8 on most platforms (except Windows, Cygwin and Android):
https://docs.python.org/3.8/whatsnew/3.8.html#debug-build-uses-the-same-abi-as-release-build

It should now be way easier to debug an application with a debug build.

I propose to remove runtime debug checks in release mode. assert() is already 
widely used in the C code base, but there are many runtime checks using 
PyErr_BadInternalCall() or PyErr_BadArgument. Example:

Py_ssize_t
PyUnicode_GetLength(PyObject *unicode)
{
if (!PyUnicode_Check(unicode)) {
PyErr_BadArgument();
return -1;
}
if (PyUnicode_READY(unicode) == -1)
return -1;
return PyUnicode_GET_LENGTH(unicode);
}

Attached PR removes these checks when Python is compiled in release mode: when 
Py_DEBUG is not defined.

Even if I marked this issue as "performance", I don't expect a significant 
speedup.

--
components: Interpreter Core
messages: 346570
nosy: vstinner
priority: normal
severity: normal
status: open
title: Disable runtime checks in release mode
type: performance
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



[issue37388] unknown error handlers should be reported early

2019-06-25 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 22eb689cf3de7972a2789db3ad01a86949508ab7 by Victor Stinner in 
branch 'master':
bpo-37388: Development mode check encoding and errors (GH-14341)
https://github.com/python/cpython/commit/22eb689cf3de7972a2789db3ad01a86949508ab7


--

___
Python tracker 

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



[issue37380] subprocess.Popen._cleanup() "The handle is invalid" error when some old process is gone

2019-06-25 Thread STINNER Victor


STINNER Victor  added the comment:

> See issue 36067 for a related discussion. The _active list and _cleanup 
> function are not required in Windows. When a process exits, it gets rundown 
> to free its handle table and virtual memory. Only the kernel object remains, 
> which is kept alive by pointer and handle references to it that can query 
> information such as the exit status code. As soon as the last reference is 
> closed, the Process object is automatically reaped. It doesn't have to be 
> waited on.

Linux (for example) has the same design: the kernel doesn't keep a "full 
process" alive, but a lightweight structure just for its parent process which 
gets the exit status. That's the concept of "zombie process".

One issue on Linux is that the zombie process keeps the pid used until the 
parent reads the child exit status, and Linux pids are limited to 32768 by 
default.

Now I'm not sure that I understand what it means on Windows. The subprocess 
module uses a magic Handle object which calls CloseHandle(handle) in its 
__del__() method. I dislike relying on destructors. If an object is kept alive 
by a reference cycle, it's never released: CloseHandle() isn't called.

So code spawning process should wait until subprocesses complete to ensure that 
CloseHandle() is called, no?

Except that Popen._internal_poll() doesn't clear the handle even after the 
process completes.

If Popen.__del__() doesn't add active processes to the _active list, it should 
at least explicitly call CloseHandle(), no?

--

___
Python tracker 

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



[issue37244] test_multiprocessing_forkserver: test_resource_tracker() failed on x86 Gentoo Refleaks 3.8

2019-06-25 Thread miss-islington


miss-islington  added the comment:


New changeset dd4edbc5ad4cdb47e051e7cc0801d31d3786588b by Miss Islington (bot) 
in branch '3.8':
bpo-37244: Fix test_multiprocessing.test_resource_tracker() (GH-14288)
https://github.com/python/cpython/commit/dd4edbc5ad4cdb47e051e7cc0801d31d3786588b


--
nosy: +miss-islington

___
Python tracker 

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



[issue37396] [2.7] PCbuild/pythoncore.vcxproj kills the wrong program

2019-06-25 Thread Steve Dower


Steve Dower  added the comment:

> I suggest to close the issue and see if the bug comes back.

You opened it, so sure :)

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



[issue37276] Incorrect number of running calls in ProcessPoolExecutor

2019-06-25 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

All the pending work items are added to a call queue that the processes consume 
(_add_call_item_to_queue) and the status is set before adding it to said queue 
(by calling set_running_or_notify_cancel()). Notice that the fact that 
future.running() == True does not mean that a worker has picked up the work 
item. The worker function (_process_worker for the ProcessPoolExecutor) gets 
items for this queue and then sends back results in another queue (result 
queue). If you add extra debugging you will see that only two items are 
dequeued from the call_queue:


--- a/Lib/concurrent/futures/process.py
+++ b/Lib/concurrent/futures/process.py
@@ -231,6 +231,7 @@ def _process_worker(call_queue, result_queue, initializer, 
initargs):
 return
 while True:
 call_item = call_queue.get(block=True)
+print("Worker: Getting a new item")
 if call_item is None:
 # Wake up queue management thread
 result_queue.put(os.getpid())
@@ -277,6 +278,7 @@ def _add_call_item_to_queue(pending_work_items,
 work_item = pending_work_items[work_id]
 
 if work_item.future.set_running_or_notify_cancel():
+print("Adding a new item to the call_queue")
 call_queue.put(_CallItem(work_id,
  work_item.fn,
  work_item.args,
(END)


Executing your script:

import time, concurrent.futures

def call():
while True:
time.sleep(1)


if __name__ == "__main__":
with concurrent.futures.ProcessPoolExecutor(max_workers=2) as executor:
futures = [executor.submit(call) for _ in range(8)]
time.sleep(2)

for future in futures:
print(future.running())

Prints:

Adding a new item to the call_queue
Adding a new item to the call_queue
Adding a new item to the call_queue
Worker: Getting a new item
Worker: Getting a new item
True
True
True
False
False
False
False
False

--
nosy: +pablogsal

___
Python tracker 

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



[issue37244] test_multiprocessing_forkserver: test_resource_tracker() failed on x86 Gentoo Refleaks 3.8

2019-06-25 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset e1a63c4f21011a3ae77dff624196561070c83446 by Victor Stinner 
(Pierre Glaser) in branch 'master':
bpo-37244: Fix test_multiprocessing.test_resource_tracker() (GH-14288)
https://github.com/python/cpython/commit/e1a63c4f21011a3ae77dff624196561070c83446


--

___
Python tracker 

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



[issue37244] test_multiprocessing_forkserver: test_resource_tracker() failed on x86 Gentoo Refleaks 3.8

2019-06-25 Thread miss-islington


Change by miss-islington :


--
pull_requests: +14197
pull_request: https://github.com/python/cpython/pull/14383

___
Python tracker 

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



[issue36888] Create a way to check that the parent process is alive for deamonized processes

2019-06-25 Thread STINNER Victor


STINNER Victor  added the comment:

Thanks Pierre Glaser. Let's see if it's enough to make the test more reliable 
on buildbots ;-)

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



[issue36917] ast.NodeVisitor no longer calls visit_Str

2019-06-25 Thread Tyler Wince


Tyler Wince  added the comment:

Another example of the breaking change here is in the security linter 
`PyCQA/bandit`. It may be a simple addition of a check in the meta parser for 
the ast but I would tend to agree with Anthony around whether or not it is 
worth it. 

Anyone else have any thoughts on this since the conversation ended last month?

--
nosy: +Tyler Wince

___
Python tracker 

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



[issue37391] MacOS Touchpad scrolling crashes IDLE

2019-06-25 Thread George Pantazes


George Pantazes  added the comment:

In case anyone would like to weigh in on the Homebrew side, I've filed the 
homebrew issue here: https://github.com/Homebrew/homebrew-core/issues/41338 .

--

___
Python tracker 

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



[issue36888] Create a way to check that the parent process is alive for deamonized processes

2019-06-25 Thread miss-islington


miss-islington  added the comment:


New changeset 4adc38e79495bd06878355fd5270c3f84b77f528 by Miss Islington (bot) 
in branch '3.8':
bpo-36888, test_multiprocessing: Increase test_parent_process timeout (GH-14286)
https://github.com/python/cpython/commit/4adc38e79495bd06878355fd5270c3f84b77f528


--
nosy: +miss-islington

___
Python tracker 

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



[issue37405] socket.getsockname() returns string instead of tuple

2019-06-25 Thread Brent Gardner


New submission from Brent Gardner :

In Python 3.5.3, a socket with type AF_CAN returns a tuple in the form 
`(interface, )` from getsockname().  In Python 3.7.3, getsockname() returns a 
string (the name of the interface).  The documentation states "a tuple is used 
for the AF_CAN address family".  The string will break code that worked in 
3.5.3 by raising errors such as "Value Error: too many values to unpack 
(expected 2)".

Example:

#3.5.3
import socket
s = socket.socket(socket.AF_CAN, socket.SOCK_RAW, socket.CAN_RAW)
s.bind(('vcan0',)) # requires tuple
s.getsockname() # returns tuple: ('vcan0', 29)

#3.7.3
import socket
s = socket.socket(socket.AF_CAN, socket.SOCK_RAW, socket.CAN_RAW)
s.bind(('vcan0',)) # requires tuple
s.getsockname() # returns string: 'vcan0'

--
assignee: docs@python
components: Documentation
messages: 346559
nosy: Brent Gardner, docs@python
priority: normal
severity: normal
status: open
title: socket.getsockname() returns string instead of tuple
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



[issue37405] socket.getsockname() returns string instead of tuple

2019-06-25 Thread Brent Gardner


Change by Brent Gardner :


--
type:  -> behavior

___
Python tracker 

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



[issue36888] Create a way to check that the parent process is alive for deamonized processes

2019-06-25 Thread miss-islington


Change by miss-islington :


--
pull_requests: +14196
pull_request: https://github.com/python/cpython/pull/14382

___
Python tracker 

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



[issue36888] Create a way to check that the parent process is alive for deamonized processes

2019-06-25 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 594d9b9f58e1ef0a60b5ce9e590e0f45cd684f26 by Victor Stinner 
(Pierre Glaser) in branch 'master':
bpo-36888, test_multiprocessing: Increase test_parent_process timeout (GH-14286)
https://github.com/python/cpython/commit/594d9b9f58e1ef0a60b5ce9e590e0f45cd684f26


--

___
Python tracker 

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



[issue37400] test_os: test_chown() started to fail on AMD64 FreeBSD 10-STABLE Non-Debug 3.* buildbots

2019-06-25 Thread STINNER Victor


STINNER Victor  added the comment:

I merged my fix. I close the issue and hope that the test will not fail again 
;-)

Python 2.7 is not affected: it doesn't have test_chown().

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



[issue37400] test_os: test_chown() started to fail on AMD64 FreeBSD 10-STABLE Non-Debug 3.* buildbots

2019-06-25 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 1d4b6ba19466aba0eb91c4ba01ba509acf18c723 by Victor Stinner (Miss 
Islington (bot)) in branch '3.7':
bpo-37400: Fix test_os.test_chown() (GH-14374) (GH-14378)
https://github.com/python/cpython/commit/1d4b6ba19466aba0eb91c4ba01ba509acf18c723


--

___
Python tracker 

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



[issue37347] Reference-counting problem in sqlite

2019-06-25 Thread Aleksandr Balezin


Aleksandr Balezin  added the comment:

I've pushed changes 
https://github.com/python/cpython/pull/14268/commits/bce7fdc952b14c23821e184e82b3944f6e10aaa9.
 
Could I ask for clarification on callback and Py_DECREF(something)?

--

___
Python tracker 

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



[issue37396] [2.7] PCbuild/pythoncore.vcxproj kills the wrong program

2019-06-25 Thread STINNER Victor


STINNER Victor  added the comment:

Me:
> Should PCbuild/pyproject.vcxproj explicitly import python.props which defines 
> it?

Steve:
> It already does :) 


Well, I was confused by the message. I just fixed the message.

I suggest to close the issue and see if the bug comes back.

--

___
Python tracker 

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



[issue37384] Compiling Python 3.7.3 from source and getting all sorts of errors on Debian?

2019-06-25 Thread Ned Deily


Ned Deily  added the comment:

Glad it finally worked for you.  It's hard to tell at this point what went 
wrong originally.  Perhaps there was an "unclean" build as a result of trying 
to fix the uuid header issue?  In any case, the most recent result you posted 
looks fine, so unless there is some reproducible problem here, let's close this 
issue.

--
resolution:  -> works for me
status: open -> closed

___
Python tracker 

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



[issue37404] asyncio sock_recv blocks on ssl sockets.

2019-06-25 Thread Christian Heimes


Christian Heimes  added the comment:

You can't use sock_recv() with a wrapped SSL socket. A SSLSocket behaves 
differently because there is user-level buffering. The connection operates on 
TLS frames and only hands off data after it has been decrypted and verified. 
asyncio uses wrap_bio().

--

___
Python tracker 

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



[issue37391] MacOS Touchpad scrolling crashes IDLE

2019-06-25 Thread Ned Deily


Ned Deily  added the comment:

As @willingc notes, it is a Homebrew build issue that should be addressed by 
Homebrew.  That said, it is also possible that Homebrew builds have been 
affected by changes in Mojave as mentioned in Issue34956.  I plan to look into 
that shortly to see if we can make building with a third-party Tk easier on 
macOS.

--

___
Python tracker 

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



[issue37404] asyncio sock_recv blocks on ssl sockets.

2019-06-25 Thread Akshay Takkar


New submission from Akshay Takkar :

I'm working on a server that uses sock_recv from asyncio.
await sock_recv(socket, n) never returns if socket is wrapped in ssl using the 
wrap_socket function from the ssl module.
I think the problem stated in this stackoverflow question could be the reason: 
https://stackoverflow.com/questions/40346619/behavior-of-pythons-select-with-partial-recv-on-ssl-socket

--
assignee: christian.heimes
components: SSL, asyncio
files: server_client
messages: 346550
nosy: AkshayTakkar, asvetlov, christian.heimes, yselivanov
priority: normal
severity: normal
status: open
title: asyncio sock_recv blocks on ssl sockets.
type: behavior
versions: Python 3.7
Added file: https://bugs.python.org/file48437/server_client

___
Python tracker 

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



[issue37403] Recommend .venv for virtual environment names

2019-06-25 Thread Brett Cannon


New submission from Brett Cannon :

I've been asked enough times about what directory name to use for virtual 
environments I'm going to update 
https://docs.python.org/3/library/venv.html#module-venv to suggest `.venv` if 
you don't have a specific name (`.env` clashes with environment variable 
definition files which is a common issue I see users run into).

--
assignee: brett.cannon
components: Documentation
messages: 346549
nosy: brett.cannon
priority: low
severity: normal
stage: needs patch
status: open
title: Recommend .venv for virtual environment names
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



[issue37276] Incorrect number of running calls in ProcessPoolExecutor

2019-06-25 Thread Géry

Géry  added the comment:

@Ned Deily

Okay, I did not know if I had to list the potentially interested people 
(according to their Github contribution on the module for instance) or let them 
do it themselves. Thank you for clarifying.

@Carol Willing

The number of RUNNING futures is always `max_workers + 1` for 
`ProcessPoolExecutor` but only on Windows (CPython 3.7, Windows 10). On MacOS, 
this number varies, depending on the time you wait before calling 
`print(future.running())`.
So to reproduce you could add the expression `time.sleep(n)` right after  the 
statement `futures = [executor.submit(call) for _ in range(8)]` and see if the 
number of RUNNING futures varies with n.

--

___
Python tracker 

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



[issue33972] AttributeError in email.message.iter_attachments()

2019-06-25 Thread miss-islington


miss-islington  added the comment:


New changeset 01b23948038d35b119cededd149110231ecce00d by Miss Islington (bot) 
(Abhilash Raj) in branch '3.7':
[3.7] bpo-33972: Fix EmailMessage.iter_attachments raising AttributeError. 
(GH-14119) (GH-14381)
https://github.com/python/cpython/commit/01b23948038d35b119cededd149110231ecce00d


--

___
Python tracker 

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



[issue33972] AttributeError in email.message.iter_attachments()

2019-06-25 Thread miss-islington


miss-islington  added the comment:


New changeset c6e32824cf038386174fe2b9e7273e4779c9958c by Miss Islington (bot) 
(Abhilash Raj) in branch '3.8':
[3.8] bpo-33972: Fix EmailMessage.iter_attachments raising AttributeError 
(GH-14119) (GH-14380)
https://github.com/python/cpython/commit/c6e32824cf038386174fe2b9e7273e4779c9958c


--
nosy: +miss-islington

___
Python tracker 

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



[issue37391] MacOS Touchpad scrolling crashes IDLE

2019-06-25 Thread Carol Willing


Carol Willing  added the comment:

George,

This is a Homebrew build issue (see additional notes on the Brew forum 
https://discourse.brew.sh/t/cannot-get-python-to-use-tcl-tk-version-8-6/3563.

You may wish to try the suggestions found there. My recommendation would be to 
use the official Python from python.org or the Anaconda distribution for Mac.

--

___
Python tracker 

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



[issue33972] AttributeError in email.message.iter_attachments()

2019-06-25 Thread Abhilash Raj


Change by Abhilash Raj :


--
pull_requests: +14195
pull_request: https://github.com/python/cpython/pull/14381

___
Python tracker 

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



[issue33972] AttributeError in email.message.iter_attachments()

2019-06-25 Thread Abhilash Raj


Change by Abhilash Raj :


--
pull_requests: +14194
pull_request: https://github.com/python/cpython/pull/14380

___
Python tracker 

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



[issue37276] Incorrect number of running calls in ProcessPoolExecutor

2019-06-25 Thread Carol Willing


Carol Willing  added the comment:

I've run the code snippet several times on Mac 10.14.5 with Python 3.7.3. I'm 
not able to replicate your result for the `ProcessPoolExecutor` but can 
replicate results for `ThreadPoolExecutor`. Do you have another example where 
you are seeing this behavior?

--
nosy: +willingc

___
Python tracker 

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



[issue37391] MacOS Touchpad scrolling crashes IDLE

2019-06-25 Thread George Pantazes


George Pantazes  added the comment:

Checked against the python.org installation. In that installation's IDLE, About 
IDLE > Tk version 8.6.8.

So my question is: 
- Is it on me to fix this for my own machine because I should have gotten my 
own more-up-to-date TK before installing Python via Homebrew?
- Or is this a Homebrew installation bug? And should they include a more 
up-to-dat TK with their installation?

--

___
Python tracker 

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



[issue37391] MacOS Touchpad scrolling crashes IDLE

2019-06-25 Thread George Pantazes

George Pantazes  added the comment:

Alright folks, sorry there's going to be a lot of pasted blocks of output, so 
just look for where I @ your name to address your questions.

@ned.deily, here is the output of those info commands.

```
➜ python3 -m test.pythoninfo   
Python debug information


CC.version: Apple LLVM version 10.0.1 (clang-1001.0.46.4)
Py_DEBUG: No (sys.gettotalrefcount() missing)
_decimal.__libmpdec_version__: 2.4.2
builtins.float.double_format: IEEE, little-endian
builtins.float.float_format: IEEE, little-endian
core_config[_disable_importlib]: 0
core_config[allocator]: None
core_config[argv]: ['-m']
core_config[base_exec_prefix]: 
'/Users/georgep/Documents/workspace/r-tester/venv/bin/..'
core_config[base_prefix]: 
'/Users/georgep/Documents/workspace/r-tester/venv/bin/..'
core_config[coerce_c_locale]: 0
core_config[coerce_c_locale_warn]: 0
core_config[dev_mode]: 0
core_config[dump_refs]: 0
core_config[exec_prefix]: 
'/Users/georgep/Documents/workspace/r-tester/venv/bin/..'
core_config[executable]: 
'/Users/georgep/Documents/workspace/r-tester/venv/bin/python3'
core_config[faulthandler]: 0
core_config[hash_seed]: 0
core_config[home]: None
core_config[ignore_environment]: 0
core_config[import_time]: 0
core_config[install_signal_handlers]: 1
core_config[malloc_stats]: 0
core_config[module_search_path_env]: None
core_config[module_search_paths]: 
['/Users/georgep/Documents/workspace/r-tester/venv/bin/../lib/python37.zip', 
'/Users/georgep/Documents/workspace/r-tester/venv/bin/../lib/python3.7', 
'/Users/georgep/Documents/workspace/r-tester/venv/bin/../lib/python3.7/lib-dynload']
core_config[prefix]: '/Users/georgep/Documents/workspace/r-tester/venv/bin/..'
core_config[program]: 'python3'
core_config[program_name]: 'python3'
core_config[show_alloc_count]: 0
core_config[show_ref_count]: 0
core_config[tracemalloc]: 0
core_config[use_hash_seed]: 0
core_config[utf8_mode]: 0
core_config[warnoptions]: []
core_config[xoptions]: []
datetime.datetime.now: 2019-06-25 10:50:02.453944
expat.EXPAT_VERSION: expat_2.2.6
global_config[Py_BytesWarningFlag]: 0
global_config[Py_DebugFlag]: 0
global_config[Py_DontWriteBytecodeFlag]: 0
global_config[Py_FileSystemDefaultEncodeErrors]: 'surrogateescape'
global_config[Py_FileSystemDefaultEncoding]: 'utf-8'
global_config[Py_FrozenFlag]: 0
global_config[Py_HasFileSystemDefaultEncoding]: 1
global_config[Py_HashRandomizationFlag]: 1
global_config[Py_IgnoreEnvironmentFlag]: 0
global_config[Py_InspectFlag]: 0
global_config[Py_InteractiveFlag]: 0
global_config[Py_IsolatedFlag]: 0
global_config[Py_NoSiteFlag]: 0
global_config[Py_NoUserSiteDirectory]: 0
global_config[Py_OptimizeFlag]: 0
global_config[Py_QuietFlag]: 0
global_config[Py_UTF8Mode]: 0
global_config[Py_UnbufferedStdioFlag]: 0
global_config[Py_VerboseFlag]: 0
locale.encoding: UTF-8
main_config[argv]: 
['/usr/local/Cellar/python/3.7.3/Frameworks/Python.framework/Versions/3.7/lib/python3.7/test/pythoninfo.py']
main_config[base_exec_prefix]: 
'/Users/georgep/Documents/workspace/r-tester/venv/bin/..'
main_config[base_prefix]: 
'/Users/georgep/Documents/workspace/r-tester/venv/bin/..'
main_config[exec_prefix]: 
'/Users/georgep/Documents/workspace/r-tester/venv/bin/..'
main_config[executable]: 
'/Users/georgep/Documents/workspace/r-tester/venv/bin/python3'
main_config[install_signal_handlers]: 1
main_config[module_search_path]: 
['/Users/georgep/Documents/workspace/r-tester', 
'/Users/georgep/Documents/workspace/r-tester/venv/lib/python37.zip', 
'/Users/georgep/Documents/workspace/r-tester/venv/lib/python3.7', 
'/Users/georgep/Documents/workspace/r-tester/venv/lib/python3.7/lib-dynload', 
'/usr/local/Cellar/python/3.7.3/Frameworks/Python.framework/Versions/3.7/lib/python3.7',
 '/Users/georgep/Documents/workspace/r-tester/venv/lib/python3.7/site-packages']
main_config[prefix]: '/Users/georgep/Documents/workspace/r-tester/venv/bin/..'
main_config[warnoptions]: []
main_config[xoptions]: {}
os.cpu_count: 8
os.cwd: /Users/georgep/Documents/workspace/r-tester
os.environ[DISPLAY]: 
/private/tmp/com.apple.launchd.iXqE5VioqF/org.macosforge.xquartz:0
os.environ[HOME]: /Users/georgep
os.environ[LC_CTYPE]: en_US.UTF-8
os.environ[PATH]: 
/Users/georgep/Documents/workspace/r-tester/venv/bin:/Users/georgep/.rvm/gems/ruby-2.5.1/bin:/Users/georgep/.rvm/gems/ruby-2.5.1@global/bin:/Users/georgep/.rvm/rubies/ruby-2.5.1/bin:/Users/georgep/bin:/Users/georgep/.jenv/shims:/Users/georgep/.jenv/bin:/Users/georgep/.jenv/shims:/usr/local/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/TeX/texbin:/usr/local/munki:/opt/X11/bin:/Applications/Postgres.app/Contents/Versions/latest/bin:/Users/georgep/.rvm/bin
os.environ[SHELL]: /bin/zsh
os.environ[TERM]: xterm-256color
os.environ[TMPDIR]: /var/folders/sv/5gh4tk990539nzhdt311pg0h000_fp/T/
os.environ[VIRTUAL_ENV]: /Users/georgep/Documents/workspace/r-tester/venv
os.gid: 20
os.groups: 20, 12, 61, 80, 33, 98, 100, 204, 250, 395, 398, 399

[issue37391] MacOS Touchpad scrolling crashes IDLE

2019-06-25 Thread Carol Willing


Carol Willing  added the comment:

Thanks for the additional information Rakesh.

--

___
Python tracker 

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



[issue37402] Fatal Python error: Cannot recover from stack overflow issues on Python 3.6 and 3.7

2019-06-25 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
components: +asyncio -Interpreter Core
nosy: +asvetlov, yselivanov
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



[issue33972] AttributeError in email.message.iter_attachments()

2019-06-25 Thread Barry A. Warsaw


Barry A. Warsaw  added the comment:


New changeset 02257012f6d3821d816cb6a7e8461a88a05b9a08 by Barry Warsaw 
(Abhilash Raj) in branch 'master':
bpo-33972: Fix EmailMessage.iter_attachments raising AttributeError. (GH-14119)
https://github.com/python/cpython/commit/02257012f6d3821d816cb6a7e8461a88a05b9a08


--

___
Python tracker 

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



[issue4963] mimetypes.guess_extension result changes after mimetypes.init()

2019-06-25 Thread Steve Dower


Change by Steve Dower :


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



[issue4963] mimetypes.guess_extension result changes after mimetypes.init()

2019-06-25 Thread Steve Dower


Steve Dower  added the comment:


New changeset 2a99fd911ebeecedbb250a05667cd46eca4735b9 by Steve Dower in branch 
'3.7':
bpo-4963: Fix for initialization and non-deterministic behavior issues in 
mimetypes (GH-14376)
https://github.com/python/cpython/commit/2a99fd911ebeecedbb250a05667cd46eca4735b9


--

___
Python tracker 

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



[issue37276] Incorrect number of running calls in ProcessPoolExecutor

2019-06-25 Thread Ned Deily


Change by Ned Deily :


--
nosy:  -ned.deily

___
Python tracker 

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



[issue37276] Incorrect number of running calls in ProcessPoolExecutor

2019-06-25 Thread Ned Deily


Ned Deily  added the comment:

@maggyero, Please do not spam a list of people by add their names to issues; it 
will not speed a resolution.  Let the people doing bug triage evaluate the 
issue and, if necessary, nosy the appropriate developers.

--

___
Python tracker 

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



[issue4963] mimetypes.guess_extension result changes after mimetypes.init()

2019-06-25 Thread David K. Hess


David K. Hess  added the comment:

Thank you Steve!

Nice to see this one make it across the finish line.

--

___
Python tracker 

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



[issue37391] MacOS Touchpad scrolling crashes IDLE

2019-06-25 Thread Ned Deily


Ned Deily  added the comment:

> It seems to be compiled using Tcl 8.5 that is installed with the system.

Yes, and that is almost certainly the original poster's problem, as well.  In 
fact, this same issue was reported in Issue10731 in 2010. The Tcl/Tk 8.5 
supplied by Apple in macOS is terribly out-of-date and dangerously buggy; it 
should never be used.  You should even be seeing a warning message from IDLE 
when using that system Tcl/Tk. I'm not familiar with how Homebrew manages the 
Tcl/Tk that their Pythons link with but, if necessary, you should follow up 
with them to ensure that none of their recipes use the system Tcl/Tk.

More details here:
https://www.python.org/download/mac/tcltk/

--
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> UnicodeDecodeError in OS X tkinter when binding to 

___
Python tracker 

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



[issue37400] test_os: test_chown() started to fail on AMD64 FreeBSD 10-STABLE Non-Debug 3.* buildbots

2019-06-25 Thread miss-islington


miss-islington  added the comment:


New changeset 12d174bed9960ded1d072035c57f82e10a89f0d6 by Miss Islington (bot) 
in branch '3.8':
bpo-37400: Fix test_os.test_chown() (GH-14374)
https://github.com/python/cpython/commit/12d174bed9960ded1d072035c57f82e10a89f0d6


--
nosy: +miss-islington

___
Python tracker 

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



[issue4963] mimetypes.guess_extension result changes after mimetypes.init()

2019-06-25 Thread Steve Dower


Steve Dower  added the comment:


New changeset 25fbe33b92cd938e809839feaa3fda97e6ad0980 by Steve Dower in branch 
'3.8':
bpo-4963: Fix for initialization and non-deterministic behavior issues in 
mimetypes (GH-14375)
https://github.com/python/cpython/commit/25fbe33b92cd938e809839feaa3fda97e6ad0980


--

___
Python tracker 

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



[issue37396] [2.7] PCbuild/pythoncore.vcxproj kills the wrong program

2019-06-25 Thread STINNER Victor


STINNER Victor  added the comment:

Aaaah, CIs are funny.

--

___
Python tracker 

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



[issue37400] test_os: test_chown() started to fail on AMD64 FreeBSD 10-STABLE Non-Debug 3.* buildbots

2019-06-25 Thread miss-islington


Change by miss-islington :


--
pull_requests: +14192
pull_request: https://github.com/python/cpython/pull/14377

___
Python tracker 

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



[issue37400] test_os: test_chown() started to fail on AMD64 FreeBSD 10-STABLE Non-Debug 3.* buildbots

2019-06-25 Thread miss-islington


Change by miss-islington :


--
pull_requests: +14193
pull_request: https://github.com/python/cpython/pull/14378

___
Python tracker 

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



[issue37400] test_os: test_chown() started to fail on AMD64 FreeBSD 10-STABLE Non-Debug 3.* buildbots

2019-06-25 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset d7c87d982d4ec4ba201bcee14324ae5e0e90581f by Victor Stinner in 
branch 'master':
bpo-37400: Fix test_os.test_chown() (GH-14374)
https://github.com/python/cpython/commit/d7c87d982d4ec4ba201bcee14324ae5e0e90581f


--

___
Python tracker 

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



[issue37393] Deprecation warnings in test_ntpath

2019-06-25 Thread Steve Dower


Steve Dower  added the comment:

We should also remove that deprecation warning, as PEP 528 (or was it PEP 529) 
undeprecated bytes paths.

--

___
Python tracker 

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



[issue37396] [2.7] PCbuild/pythoncore.vcxproj kills the wrong program

2019-06-25 Thread Steve Dower


Steve Dower  added the comment:

> Should PCbuild/pyproject.vcxproj explicitly import python.props which defines 
> it?

It already does :)

This is more likely because the previous build on that buildbot crashed(?) or 
because it was aborted during test_multiprocessing:

https://buildbot.python.org/all/#/builders/45/builds/428

--

___
Python tracker 

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



[issue4963] mimetypes.guess_extension result changes after mimetypes.init()

2019-06-25 Thread Steve Dower


Change by Steve Dower :


--
pull_requests: +14190
stage: backport needed -> patch review
pull_request: https://github.com/python/cpython/pull/14375

___
Python tracker 

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



[issue4963] mimetypes.guess_extension result changes after mimetypes.init()

2019-06-25 Thread Steve Dower


Change by Steve Dower :


--
pull_requests: +14191
pull_request: https://github.com/python/cpython/pull/14376

___
Python tracker 

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



[issue37276] Incorrect number of running calls in ProcessPoolExecutor

2019-06-25 Thread Géry

Géry  added the comment:

Initial post: https://stackoverflow.com/q/56587166/2326961

--

___
Python tracker 

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



[issue37400] test_os: test_chown() started to fail on AMD64 FreeBSD 10-STABLE Non-Debug 3.* buildbots

2019-06-25 Thread STINNER Victor


STINNER Victor  added the comment:

I'm connected to the FreeBSD CURRENT buildbot as the user "haypo". I'm unable 
to reproduce the bug:

CURRENT-amd64% id
uid=1003(haypo) gid=1003(haypo) groups=1003(haypo)

CURRENT-amd64% ./python -m test test_os -m test_chown
(...)
Tests result: SUCCESS

Moreover, it seems like something changes on the buildbot, since the user 
"buildbot" now has 0 group!?

$ ./python
>>> [g.gr_gid for g in grp.getgrall() if 'buildbot' in g.gr_mem]
[]

Or maybe as the user "haypo", I cannot see *all* groups.

In case of doubt, I will blindly apply my fix PR 14374.

--

___
Python tracker 

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



[issue37400] test_os: test_chown() started to fail on AMD64 FreeBSD 10-STABLE Non-Debug 3.* buildbots

2019-06-25 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +14189
pull_request: https://github.com/python/cpython/pull/14374

___
Python tracker 

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



[issue37391] MacOS Touchpad scrolling crashes IDLE

2019-06-25 Thread Rakesh Singh


Rakesh Singh  added the comment:

Same behaviour experienced here on Mojave Kernel Version 18.6.0.
Homebrew Python 3.7.3

Python 3.7.3 (default, Jun 19 2019, 07:38:49) 
[Clang 10.0.1 (clang-1001.0.46.4)] on darwin
Type "help", "copyright", "credits" or "license()" for more information.
WARNING: The version of Tcl/Tk (8.5.9) in use may be unstable. Visit
http://www.python.org/download/mac/tcltk/ for current information.
>>> 

It seems to be compiled using Tcl 8.5 that is installed with the system.
IDLE shipped with Anaconda works correctly.



```
brew linkage python
System libraries:
  /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit
  /System/Library/Frameworks/Carbon.framework/Versions/A/Carbon
  /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
  /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices
  /System/Library/Frameworks/Foundation.framework/Versions/C/Foundation
  
/System/Library/Frameworks/SystemConfiguration.framework/Versions/A/SystemConfiguration
  /System/Library/Frameworks/Tcl.framework/Versions/8.5/Tcl
  /System/Library/Frameworks/Tk.framework/Versions/8.5/Tk
  /usr/lib/libSystem.B.dylib
  /usr/lib/libbz2.1.0.dylib
  /usr/lib/libncurses.5.4.dylib
  /usr/lib/libobjc.A.dylib
  /usr/lib/libpanel.5.4.dylib
  /usr/lib/libz.1.dylib
Homebrew libraries:
  /usr/local/opt/gdbm/lib/libgdbm.6.dylib (gdbm)
  /usr/local/opt/openssl/lib/libcrypto.1.0.0.dylib (openssl)
  /usr/local/opt/openssl/lib/libssl.1.0.0.dylib (openssl)
  
/usr/local/Cellar/python/3.7.3/Frameworks/Python.framework/Versions/3.7/Python 
(python)
  /usr/local/opt/readline/lib/libreadline.8.dylib (readline)
  /usr/local/opt/sqlite/lib/libsqlite3.0.dylib (sqlite)
  /usr/local/opt/xz/lib/liblzma.5.dylib (xz)
```

--
nosy: +Rakesh Singh

___
Python tracker 

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



[issue37400] test_os: test_chown() started to fail on AMD64 FreeBSD 10-STABLE Non-Debug 3.* buildbots

2019-06-25 Thread STINNER Victor


STINNER Victor  added the comment:

I merged my pythoninfo change, more complete pythoninfo from the buildbot:

os.getgid: 1002
os.getgrouplist: 1002
os.getgroups: 1002
os.getuid: 1002

pwd.getpwuid(1002): pwd.struct_passwd(pw_name='buildbot', pw_passwd='*', 
pw_uid=1002, pw_gid=1002, pw_gecos='FreeBSD BuildBot', pw_dir='/home/buildbot', 
pw_shell='/bin/sh')

IMHO the test is wrong: it should rely on os.getgroups() rather tan "discover" 
groups from pw.getpwall().

--

___
Python tracker 

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



[issue31711] ssl.SSLSocket.send(b"") fails

2019-06-25 Thread Shivaram Lingamneni


Shivaram Lingamneni  added the comment:

Are there any possible next steps on this?

This issue is very counterintuitive and challenging to debug --- it commonly 
presents as a nondeterministic edge case, and it appears to be a failed system 
call but doesn't show up in strace.

Thanks for your time.

--
nosy: +slingamn

___
Python tracker 

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



[issue20443] __code__. co_filename should always be an absolute path

2019-06-25 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 3939c321c90283b49eddde762656e4b1940e7150 by Victor Stinner in 
branch 'master':
bpo-20443: _PyConfig_Read() gets the absolute path of run_filename (GH-14053)
https://github.com/python/cpython/commit/3939c321c90283b49eddde762656e4b1940e7150


--

___
Python tracker 

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



[issue37402] Fatal Python error: Cannot recover from stack overflow issues on Python 3.6 and 3.7

2019-06-25 Thread Andreas Jung


Andreas Jung  added the comment:

Typical traceback:

WARNING:plone.app.contenttypes.indexers:Lookup of PrimaryField failed for 
http://nohost/plone_portal/microscopycentre/img/fotos-specialist-course2018.htm/demo10-jpg
 If renaming or importing please reindex!
WARNING:plone.app.contenttypes.indexers:Lookup of PrimaryField failed for 
http://nohost/plone_portal/microscopycentre/img/fotos-specialist-course2018.htm/kick-off2-jpg
 If renaming or importing please reindex!
WARNING:plone.app.contenttypes.indexers:Lookup of PrimaryField failed for 
http://nohost/plone_portal/microscopycentre/img/fotos-specialist-course2018.htm/kick-off3-jpg
 If renaming or importing please reindex!
WARNING:plone.app.contenttypes.indexers:Lookup of PrimaryField failed for 
http://nohost/plone_portal/microscopycentre/img/fotos-specialist-course2018.htm/kick-off6-jpg
 If renaming or importing please reindex!
WARNING:plone.app.contenttypes.indexers:Lookup of PrimaryField failed for 
http://nohost/plone_portal/microscopycentre/img/fotos-specialist-course2018.htm/kick-off5-jpg
 If renaming or importing please reindex!
WARNING:plone.app.contenttypes.indexers:Lookup of PrimaryField failed for 
http://nohost/plone_portal/microscopycentre/img/toon-jpg If renaming or 
importing please reindex!
WARNING:plone.app.contenttypes.indexers:Lookup of PrimaryField failed for 
http://nohost/plone_portal/microscopycentre/img/wf.htm If renaming or importing 
please reindex!
WARNING:plone.app.contenttypes.indexers:Lookup of PrimaryField failed for 
http://nohost/plone_portal/microscopycentre/img/toon.htm If renaming or 
importing please reindex!
WARNING:plone.app.contenttypes.indexers:Lookup of PrimaryField failed for 
http://nohost/plone_portal/microscopycentre/img/unite.htm If renaming or 
importing please reindex!
WARNING:plone.app.contenttypes.indexers:Lookup of PrimaryField failed for 
http://nohost/plone_portal/microscopycentre/img/spt If renaming or importing 
please reindex!
WARNING:plone.app.contenttypes.indexers:Lookup of PrimaryField failed for 
http://nohost/plone_portal/openuniversiteit/nl/contact/studiegids2015.pdf If 
renaming or importing please reindex!
WARNING:plone.app.contenttypes.indexers:Lookup of PrimaryField failed for 
http://nohost/plone_portal/openuniversiteit/nl/contact/studiegids2015.pdf If 
renaming or importing please reindex!
Fatal Python error: Cannot recover from stack overflow.

Thread 0x7fe43f8b0700 (most recent call first):
  File "/opt/python-3.7.3/lib/python3.7/selectors.py", line 468 in select
  File "/opt/python-3.7.3/lib/python3.7/asyncio/base_events.py", line 1739 in 
_run_once
  File "/opt/python-3.7.3/lib/python3.7/asyncio/base_events.py", line 539 in 
run_forever
  File 
"/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/ZEO-5.2.1-py3.7.egg/ZEO/asyncio/client.py",
 line 861 in run
  File "/opt/python-3.7.3/lib/python3.7/threading.py", line 865 in run
  File "/opt/python-3.7.3/lib/python3.7/threading.py", line 917 in 
_bootstrap_inner
  File "/opt/python-3.7.3/lib/python3.7/threading.py", line 885 in _bootstrap

Current thread 0x7fe44e046500 (most recent call first):
  File 
"/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/zope.component-4.5-py3.7.egg/zope/component/hooks.py",
 line 103 in getSiteManager
  File 
"/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/zope.component-4.5-py3.7.egg/zope/component/_api.py",
 line 157 in queryUtility
  File 
"/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/Products.CMFCore-2.4.0b8-py3.7.egg/Products/CMFCore/DynamicType.py",
 line 71 in getTypeInfo
  File 
"/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/Products.CMFDynamicViewFTI-6.0.1-py3.7.egg/Products/CMFDynamicViewFTI/browserdefault.py",
 line 96 in getLayout
  File 
"/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/Products.CMFDynamicViewFTI-6.0.1-py3.7.egg/Products/CMFDynamicViewFTI/browserdefault.py",
 line 75 in __call__
  File 
"/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/Products.CMFDynamicViewFTI-6.0.1-py3.7.egg/Products/CMFDynamicViewFTI/browserdefault.py",
 line 76 in __call__
  File 
"/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/Products.CMFDynamicViewFTI-6.0.1-py3.7.egg/Products/CMFDynamicViewFTI/browserdefault.py",
 line 76 in __call__
  File 
"/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/Products.CMFDynamicViewFTI-6.0.1-py3.7.egg/Products/CMFDynamicViewFTI/browserdefault.py",
 line 76 in __call__
  File 
"/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/Products.CMFDynamicViewFTI-6.0.1-py3.7.egg/Products/CMFDynamicViewFTI/browserdefault.py",
 line 76 in __call__
  File 
"/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/Products.CMFDynamicViewFTI-6.0.1-py3.7.egg/Products/CMFDynamicViewFTI/browserdefault.py",
 line 76 in __call__
  File 
"/home/ajung/sandboxes/ugent-portaal-plone-4x/eggs/Products.CMFDynamicViewFTI-6.0.1-py3.7.egg/Products/CMFDynamicViewFTI/browserdefault.py",
 line 76 in __call__
  File 

[issue37401] pygrib install error

2019-06-25 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

This tracker deals with issues in CPython. pygrib is not a part of the standard 
library. This could have better discussion at https://github.com/jswhit/pygrib. 
I am closing this as third party.

--
nosy: +xtreak
resolution:  -> third party
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



[issue37402] Fatal Python error: Cannot recover from stack overflow issues on Python 3.6 and 3.7

2019-06-25 Thread Andreas Jung


New submission from Andreas Jung :

I am using Python 3.6 and 3.7 (always latest minor releases) with Plone 5.2 and 
I various issues with 

Fatal Python error: Cannot recover from stack overflow.

and do not make much sense to me.

Some related tracebacks are documented here

https://github.com/plone/Products.CMFPlone/issues/2874

https://community.plone.org/t/fatal-python-error-cannot-recover-from-stack-overflow/8589

There are no patterns directly visible what may typically cause the error. 

The errors occur at least with Python 3.6 system Python on Fedora 26 and a 
self-compiled Python 3.7.3 on a fresh Debian 9 system.

--
components: Interpreter Core
messages: 346521
nosy: ajung
priority: normal
severity: normal
status: open
title: Fatal Python error: Cannot recover from stack overflow issues on Python 
3.6 and 3.7
type: crash
versions: Python 3.6, Python 3.7

___
Python tracker 

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



[issue37401] pygrib install error

2019-06-25 Thread Borja

New submission from Borja :

Installing Pygrib with pip (pip install pygrib):

Collecting pygrib
  Using cached 
https://files.pythonhosted.org/packages/f8/10/c0d22eafec62fb5413799a7034ac45f26bfa77405c8527c17869e4c3ee4d/pygrib-2.0.4.tar.gz
Requirement already satisfied: numpy in ./lib/python3.7/site-packages (from 
pygrib) (1.16.4)
Installing collected packages: pygrib
  Running setup.py install for pygrib ... error
ERROR: Complete output from command /home/python3/bin/python3.7 -u -c 
'import setuptools, 
tokenize;__file__='"'"'/tmp/pip-install-qcxz0945/pygrib/setup.py'"'"';f=getattr(tokenize,
 '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', 
'"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install 
--record /tmp/pip-record-qd474uhl/install-record.txt 
--single-version-externally-managed --compile:
ERROR: /tmp/pip-install-qcxz0945/pygrib/setup.py:41: DeprecationWarning: 
The SafeConfigParser class has been renamed to ConfigParser in Python 3.2. This 
alias will be removed in future versions. Use ConfigParser directly instead.
  config = _ConfigParser()
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.7
copying ncepgrib2.py -> build/lib.linux-x86_64-3.7
running build_ext
building 'pygrib' extension
creating build/temp.linux-x86_64-3.7
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 
-Wall -fPIC -I/home/python3/lib/python3.7/site-packages/numpy/core/include 
-Ig2clib_src -I/home/python3/include/python3.7m -c pygrib.c -o 
build/temp.linux-x86_64-3.7/pygrib.o
In file included from 
/home/python3/lib/python3.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:1822:0,
 from 
/home/python3/lib/python3.7/site-packages/numpy/core/include/numpy/ndarrayobject.h:12,
 from 
/home/python3/lib/python3.7/site-packages/numpy/core/include/numpy/arrayobject.h:4,
 from pygrib.c:613:

/home/python3/lib/python3.7/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2:
 aviso: #warning "Using deprecated NumPy API, disable it with " "#define 
NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
 #warning "Using deprecated NumPy API, disable it with " \
  ^
pygrib.c:614:22: error fatal: grib_api.h: No existe el fichero o el 
directorio
 #include "grib_api.h"
  ^
compilación terminada.
error: command 'gcc' failed with exit status 1

ERROR: Command "/home/python3/bin/python3.7 -u -c 'import setuptools, 
tokenize;__file__='"'"'/tmp/pip-install-qcxz0945/pygrib/setup.py'"'"';f=getattr(tokenize,
 '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', 
'"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install 
--record /tmp/pip-record-qd474uhl/install-record.txt 
--single-version-externally-managed --compile" failed with error code 1 in 
/tmp/pip-install-qcxz0945/pygrib/

Numpy (1.16.4)
Python (3.7.3)
Pip (19.1.1)

--
components: Extension Modules
messages: 346520
nosy: Saszalez
priority: normal
severity: normal
status: open
title: pygrib install error
versions: Python 3.7

___
Python tracker 

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



[issue37398] contextlib.ContextDecorator decorating async functions

2019-06-25 Thread John Belmonte


John Belmonte  added the comment:

My use case is for a non-async context manager, and if we take 
track_entry_and_exit as an example that's non-async as well.

The explicit approach (e.g. separate base class for decorators applied to sync 
vs. async functions) doesn't seem ideal, because it precludes having a single 
context manager for both cases.  track_entry_and_exit is an example where a 
context manager would want to decorate both types of functions.

I'm not sure how big of a problem the iscoroutinefunction() limitation is-- in 
Trio style we don't pass around coroutines by normal functions.  The `async` 
qualifier exists to make it clear when a function returns a coroutine, and 
ContextDecorator already doesn't work for the case of a regular function 
returning a coroutine.  I think the scope here is to enhance ContextDecorator 
to work with async functions which are properly qualified with `async`.

--

___
Python tracker 

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



[issue34606] Unable to read zip file with extra

2019-06-25 Thread Andreas Gäer

Andreas Gäer  added the comment:

I'm a little bit puzzled that this bug is closed as "not a bug" despite the 
fact that all versions of python allow the user to create "invalid" ZIP files 
and all version up to 3.7 are able to read those "invalid" files.

Currently we're stuck with a lot of already created ZIP files that cannot be 
read or fixed after an update to 3.7.

Would it be an option to make decoding of extra data optional eg. with an extra 
keyword arg to __init__?

--
nosy: +Andreas.Gäer

___
Python tracker 

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



[issue37398] contextlib.ContextDecorator decorating async functions

2019-06-25 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

Got you.

iscoroutinefunction() is not reliable: it detects async functions only but 
fails if we have a regular function that returns awaitable object.

I think AsyncContextDecorator is needed here to explicitly point that you want 
to wrap async function.

Another question is: sync or async context manager should be applied? I see use 
cases for both variants

--

___
Python tracker 

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



[issue37392] Remove sys.setcheckinterval()

2019-06-25 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 080b6b40fa6c6ddc79dcfcadab575bb1be3f47e9 by Victor Stinner 
(Xtreak) in branch 'master':
bpo-37392: Update the dir(sys) in module tutorial (GH-14365)
https://github.com/python/cpython/commit/080b6b40fa6c6ddc79dcfcadab575bb1be3f47e9


--

___
Python tracker 

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



[issue37400] test_os: test_chown() started to fail on AMD64 FreeBSD 10-STABLE Non-Debug 3.* buildbots

2019-06-25 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 9cb274114c844f9b1c13028f812926c987a7b4a7 by Victor Stinner in 
branch 'master':
bpo-37400: pythoninfo logs getpwuid and getgrouplist (GH-14373)
https://github.com/python/cpython/commit/9cb274114c844f9b1c13028f812926c987a7b4a7


--

___
Python tracker 

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



[issue37396] [2.7] PCbuild/pythoncore.vcxproj kills the wrong program

2019-06-25 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 49032fa7e1cc1b6dc12b898daac24b75bae7572c by Victor Stinner in 
branch '2.7':
bpo-37396, PCbuild: Include "_d" in "Killing any running ..." message (GH-14370)
https://github.com/python/cpython/commit/49032fa7e1cc1b6dc12b898daac24b75bae7572c


--

___
Python tracker 

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



[issue37398] contextlib.ContextDecorator decorating async functions

2019-06-25 Thread John Belmonte


John Belmonte  added the comment:

PerfTimer is a reusable, non-reentrant context manager implemented as a class.

There are already use cases of ContextDecorator described in the contextlib 
documentation, such as the track_entry_and_exit logger.  What reason would you 
have for such context managers to *not* wrap async functions properly?

--

___
Python tracker 

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



[issue37400] test_os: test_chown() started to fail on AMD64 FreeBSD 10-STABLE Non-Debug 3.* buildbots

2019-06-25 Thread Kubilay Kocak


Kubilay Kocak  added the comment:

And I just remembered that I had to restart the build worker service on that 
host (koobs-freebsd10) this morning as I was receiving messaging that the 
worker had gone missing.

I ran `[koobs@10-STABLE-amd64:~] sudo /usr/local/etc/rc.d/buildslave restart`

which is the same as the prevailing reproduction case in #27838

I could restart the worker to make the issue go away, but I think the 
underlying issue should be fixed instead.

Should we close this as a dupe and reopen the original?

--

___
Python tracker 

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



[issue37398] contextlib.ContextDecorator decorating async functions

2019-06-25 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

Sorry, I still have no idea what is the code for PerfTimer class.

--

___
Python tracker 

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



[issue37400] test_os: test_chown() started to fail on AMD64 FreeBSD 10-STABLE Non-Debug 3.* buildbots

2019-06-25 Thread Kubilay Kocak


Kubilay Kocak  added the comment:

This looks like a reincarnation of #27838

--
nosy: +koobs

___
Python tracker 

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



[issue37398] contextlib.ContextDecorator decorating async functions

2019-06-25 Thread John Belmonte


John Belmonte  added the comment:

I have a context manager used for timing sections of code or whole functions 
(when used as a decorator).  It's aware of the Trio async/await scheduler and 
is able to exclude periods of time where the task is not executing.  The 
context manager itself is not async.

Synopsis of decorator case:

  @PerfTimer('query')
  async def query_or_throw(self, q):
  return _parse_result(await self._send_query(q))

I'd like to just use the existing ContextDecorator to define the PerfTimer 
context manager, and have it wrap coroutine functions properly.  New API is not 
required.

--

___
Python tracker 

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



[issue37400] test_os: test_chown() started to fail on AMD64 FreeBSD 10-STABLE Non-Debug 3.* buildbots

2019-06-25 Thread STINNER Victor


Change by STINNER Victor :


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

___
Python tracker 

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



[issue37400] test_os: test_chown() started to fail on AMD64 FreeBSD 10-STABLE Non-Debug 3.* buildbots

2019-06-25 Thread STINNER Victor


New submission from STINNER Victor :

https://buildbot.python.org/all/#/builders/167/builds/1265

test_chown (test.test_os.ChownFileTests) ... ERROR

==
ERROR: test_chown (test.test_os.ChownFileTests)
--
Traceback (most recent call last):
  File 
"/usr/home/buildbot/python/3.x.koobs-freebsd10.nondebug/build/Lib/test/test_os.py",
 line 1327, in test_chown
os.chown(support.TESTFN, uid, gid_1)
PermissionError: [Errno 1] Operation not permitted: '@test_95158_tmp'

Extract of the test:

import grp
groups = [g.gr_gid for g in grp.getgrall() if getpass.getuser() in g.gr_mem]
if hasattr(os, 'getgid'):
process_gid = os.getgid()
if process_gid not in groups:
groups.append(process_gid)

@unittest.skipUnless(len(groups) > 1, "test needs more than one group")
def test_chown(self):
gid_1, gid_2 = groups[:2]
uid = os.stat(support.TESTFN).st_uid
os.chown(support.TESTFN, uid, gid_1)  # < FAIL HERE
gid = os.stat(support.TESTFN).st_gid
self.assertEqual(gid, gid_1)
os.chown(support.TESTFN, uid, gid_2)
gid = os.stat(support.TESTFN).st_gid
self.assertEqual(gid, gid_2)

Extract of test.pythoninfo:

os.uid: 1002
os.umask: 077
os.gid: 1002
os.groups: 1002


I'm not sure that the code to manually get groups from grp.getgrall() is 
correct. Why not relying on the *current* groups, os.getgroups()?

Note: there is also os.getgrouplist(), I'm not sure of the difference between 
os.getgroups() and os.getgrouplist(). I know that os.getgrouplist() was 
modified recently to use:

/*
 * NGROUPS_MAX is defined by POSIX.1 as the maximum
 * number of supplimental groups a users can belong to.
 * We have to increment it by one because
 * getgrouplist() returns both the supplemental groups
 * and the primary group, i.e. all of the groups the
 * user belongs to.
 */
ngroups = 1 + MAX_GROUPS;

--
components: Tests
messages: 346508
nosy: vstinner
priority: normal
severity: normal
status: open
title: test_os: test_chown() started to fail on AMD64 FreeBSD 10-STABLE 
Non-Debug 3.* buildbots
versions: 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



  1   2   >