[issue35444] Unify and optimize the helper for getting a builtin object

2018-12-11 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset 3cae16d2e98ffaa89ddd311df70a857dfaff4020 by Serhiy Storchaka in 
branch '3.7':
bpo-35444: Fix error handling when fail to look up builtin "getattr". 
(GH-11047) (GH-11107)
https://github.com/python/cpython/commit/3cae16d2e98ffaa89ddd311df70a857dfaff4020


--

___
Python tracker 

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



[issue35444] Unify and optimize the helper for getting a builtin object

2018-12-11 Thread miss-islington


Change by miss-islington :


--
pull_requests: +10337

___
Python tracker 

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



[issue15663] Investigate providing Tcl/Tk 8.6 with OS X installers

2018-12-11 Thread Ned Deily


Change by Ned Deily :


--
pull_requests: +10338

___
Python tracker 

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



[issue15663] Investigate providing Tcl/Tk 8.6 with OS X installers

2018-12-11 Thread Ned Deily


Change by Ned Deily :


--
pull_requests: +10339

___
Python tracker 

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



[issue35456] asyncio.Task.set_result() and set_exception() missing docstrings (and Liskov sub. principle)

2018-12-11 Thread INADA Naoki


INADA Naoki  added the comment:

> One way to deal with that would be to let a Task have a Future.
> "Prefer composition over inheritance" as they say.
> 
> I want to work on PR for this if nobody goes against it...

I'm not against it, unless it doesn't have backward incompatibility
or performance regression.

But I'm not sure you estimate the difficulty correctly: there are C 
implementation of Future and Task.  You need to have deep knowledge of Python/C 
APIs.


> PS: I really don't like when some people says that Python core developers are 
> known to have poor knowledge in regard to OOP principles. So I really don't 
> like letting something like this in the standard library...

Personally speaking, I dislike treating OOP principles like Ten Commandments.  
Principles have some reasons.  And these reasons are reasonable not for all 
cases.  When people say "it's bad because it violates principle!", they may 
have poor knowledge about the prinicple.
If they really know the principle, they must describe real-world problem caused 
by the violation.

In this case, I agree that misleading docstring is a small real-world problem 
caused by the violation.  While it can be fixable without fixing the violation.

Generally, `set_result` or `set_exception` is called by the creator of the 
Future.  So requiring knowledge of concrete class is not a big problem.
On the other hand, awaiting future object without knowing concrete class is 
common.  But Task is awaitable.  So there are no problem here.

--
nosy: +inada.naoki

___
Python tracker 

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



[issue15663] Investigate providing Tcl/Tk 8.6 with OS X installers

2018-12-11 Thread Ned Deily


Ned Deily  added the comment:


New changeset f74cabd9203cf3be97fdb3821a7fa0b74d7b2263 by Ned Deily in branch 
'3.6':
[3.6] bpo-15663: the 10.6+ macOS installers for 3.6/2.7 now provide a private 
Tcl/Tk 8.6 (GH-11109)
https://github.com/python/cpython/commit/f74cabd9203cf3be97fdb3821a7fa0b74d7b2263


--

___
Python tracker 

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



[issue35457] robotparser reads empty robots.txt file as "all denied"

2018-12-11 Thread larsfuse


New submission from larsfuse :

The standard (http://www.robotstxt.org/robotstxt.html) says:

> To allow all robots complete access:
> User-agent: *
> Disallow:
> (or just create an empty "/robots.txt" file, or don't use one at all)

Here I give python an empty file:
$ curl http://10.223.68.186/robots.txt
$

Code:

rp = robotparser.RobotFileParser()
print (robotsurl)
rp.set_url(robotsurl)
rp.read()
print( "fetch /", rp.can_fetch(useragent = "*", url = "/"))
print( "fetch /admin", rp.can_fetch(useragent = "*", url = "/admin"))

Result:

$ ./test.py
http://10.223.68.186/robots.txt
('fetch /', False)
('fetch /admin', False)

And the result is, robotparser thinks the site is blocked.

--
components: Library (Lib)
messages: 331595
nosy: larsfuse
priority: normal
severity: normal
status: open
title: robotparser reads empty robots.txt file as "all denied"
type: behavior
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



[issue15663] Investigate providing Tcl/Tk 8.6 with OS X installers

2018-12-11 Thread Ned Deily


Ned Deily  added the comment:


New changeset d0d09b511d7a438fb18a9a4703480763119b4eac by Ned Deily in branch 
'2.7':
[2.7] bpo-15663: the 10.6+ macOS installers for 3.6/2.7 now provide a private 
Tcl/Tk 8.6 (GH-0)
https://github.com/python/cpython/commit/d0d09b511d7a438fb18a9a4703480763119b4eac


--

___
Python tracker 

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



[issue15663] Investigate providing Tcl/Tk 8.6 with OS X installers

2018-12-11 Thread Ned Deily


Ned Deily  added the comment:

Update: as of 3.6.8rc1 and the eventual 2.7.16rc1, both installer variants 
(10.9+ and 10.6+) provide a built-in Tcl/Tk 8.6.8. For python.org installers, 
Tcl/Tk 8.5.x is finally dead!

--

___
Python tracker 

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



[issue35444] Unify and optimize the helper for getting a builtin object

2018-12-11 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset be6ec444729f727f304ae10f3a7e2feda3cc3aaa by Serhiy Storchaka 
(Miss Islington (bot)) in branch '3.6':
bpo-35444: Fix error handling when fail to look up builtin "getattr". 
(GH-11047) (GH-11107) (GH-11108)
https://github.com/python/cpython/commit/be6ec444729f727f304ae10f3a7e2feda3cc3aaa


--

___
Python tracker 

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



[issue35444] Unify and optimize the helper for getting a builtin object

2018-12-11 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


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



[issue35454] Fix miscellaneous issues in error handling

2018-12-11 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

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



[issue33747] Failed separate test_patch_propogrates_exc_on_exit in test_unittest

2018-12-11 Thread miss-islington


miss-islington  added the comment:


New changeset 45a31a1ec11e75cd0ef487dd4cea7f9fc4f885c8 by Miss Islington (bot) 
in branch '3.7':
[3.7] bpo-33747: Avoid mutating the global sys.modules dict in unittest.mock 
tests (GH-8520) (GH-11031)
https://github.com/python/cpython/commit/45a31a1ec11e75cd0ef487dd4cea7f9fc4f885c8


--
nosy: +miss-islington

___
Python tracker 

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



[issue33747] Failed separate test_patch_propogrates_exc_on_exit in test_unittest

2018-12-11 Thread miss-islington


miss-islington  added the comment:


New changeset 7d9f21950927e7c7fe69e5edeb06023a963c6f68 by Miss Islington (bot) 
in branch '3.6':
[3.6] bpo-33747: Avoid mutating the global sys.modules dict in unittest.mock 
tests (GH-8520) (GH-11032)
https://github.com/python/cpython/commit/7d9f21950927e7c7fe69e5edeb06023a963c6f68


--

___
Python tracker 

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



[issue33747] Failed separate test_patch_propogrates_exc_on_exit in test_unittest

2018-12-11 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

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



[issue35455] Solaris thread_time doesn't work with current implementation

2018-12-11 Thread Jakub Kulik


Change by Jakub Kulik :


--
type:  -> crash

___
Python tracker 

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



[issue35458] test_shutil.test_disk_usage() randomly fails when tests are run in parallel

2018-12-11 Thread STINNER Victor


New submission from STINNER Victor :

Extract of the test:

usage = shutil.disk_usage(os.path.dirname(__file__))
self.assertEqual(usage, shutil.disk_usage(__file__))

The test fails if another process creates or removes data on the disk 
partition. IMHO "self.assertEqual(usage, shutil.disk_usage(__file__))" must be 
removed, it cannot be reliable without mocking os.statvfs() / 
nt._getdiskusage().

Even if tests are run sequentially, the test can fail if a program creates a 
file between the two lines of code, the test cannot be reliable.

https://buildbot.python.org/all/#/builders/85/builds/1882

FAIL: test_disk_usage (test.test_shutil.TestShutil)
--
Traceback (most recent call last):
  File 
"/home/shager/cpython-buildarea/3.x.edelsohn-fedora-ppc64le/build/Lib/test/test_shutil.py",
 line 1366, in test_disk_usage
self.assertEqual(usage, shutil.disk_usage(__file__))
AssertionError: usage(total=1925696024576, used=1793793806336, 
free=131902218240) != usage(total=1925696024576, used=1793793818624, 
free=131902205952)

--
components: Tests
messages: 331601
nosy: pablogsal, vstinner
priority: normal
severity: normal
status: open
title: test_shutil.test_disk_usage() randomly fails when tests are run in 
parallel
versions: Python 3.8

___
Python tracker 

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



[issue35458] test_shutil.test_disk_usage() randomly fails when tests are run in parallel

2018-12-11 Thread STINNER Victor


Change by STINNER Victor :


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

___
Python tracker 

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



[issue35458] test_shutil.test_disk_usage() randomly fails when tests are run in parallel

2018-12-11 Thread STINNER Victor


STINNER Victor  added the comment:

The new test has been added by PR 9372:

commit c8c0249c9e8f61ab7670119a5a5278354df27bbb
Author: Joe Pamer 
Date:   Tue Sep 25 10:57:36 2018 -0400

bpo-32557: allow shutil.disk_usage to take a file path on Windows also 
(GH-9372)

--

___
Python tracker 

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



[issue32557] allow shutil.disk_usage to take a file path on Windows also

2018-12-11 Thread STINNER Victor


STINNER Victor  added the comment:

The new test is unstable: see bpo-35458.

--
nosy: +vstinner

___
Python tracker 

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



[issue35459] Use PyDict_GetItemWithError() with PyDict_GetItem()

2018-12-11 Thread Serhiy Storchaka


New submission from Serhiy Storchaka :

There is an issue with using PyDict_GetItem(). Since it silences all 
exceptions, it can return incorrect result when an exception like MemoryError 
or KeyboardInterrupt was raised in the user __hash__() and __eq__(). In 
addition PyDict_GetItemString() and _PyDict_GetItemId() swallow a MemoryError 
raised when fail to allocate a temporary string object.

In addition, PyDict_GetItemWithError() is a tiny bit faster than 
PyDict_GetItem(), because it avoids checking the exception state in successful 
case.

The proposed PR replaces most calls of PyDict_GetItem(), PyDict_GetItemString() 
and _PyDict_GetItemId() with calls of PyDict_GetItemWithError(), 
_PyDict_GetItemStringWithError() and _PyDict_GetItemIdWithError().

--
components: Extension Modules, Interpreter Core
messages: 331604
nosy: serhiy.storchaka, vstinner
priority: normal
severity: normal
status: open
title: Use PyDict_GetItemWithError() with PyDict_GetItem()
versions: Python 3.8

___
Python tracker 

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



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

2018-12-11 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
title: Use PyDict_GetItemWithError() with PyDict_GetItem() -> Use 
PyDict_GetItemWithError() instead of PyDict_GetItem()

___
Python tracker 

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



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

2018-12-11 Thread STINNER Victor


STINNER Victor  added the comment:

My previous attempt: bpo-20615.

--

___
Python tracker 

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



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

2018-12-11 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


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

___
Python tracker 

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



[issue35458] test_shutil.test_disk_usage() randomly fails when tests are run in parallel

2018-12-11 Thread STINNER Victor


STINNER Victor  added the comment:

Only the master branch is impacted (see bpo-32557).

--

___
Python tracker 

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



[issue35460] Add PyDict_GetItemStringWithError

2018-12-11 Thread Ronald Oussoren


New submission from Ronald Oussoren :

PyDict_GetItemWithError is a variant of PyDict_GetItem that doesn't swallow 
unrelated exceptions.  While converting a project to use this API I noticed 
that there is similar variant of PyDict_GetItemString.

It would be nice to have PyDict_GetItemStringWithError as a public API to make 
it easier to convert existing code to the better API.

--
components: Interpreter Core
messages: 331607
nosy: ronaldoussoren
priority: normal
severity: normal
status: open
title: Add PyDict_GetItemStringWithError
type: enhancement
versions: Python 3.8

___
Python tracker 

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



[issue35458] test_shutil.test_disk_usage() randomly fails when tests are run in parallel

2018-12-11 Thread STINNER Victor


Change by STINNER Victor :


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



[issue35458] test_shutil.test_disk_usage() randomly fails when tests are run in parallel

2018-12-11 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset dc525f4315cdbe84693396d3f7a65a00425743bb by Victor Stinner in 
branch 'master':
bpo-35458: Fix test_shutil.test_disk_usage() (GH-1)
https://github.com/python/cpython/commit/dc525f4315cdbe84693396d3f7a65a00425743bb


--

___
Python tracker 

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



[issue33725] Python crashes on macOS after fork with no exec

2018-12-11 Thread STINNER Victor


STINNER Victor  added the comment:

Would it be safe to run the multiprocessing tests on recent macOS with the 
OBJC_DISABLE_INITIALIZE_FORK_SAFETY environment variable set?

--
nosy: +vstinner

___
Python tracker 

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



[issue35433] Correctly detect installed SDK versions

2018-12-11 Thread STINNER Victor


STINNER Victor  added the comment:

The 3.6 change broke the compilation 2 Windows buildbots: Jemery Kloth is 
investigating the regression:
https://github.com/python/cpython/pull/11009#issuecomment-445985774

--

___
Python tracker 

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



[issue35412] test_future4 ran no test

2018-12-11 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset a932d0b496767b5aac14191cbc17093e502b6cb4 by Pablo Galindo in 
branch 'master':
bpo-35412: Skip test_multiprocessing_fork and test_multiprocessing_forkserver 
on Windows (GH-11086)
https://github.com/python/cpython/commit/a932d0b496767b5aac14191cbc17093e502b6cb4


--

___
Python tracker 

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



[issue35426] test_signal.test_interprocess_signal() race condition

2018-12-11 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset 2ab2afd387084ba38a37f5944fcb0675113b64dc by Pablo Galindo in 
branch 'master':
bpo-35426: Eliminate race condition in test_interprocess_signal (GH-11087)
https://github.com/python/cpython/commit/2ab2afd387084ba38a37f5944fcb0675113b64dc


--
nosy: +pablogsal

___
Python tracker 

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



[issue35426] test_signal.test_interprocess_signal() race condition

2018-12-11 Thread miss-islington


Change by miss-islington :


--
pull_requests: +10342

___
Python tracker 

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



[issue35426] test_signal.test_interprocess_signal() race condition

2018-12-11 Thread miss-islington


Change by miss-islington :


--
pull_requests: +10343

___
Python tracker 

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



[issue35412] test_future4 ran no test

2018-12-11 Thread miss-islington


Change by miss-islington :


--
pull_requests: +10344

___
Python tracker 

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



[issue35412] test_future4 ran no test

2018-12-11 Thread miss-islington


Change by miss-islington :


--
pull_requests: +10345

___
Python tracker 

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



[issue35426] test_signal.test_interprocess_signal() race condition

2018-12-11 Thread miss-islington


miss-islington  added the comment:


New changeset f7404a5a08b70ec171279a277c1817e82430fa83 by Miss Islington (bot) 
in branch '3.7':
bpo-35426: Eliminate race condition in test_interprocess_signal (GH-11087)
https://github.com/python/cpython/commit/f7404a5a08b70ec171279a277c1817e82430fa83


--
nosy: +miss-islington

___
Python tracker 

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



[issue35426] test_signal.test_interprocess_signal() race condition

2018-12-11 Thread miss-islington


miss-islington  added the comment:


New changeset 869e23e0af806ed3a10d0484827cb1b5f5cd5e5f by Miss Islington (bot) 
in branch '3.6':
bpo-35426: Eliminate race condition in test_interprocess_signal (GH-11087)
https://github.com/python/cpython/commit/869e23e0af806ed3a10d0484827cb1b5f5cd5e5f


--

___
Python tracker 

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



[issue35444] Unify and optimize the helper for getting a builtin object

2018-12-11 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
pull_requests: +10346
stage: resolved -> patch review

___
Python tracker 

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



[issue35444] Unify and optimize the helper for getting a builtin object

2018-12-11 Thread STINNER Victor


STINNER Victor  added the comment:

I reopen the issuue. Commit bb86bf4c4eaa30b1f5192dab9f389ce0bb61114d introduced 
a new compiler warning:

gcc -pthread -c -Wno-unused-result -Wsign-compare -g -Og -Wall -O0   -std=c99 
-Wextra -Wno-unused-result -Wno-unused-parameter 
-Wno-missing-field-initializers -Werror=implicit-function-declaration  
-I./Include/internal  -I. -I./Include-DPy_BUILD_CORE -o Objects/object.o 
Objects/object.c

In file included from ./Include/object.h:715,
 from ./Include/pytime.h:6,
 from ./Include/Python.h:75,
 from Objects/object.c:4:
./Include/cpython/object.h:37:51: warning: 'PyId_builtins' defined but not used 
[-Wunused-variable]
 #define _Py_IDENTIFIER(varname) _Py_static_string(PyId_##varname, #varname)
   ^
./Include/cpython/object.h:36:66: note: in definition of macro 
'_Py_static_string'
 #define _Py_static_string(varname, value)  static _Py_Identifier varname = 
_Py_static_string_init(value)
  ^~~
Objects/object.c:20:1: note: in expansion of macro '_Py_IDENTIFIER'
 _Py_IDENTIFIER(builtins);
 ^~

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



[issue35412] test_future4 ran no test

2018-12-11 Thread miss-islington


miss-islington  added the comment:


New changeset d55a896cd63e72e2848c48226d031d612539ea2a by Miss Islington (bot) 
in branch '3.7':
bpo-35412: Skip test_multiprocessing_fork and test_multiprocessing_forkserver 
on Windows (GH-11086)
https://github.com/python/cpython/commit/d55a896cd63e72e2848c48226d031d612539ea2a


--
nosy: +miss-islington

___
Python tracker 

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



[issue35412] test_future4 ran no test

2018-12-11 Thread miss-islington


miss-islington  added the comment:


New changeset 97568761a6adb64d750fb0ea68484f67ae5e54f7 by Miss Islington (bot) 
in branch '3.6':
bpo-35412: Skip test_multiprocessing_fork and test_multiprocessing_forkserver 
on Windows (GH-11086)
https://github.com/python/cpython/commit/97568761a6adb64d750fb0ea68484f67ae5e54f7


--

___
Python tracker 

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



[issue35455] Solaris thread_time doesn't work with current implementation

2018-12-11 Thread Jakub Kulik


Change by Jakub Kulik :


--
pull_requests: +10347
stage:  -> patch review

___
Python tracker 

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



[issue35426] test_signal.test_interprocess_signal() race condition

2018-12-11 Thread STINNER Victor


STINNER Victor  added the comment:

Thanks Pablo Galindo for the quick fix!

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



[issue35444] Unify and optimize the helper for getting a builtin object

2018-12-11 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset 7211d306d4c2f73732540759e20dd17bd18b3361 by Serhiy Storchaka in 
branch 'master':
Remove an unused variable after bpo-35444. (GH-7)
https://github.com/python/cpython/commit/7211d306d4c2f73732540759e20dd17bd18b3361


--

___
Python tracker 

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



[issue35444] Unify and optimize the helper for getting a builtin object

2018-12-11 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

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



[issue35461] Document C API functions which swallow exceptions

2018-12-11 Thread Serhiy Storchaka


New submission from Serhiy Storchaka :

C API functions like PyDict_GetItem() and PyObject_HasAttr() suppresses all 
errors that may occur, including MemoryError and KeyboardInterrupt. They can 
return incorrect result when the memory is exhausted or the user presses 
Ctrl-C. The proposed PR documents such functions and suggests the C API which 
do not swallow unrelated exceptions.

Previous attempt to document this (for PyDict_GetItem() only) was in issue20615.

--
assignee: docs@python
components: Documentation
messages: 331620
nosy: docs@python, rhettinger, ronaldoussoren, serhiy.storchaka, vstinner
priority: normal
severity: normal
status: open
title: Document C API functions which swallow exceptions
type: enhancement
versions: Python 2.7, Python 3.6, Python 3.7, Python 3.8

___
Python tracker 

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



[issue35461] Document C API functions which swallow exceptions

2018-12-11 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


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

___
Python tracker 

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



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

2018-12-11 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

Opened issue35461 for documenting flaws of PyDict_GetItem().

--

___
Python tracker 

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



[issue15095] test_imaplib problem - intermittent skips and LOGINDISABLED not reported

2018-12-11 Thread STINNER Victor


STINNER Victor  added the comment:

I didn't see this error recently so I close this old issue.

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



[issue35460] Add PyDict_GetItemStringWithError

2018-12-11 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

PyDict_GetItemString() is an old API from times when dicts could contain only 
string keys. It is not necessary part of the C API and can be replaced with 
PyDict_GetItem() in new code. It was kept only as a convenient function.

In issue35459 many uses of PyDict_GetItemString() were replaced with 
PyDict_GetItemWithError() and private _PyDict_GetItemIdWithError(). Only 4 
occurrences were replaced with newly added private 
_PyDict_GetItemStringWithError(). And they could use PyDict_GetItem(). So there 
are not much use cases for PyDict_GetItemStringWithError().

Before adding PyDict_GetItemStringWithError() we could consider alternatives.

*WithError() functions require calling PyErr_Occurred() to distinguish the 
error case from the "not found" case. This adds an overhead which can be not 
small in performance critical code. It would be better if the API function 
returned a three-state value: "found", "not found" and "error". See for example 
_PyObject_LookupAttr(). I am not sure this is the best design.

--
dependencies: +Document C API functions which swallow exceptions
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue20118] test_imaplib test_linetoolong fails on 2.7 in SSL test on some buildbots

2018-12-11 Thread STINNER Victor


STINNER Victor  added the comment:

4 years later the test is still skipped. That's a good example of "temporary 
fix" :-)

David: Should we just close the issue, or is there anyone around interested to 
work on a fix? Sadly, the issue doesn't provide the error message and I'm not 
sure how to reproduce the bug.

Maybe the bug has been fixed in the meanwhile? Example of SocketServer fix:

commit ba8474b77dd86d8dde40eaa7a4a6715a476d6242
Author: Martin Panter 
Date:   Thu Feb 18 10:43:55 2016 +

Issue #26309: Shut down SocketServer request if verify_request() is false

Based on patch by Aviv Palivoda.

--

On Fedora 29, I tried to reproduce the bug by running many tests in parallel:

(*) Run test_linetoolong in a loop, 4 processes:

./python -m test -u all -F -m 
test.test_imaplib.ThreadedNetworkedTests.test_linetoolong test_imaplib 

(*) Run test_imaplib in a loop, 4 processes:

./python -m test -u all -v -F test_imaplib

(*) Stress the system (run the Python test suite in a loop), 2 processes:

./python -m test -r -u all,-gui -j0 -F

(*) Stress the CPU using my script (to ensure that the system load is at least 
10)

system_load.py 10

7 minutes later, test_linetoolong has been run 11629 times x 4 processes and 
it's still pass.

--
nosy: +pablogsal, vstinner

___
Python tracker 

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



[issue20118] test_imaplib test_linetoolong fails on 2.7 in SSL test on some buildbots

2018-12-11 Thread STINNER Victor


Change by STINNER Victor :


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

___
Python tracker 

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



[issue20118] test_imaplib test_linetoolong fails on 2.7 in SSL test on some buildbots

2018-12-11 Thread STINNER Victor


STINNER Victor  added the comment:

I wrote PR 11120 to reenable the skipped test. If the test will start again, I 
will try to fix it. If I cannot fix the test, I will skip again the test but 
close this issue.

--

___
Python tracker 

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



[issue35462] test_imaplib.test_enable_UTF8_True_append() failed on AMD64 FreeBSD 10-STABLE Non-Debug 3.7

2018-12-11 Thread STINNER Victor


New submission from STINNER Victor :

AMD64 FreeBSD 10-STABLE Non-Debug 3.7:
https://buildbot.python.org/all/#/builders/170/builds/200

Note: this buildbot is *very* slow.


test_enable_UTF8_True_append (test.test_imaplib.NewIMAPTests) ...

SENT: b'* OK IMAP4rev1'
GOT: b'PJHE0 CAPABILITY'
SENT: b'* CAPABILITY IMAP4rev1 ENABLE UTF8=ACCEPT'
SENT: b'PJHE0 OK CAPABILITY completed'
ERROR

(...)
ERROR: test_enable_UTF8_True_append (test.test_imaplib.NewIMAPTests)
--
Traceback (most recent call last):
  File 
"/usr/home/buildbot/python/3.7.koobs-freebsd10.nondebug/build/Lib/test/test_imaplib.py",
 line 297, in test_enable_UTF8_True_append
code, _ = client.authenticate('MYAUTH', lambda x: b'fake')
  File 
"/usr/home/buildbot/python/3.7.koobs-freebsd10.nondebug/build/Lib/imaplib.py", 
line 428, in authenticate
typ, dat = self._simple_command('AUTHENTICATE', mech)
  File 
"/usr/home/buildbot/python/3.7.koobs-freebsd10.nondebug/build/Lib/imaplib.py", 
line 1196, in _simple_command
return self._command_complete(name, self._command(name, *args))
  File 
"/usr/home/buildbot/python/3.7.koobs-freebsd10.nondebug/build/Lib/imaplib.py", 
line 989, in _command
while self._get_response():
  File 
"/usr/home/buildbot/python/3.7.koobs-freebsd10.nondebug/build/Lib/imaplib.py", 
line 1047, in _get_response
resp = self._get_line()
  File 
"/usr/home/buildbot/python/3.7.koobs-freebsd10.nondebug/build/Lib/imaplib.py", 
line 1151, in _get_line
raise self.abort('socket error: EOF')
imaplib.IMAP4.abort: socket error: EOF


See also bpo-20118 ("test_imaplib test_linetoolong fails on 2.7 in SSL test on 
some buildbots").

--
components: Tests
messages: 331626
nosy: pablogsal, vstinner
priority: normal
severity: normal
status: open
title: test_imaplib.test_enable_UTF8_True_append() failed on AMD64 FreeBSD 
10-STABLE Non-Debug 3.7
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



[issue35462] test_imaplib.test_enable_UTF8_True_append() failed on AMD64 FreeBSD 10-STABLE Non-Debug 3.7

2018-12-11 Thread STINNER Victor


STINNER Victor  added the comment:

Note: in the same buildbot build, test_imaplib passed when re-run in verbose 
mode.

--

___
Python tracker 

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



[issue35462] test_imaplib.test_enable_UTF8_True_append() failed on AMD64 FreeBSD 10-STABLE Non-Debug 3.7

2018-12-11 Thread STINNER Victor


STINNER Victor  added the comment:

See also:

* bpo-30175, bpo-30648: removed "client x509 certificate" tests using public 
cyrus.andrew.cmu.edu server
* bpo-30231: removed tests since the public server stopped working.

--

___
Python tracker 

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



[issue34172] multiprocessing.Pool and ThreadPool leak resources after being deleted

2018-12-11 Thread STINNER Victor


STINNER Victor  added the comment:

I started a thread on python-dev to discuss these issues:
https://mail.python.org/pipermail/python-dev/2018-December/155946.html

--

___
Python tracker 

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



[issue20118] test_imaplib test_linetoolong fails on 2.7 in SSL test on some buildbots

2018-12-11 Thread STINNER Victor


STINNER Victor  added the comment:

Oh, AppVeyor failed on my PR:

test_linetoolong (test.test_imaplib.ThreadedNetworkedTestsSSL) ...
creating server
server created
ADDR = ('127.0.0.1', 0)
CLASS = test.test_imaplib.SecureTCPServer
HDLR = test.test_imaplib.TooLongHandler
server running
waiting for server
done
ERROR

(...)

ERROR: test_linetoolong (test.test_imaplib.ThreadedNetworkedTestsSSL)
--
Traceback (most recent call last):
  File "C:\projects\cpython\lib\test\test_imaplib.py", line 176, in 
test_linetoolong
self.imap_class, *server.server_address)
  File "C:\projects\cpython\lib\unittest\case.py", line 473, in assertRaises
callableObj(*args, **kwargs)
  File "C:\projects\cpython\lib\imaplib.py", line 1169, in __init__
IMAP4.__init__(self, host, port)
  File "C:\projects\cpython\lib\imaplib.py", line 203, in __init__
typ, dat = self.capability()
  File "C:\projects\cpython\lib\imaplib.py", line 377, in capability
typ, dat = self._simple_command(name)
  File "C:\projects\cpython\lib\imaplib.py", line 1091, in _simple_command
return self._command_complete(name, self._command(name, *args))
  File "C:\projects\cpython\lib\imaplib.py", line 913, in _command_complete
typ, data = self._get_tagged_response(tag)
  File "C:\projects\cpython\lib\imaplib.py", line 1020, in _get_tagged_response
self._get_response()
  File "C:\projects\cpython\lib\imaplib.py", line 932, in _get_response
resp = self._get_line()
  File "C:\projects\cpython\lib\imaplib.py", line 1030, in _get_line
line = self.readline()
  File "C:\projects\cpython\lib\imaplib.py", line 1192, in readline
return self.file.readline()
  File "C:\projects\cpython\lib\socket.py", line 451, in readline
data = self._sock.recv(self._rbufsize)
  File "C:\projects\cpython\lib\ssl.py", line 772, in recv
return self.read(buflen)
  File "C:\projects\cpython\lib\ssl.py", line 659, in read
v = self._sslobj.read(len)
error: [Errno 10053] An established connection was aborted by the software in 
your host machine

--

___
Python tracker 

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



[issue35463] mock uses incorrect signature for partial and partialmethod with autospec

2018-12-11 Thread Karthikeyan Singaravelan


New submission from Karthikeyan Singaravelan :

This is a bug report for https://bugs.python.org/issue17185#msg331149 that I 
was asked to raise as a separate issue.

1. When we call create_autospec it calls _get_signature_object that gets the 
signature for the given parameter. With functools.partial it returns a partial 
object and hence while getting the signature it returns the signature for the 
constructor of partial instead of the underlying function passed to 
functools.partial. I think a check needs to be added to make sure not to use 
func.__init__ when it's a partial object.

2. When we call create_autospect on a class that has a partialmethod the self 
parameter is not skipped in the signature and thus it creates a signature with 
self causing error. The fix would be to handle partialmethod also in _must_skip 
that determines whether to skip self or not.


Sample reproducer : 

from functools import partial, partialmethod
from unittest.mock import create_autospec
import inspect

def foo(a, b):
pass

p = partial(foo, 1)
m = create_autospec(p)
m(1, 2, 3) # passes since signature is set as (*args, **kwargs) the signature 
of functools.partial constructor. This should throw TypeError under autospec


class A:

def f(self, a, b):
print(a, b)

g = partialmethod(f, 1)

m = create_autospec(A)
m().g(1, 2) # passes since signature is set as (self, b) and self is not 
skipped in _must_skip thus self=1, b=2. This should throw TypeError under 
autospec since the valid call is m().g(2)

--
components: Library (Lib)
messages: 331631
nosy: cjw296, mariocj89, michael.foord, pablogsal, xtreak
priority: normal
severity: normal
status: open
title: mock uses incorrect signature for partial and partialmethod with autospec
type: behavior
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



[issue35464] json.dumps very unclear exception

2018-12-11 Thread Or


New submission from Or :

when dumping a value coming from numpy.random.choice([True,False]) the 
exception raised is very unclear.

json.dumps(result)

  File 
"/usr/local/Cellar/python@2/2.7.15/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/encoder.py",
 line 184, in default
raise TypeError(repr(o) + " is not JSON serializable")

which prints "True is not JSON serializable" - but it should actually print 
" is not JSON serializable".

--
components: Library (Lib)
messages: 331632
nosy: orshemy
priority: normal
severity: normal
status: open
title: json.dumps very unclear exception
type: behavior
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



[issue16039] imaplib: unlimited readline() from connection

2018-12-11 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +10351

___
Python tracker 

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



[issue35464] json.dumps very unclear exception

2018-12-11 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

This was changed in 3.6 (issue26623). Upgrade to 3.6+ for better error messages.

--
nosy: +serhiy.storchaka
resolution:  -> out of date
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



[issue35455] Solaris thread_time doesn't work with current implementation

2018-12-11 Thread Jakub Kulik


Change by Jakub Kulik :


--
versions: +Python 3.8

___
Python tracker 

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



[issue11617] Sporadic failure in test_httpservers

2018-12-11 Thread STINNER Victor


STINNER Victor  added the comment:

Hum, it seems like this bug still exists in Python 2.7. Error from Fedora CI:

test_head_via_send_error (test.test_httpservers.BaseHTTPServerTestCase) ... 
ERROR
(...)
ERROR: test_head_via_send_error (test.test_httpservers.BaseHTTPServerTestCase)
--
Traceback (most recent call last):
  File "/builddir/build/BUILD/Python-2.7.15/Lib/test/test_httpservers.py", line 
303, in test_head_via_send_error
res = self.con.getresponse()
  File "/builddir/build/BUILD/Python-2.7.15/Lib/httplib.py", line 1121, in 
getresponse
response.begin()
  File "/builddir/build/BUILD/Python-2.7.15/Lib/httplib.py", line 438, in begin
version, status, reason = self._read_status()
  File "/builddir/build/BUILD/Python-2.7.15/Lib/httplib.py", line 402, in 
_read_status
raise BadStatusLine(line)
BadStatusLine: ''

--
resolution: fixed -> 
status: closed -> open
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



[issue11617] Sporadic failure in test_httpservers

2018-12-11 Thread STINNER Victor


Change by STINNER Victor :


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

___
Python tracker 

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



[issue35433] Correctly detect installed SDK versions

2018-12-11 Thread Jeremy Kloth


Jeremy Kloth  added the comment:

All the Windows 3.6 windows buildbots are happy! Thanks to all!

--
status: open -> closed

___
Python tracker 

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



[issue11617] Sporadic failure in test_httpservers

2018-12-11 Thread STINNER Victor


Change by STINNER Victor :


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



[issue11617] Sporadic failure in test_httpservers

2018-12-11 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset d336b1c8a40d14054145393fafb54b782cc1a549 by Victor Stinner in 
branch '2.7':
bpo-11617: Try to strengthen test_httpservers (GH-11121)
https://github.com/python/cpython/commit/d336b1c8a40d14054145393fafb54b782cc1a549


--

___
Python tracker 

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



[issue35456] asyncio.Task.set_result() and set_exception() missing docstrings (and Liskov sub. principle)

2018-12-11 Thread Yury Selivanov


Yury Selivanov  added the comment:

-1 on this; there is no clear win in doing this refactoring, only a hard to 
estimate chance of making a regression.

Yahya, feel free to tackle other asyncio bugs or improvements, this one is just 
something that we aren't comfortable doing right now.

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



[issue30230] Move quick test in PyObject_IsSubClass outside of PyType_CheckExact guard

2018-12-11 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

Any progress?

--
versions: +Python 3.8 -Python 3.7

___
Python tracker 

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



[issue35214] Get the test suite passing with clang Memory Sanitizer enabled

2018-12-11 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

Is this issue completely fixed?

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue22293] unittest.mock: use slots in MagicMock to reduce memory footprint

2018-12-11 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

James, please confirm that this issue still exists in 3.6 and 3.7.

--
nosy: +serhiy.storchaka
status: open -> pending

___
Python tracker 

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



[issue35394] Add __slots__ = () to asyncio protocols

2018-12-11 Thread Andrew Svetlov


Andrew Svetlov  added the comment:


New changeset 5344501ad166c1380be452644a863a4679c4291b by Andrew Svetlov in 
branch 'master':
bpo-35394: Add empty slots to abstract asyncio protocols (#10889)
https://github.com/python/cpython/commit/5344501ad166c1380be452644a863a4679c4291b


--

___
Python tracker 

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



[issue35214] Get the test suite passing with clang Memory Sanitizer enabled

2018-12-11 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

I believe there are still some issues to deal with.  I don't want to close the 
issue until I've got my buildbot running.

--
versions:  -Python 3.6

___
Python tracker 

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



[issue35402] Upgrade macOS and Windows installers to Tcl 8.6.9 and Tk 8.6.9.1

2018-12-11 Thread Steve Dower


Steve Dower  added the comment:

I pushed the raw Tcl and Tk sources for 8.6.9.0 to cpython-source-deps, but it 
looks like we need some patches to be able to build on Windows (the X11 headers 
#define some names that the Windows headers want to use as struct members).

So far I've needed to #undef and redefine None and ControlMask around #include 
 in winmain.c and tkWin.h, but I think that will be enough.

--

___
Python tracker 

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



[issue35403] support application/wasm in mimetypes and http.server

2018-12-11 Thread pmpp


pmpp  added the comment:

Sure, but i was considering the cpython in the browser/webview/electron case 
where python modules are served as .wasm files, i'm about to do it for my port 
and pyodide already does. 
It would make sense to provide the *simplest* environnement for cpython to 
serve its own components.

scientific cpython stack in the browser:
https://github.com/iodide-project/pyodide

python repl in the browser experiment:
http://pmpp.pagesperso-orange.fr/python_em.html

Also i think cpython in the browser could be be already beyond testing and so 
far provides the best sandboxing configuration available around :
"run python in a sandbox, not the opposite" ( quoting Victor Stinner )

--

___
Python tracker 

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



[issue35465] Document add_signal_handler

2018-12-11 Thread Hrvoje Nikšić

New submission from Hrvoje Nikšić :

In https://stackoverflow.com/q/53704709/1600898 a StackOverflow user asked how 
the add_signal_handler event loop method differs from the signal.signal 
normally used by Python code.

The add_signal_handler documentation is quite brief - if we exclude the parts 
that explain the exceptions raised and how to pass keyword arguments to the 
callback, the meat is this sentence:

Set callback as the handler for the signum signal.

It is only after looking at the source, and understanding asyncio, that one 
comes to the conclusion that the idea is to run the handler along with other 
event loop callbacks and coroutines, at the time when it is actually safe to 
invoke asyncio code.

I think this deserves to be mentioned explicitly, for example:

Set callback as the handler for the signum signal.

The callback will be invoked in the thread that runs the event
loop, along with other queued callbacks and runnable coroutines.
Unlike signal handlers registered using signal.signal(), a 
callback registered with this function is allowed to interact
with the event loop.

--
assignee: docs@python
components: Documentation
messages: 331645
nosy: docs@python, hniksic
priority: normal
severity: normal
status: open
title: Document add_signal_handler
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



[issue35136] test_ssl fails in AMD64 FreeBSD CURRENT Shared 3.6 buildbot

2018-12-11 Thread Ned Deily


Ned Deily  added the comment:

FWIW, test_ssl currently passes on the other FreeBSD 3.6 buildbot: FreeBSD 
10-STABLE Non-Debug 3.6 buildbot.  Among any other differences, the SSL version 
there is older:
ssl.OPENSSL_VERSION: OpenSSL 1.0.1u-freebsd  22 Sep 2016

--
nosy: +ned.deily

___
Python tracker 

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



[issue35136] test_ssl fails in AMD64 FreeBSD CURRENT Shared 3.6 buildbot

2018-12-11 Thread Ned Deily


Ned Deily  added the comment:

On the other hand and also FWIW, test_ssl does pass on the AMD64 FreeBSD 
CURRENT Shared 3.7 buildbot (the same system?) which also has 1.1.1a:
ssl.OPENSSL_VERSION: OpenSSL 1.1.1a  20 Nov 2018

--

___
Python tracker 

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



[issue35450] venv module doesn't create a copy of python binary by default

2018-12-11 Thread Brett Cannon


Change by Brett Cannon :


--
stage:  -> needs patch
versions: +Python 3.5, Python 3.6, Python 3.8

___
Python tracker 

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



[issue35450] venv module doesn't create a copy of python binary by default

2018-12-11 Thread Brett Cannon


Brett Cannon  added the comment:

Correct, that should say something like "copy/symlink of the Python 
binary/binaries (as appropriate by the platform or arguments used at 
environment creation time)."

--
nosy: +brett.cannon

___
Python tracker 

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



[issue35450] venv module doesn't create a copy of python binary by default

2018-12-11 Thread Brett Cannon


Brett Cannon  added the comment:

Obviously if you're willing to create a PR, Marcin, that would be great!

--

___
Python tracker 

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



[issue34162] idlelib/NEWS.txt for 3.8.0 (and backports)

2018-12-11 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
stage: patch review -> needs patch
versions:  -Python 3.6

___
Python tracker 

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



[issue35379] IDLE's close fails when io.filename set to None

2018-12-11 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
components: +macOS
nosy: +ned.deily, ronaldoussoren
versions: +Python 3.8

___
Python tracker 

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



[issue22121] IDLE should start with HOME as the initial working directory

2018-12-11 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
versions:  -Python 3.6

___
Python tracker 

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



[issue35263] Add None handling for get_saved() in IDLE

2018-12-11 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
versions: +Python 3.8

___
Python tracker 

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



[issue35387] Dialogs on IDLE are accompanied by a small black window

2018-12-11 Thread Vlad Tudorache

Vlad Tudorache  added the comment:

I confirm the issue. Screenshot attached.

--
type:  -> behavior
Added file: https://bugs.python.org/file47987/Capture d’écran 2018-12-11 à 
22.07.30.png

___
Python tracker 

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



[issue28775] Option to set startup directory in IDLE

2018-12-11 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
versions: +Python 3.8 -Python 3.6

___
Python tracker 

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



[issue35213] IDLE: use 'macOS' where appropriate.

2018-12-11 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

Any more changes can be a future issue.

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

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



[issue35208] IDLE: Squeezed lines count ignores window width

2018-12-11 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
versions:  -Python 3.6

___
Python tracker 

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



[issue35387] Dialogs on IDLE are accompanied by a small black window

2018-12-11 Thread Vlad Tudorache


Vlad Tudorache  added the comment:

At the line 102 in editor.py, I see:

self.top = top = window.ListedToplevel(root, menu=self.menubar)

Looking at window.py it seems that ListedToplevel builds a new Toplevel (the 
black one?) instead of adding an existing one (the editor) at the list, I'll 
check it again, maybe I didn't see right.

The second window does not appear for me when using pure Tcl and toplevel 
widget (from Wish, for exemple) on MacOS, I don't think it's a Tk problem.

--

___
Python tracker 

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



[issue35387] Dialogs on IDLE are accompanied by a small black window

2018-12-11 Thread Vlad Tudorache


Vlad Tudorache  added the comment:

No, I'm wrong, the editor window seems created by the ListedToplevel.

--

___
Python tracker 

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



[issue35423] Signal handling machinery still relies on "pending calls".

2018-12-11 Thread Eric Snow


Eric Snow  added the comment:

Correct.  The remaining call to Py_AddPendingCall in the signal-handling code 
is fine.

This issue is only indirectly related.  I suppose you could consider it a 
follow-up to #30703.  The PR for that issue (GH-2415) switches from using 
pending calls for signal handlers to using the pending calls machinery without 
actual pending calls.

So here I want to address taking the next step: deal with pending signals 
separately from pending calls.  That separation helps simplify efforts to adapt 
the pending calls machinery for use in arbitrary threads (rather than the main 
thread).  See #33608.

--
components: +Interpreter Core
nosy: +pitrou

___
Python tracker 

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



[issue35466] Use a linked list for the ceval pending calls.

2018-12-11 Thread Eric Snow


New submission from Eric Snow :

Currently the list of pending calls (see Include/internal/pycore_ceval.h) is 
implemented as a circular buffer.  A linked list would be easier to understand 
and modify.  It also allows for removing the restriction on the number of 
pending calls.

--
assignee: eric.snow
components: Interpreter Core
messages: 331655
nosy: eric.snow
priority: normal
severity: normal
stage: needs patch
status: open
title: Use a linked list for the ceval pending calls.
type: enhancement
versions: Python 3.8

___
Python tracker 

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



[issue35446] incorrect example

2018-12-11 Thread Eric Snow


Change by Eric Snow :


--
pull_requests: +10353

___
Python tracker 

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



[issue35466] Use a linked list for the ceval pending calls.

2018-12-11 Thread Eric Snow


Change by Eric Snow :


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

___
Python tracker 

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



[issue35446] incorrect example

2018-12-11 Thread Eric Snow


Change by Eric Snow :


--
pull_requests:  -10353

___
Python tracker 

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



[issue35402] Upgrade macOS and Windows installers to Tcl 8.6.9 and Tk 8.6.9.1

2018-12-11 Thread Steve Dower


Steve Dower  added the comment:

Looks like Tix needs similar updates, since it imports the Tk headers. Perhaps 
it'll be easier to undef immediately after the X11\X.h include? Assuming the 
values aren't actually being used anywhere.

--

___
Python tracker 

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



[issue35402] Upgrade macOS and Windows installers to Tcl 8.6.9 and Tk 8.6.9.1

2018-12-11 Thread Ned Deily


Ned Deily  added the comment:

Should the problems be reported upstream?

--

___
Python tracker 

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



  1   2   >