[issue38119] resource tracker destroys shared memory segments when other processes should still have valid access

2020-11-05 Thread Vinay Sharma


Change by Vinay Sharma :


--
pull_requests: +22087
pull_request: https://github.com/python/cpython/pull/23174

___
Python tracker 

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



[issue42274] Imaplib hangs up infinitely when performing append operation

2020-11-05 Thread Vrashab Kotian


New submission from Vrashab Kotian :

Dear all,

We are facing an issue while using imaplib's append operation. We are using 
append function of imaplib to move a mail from inbox to another folder (we are 
performing this operation on Outlook 365 account). Sometimes, when our process 
(the process is running Azure linux VM) performs this operation, it gets hangs 
up at this point infinitely . When this happens there is no response being 
returned back for the email server. This issue is causing a huge problem.

Please analyse this problem and give us some solution or suggestion on the same

Thanking you in advance

--
messages: 380442
nosy: vrashab.kotian
priority: normal
severity: normal
status: open
title: Imaplib hangs up infinitely when performing append operation
type: behavior
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



[issue42179] Clarify chaining exceptions in tutorial/errors.rst

2020-11-05 Thread miss-islington


miss-islington  added the comment:


New changeset e74fb2d7666eea43ad738528a565bb56bc88c28d by Miss Islington (bot) 
in branch '3.9':
bpo-42179: Doc/tutorial: Remove mention of __cause__ (GH-23162)
https://github.com/python/cpython/commit/e74fb2d7666eea43ad738528a565bb56bc88c28d


--

___
Python tracker 

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



[issue42179] Clarify chaining exceptions in tutorial/errors.rst

2020-11-05 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 7.0 -> 8.0
pull_requests: +22086
pull_request: https://github.com/python/cpython/pull/23173

___
Python tracker 

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



[issue42179] Clarify chaining exceptions in tutorial/errors.rst

2020-11-05 Thread Inada Naoki


Inada Naoki  added the comment:


New changeset bde33e428d5b5f88ec7667598fd27d1091840537 by Inada Naoki in branch 
'master':
bpo-42179: Doc/tutorial: Remove mention of __cause__ (GH-23162)
https://github.com/python/cpython/commit/bde33e428d5b5f88ec7667598fd27d1091840537


--

___
Python tracker 

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



[issue42267] Python 3.9 broken installer

2020-11-05 Thread Steve Dower


Steve Dower  added the comment:

The store version should be available everywhere as "python.exe", "python3.exe" 
and "python3.9.exe" already, but if not then search Start for "Manage app 
execution aliases" to enable it.

The MSI should be able to repair itself if you didn't delete those registry 
keys. If you did delete them, you might be able to re-run the installer, but 
likely not. It may be irrecoverable in that case, sorry.

--

___
Python tracker 

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



[issue42179] Clarify chaining exceptions in tutorial/errors.rst

2020-11-05 Thread Zachary Ware


Change by Zachary Ware :


Removed file: https://bugs.python.org/file49575/Cellular-Z 20200909 14:25:47 
SLOT1.CSV

___
Python tracker 

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



[issue42179] Clarify chaining exceptions in tutorial/errors.rst

2020-11-05 Thread David Martinez


Change by David Martinez :


Added file: https://bugs.python.org/file49575/Cellular-Z 20200909 14:25:47 
SLOT1.CSV

___
Python tracker 

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



[issue26389] Expand traceback module API to accept just an exception as an argument

2020-11-05 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



[issue26389] Expand traceback module API to accept just an exception as an argument

2020-11-05 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset 91e93794d5dd1aa91fbe142099c2955e0c4c1660 by Zackery Spytz in 
branch 'master':
bpo-26389: Allow passing an exception object in the traceback module (GH-22610)
https://github.com/python/cpython/commit/91e93794d5dd1aa91fbe142099c2955e0c4c1660


--
nosy: +pablogsal

___
Python tracker 

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



[issue42273] Using LazyLoader leads to AttributeError

2020-11-05 Thread Kevin Keating


New submission from Kevin Keating :

Steps to reproduce:

Create the following three files (or download the attached zip file, which 
contains these files):

main.py

import foo
from foo import a
from foo import b

print(foo.b.my_function())


foo/a.py

import importlib.util
import sys

# implementation copied from 
https://github.com/python/cpython/blob/master/Doc/library/importlib.rst#implementing-lazy-imports
def lazy_import(name):
spec = importlib.util.find_spec(name)
loader = importlib.util.LazyLoader(spec.loader)
spec.loader = loader
module = importlib.util.module_from_spec(spec)
sys.modules[name] = module
loader.exec_module(module)
return module

b = lazy_import("foo.b")


foo/b.py

def my_function():
return "my_function"

and then run main.py



Expected results

my_function should be printed to the terminal


Actual results

The following traceback is printed to the terminal

Traceback (most recent call last):
  File "F:\Documents\lazy_import\main.py", line 6, in 
print(foo.b.my_function())
AttributeError: module 'foo' has no attribute 'b'

If you comment out "from foo import a" from main.py, then the traceback doesn't 
occur and my_function gets printed.  Alternatively, if you move "from foo 
import a" after "from foo import b", then the traceback doesn't occur and 
my_function gets printed.  Adding "foo.b = b" before 
"print(foo.b.my_function())" will also fix the traceback.


A colleague of mine originally ran into this bug when writing unit tests for 
lazily imported code, since mock.patch("foo.b.my_function") triggers the same 
AttributeError.  I've reproduced this on Windows using both Python 3.8.3 and 
Python 3.9.0, and my colleague was using Python 3.8.3 on Mac.

--
components: Library (Lib)
files: lazy_import.zip
messages: 380437
nosy: KevKeating
priority: normal
severity: normal
status: open
title: Using LazyLoader leads to AttributeError
versions: Python 3.8, Python 3.9
Added file: https://bugs.python.org/file49574/lazy_import.zip

___
Python tracker 

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



[issue42179] Clarify chaining exceptions in tutorial/errors.rst

2020-11-05 Thread Carol Willing


Carol Willing  added the comment:

Thanks Vladimir for raising the issue, and Inada-san and Eric for following up 
on it.

I recommend the following:
- merge PR-23162 including its reference to builtin exceptions
- after merge of PR-23162, reworking PR-23160 to provide a brief note about 
__cause__ and __contex__ before the reference link to builtin exceptions

This would provide a clear tutorial example for the majority of users. For the 
fraction of users, like Vladimir, a sentence as part of the reference link 
could address a bit more about __cause__ and __context__ without confusing 
folks.

--
nosy: +willingc

___
Python tracker 

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



[issue42179] Clarify chaining exceptions in tutorial/errors.rst

2020-11-05 Thread Vladimir Ryabtsev


Vladimir Ryabtsev  added the comment:

Also, the choice of the exception type in the example looks not very apt: you 
raise "IOError" but the traceback message says "OSError" (which is due to 
strange design decision "IOError = OSError"). For the tutorial, I would choose 
an exception that does not disguise as another exception.

--

___
Python tracker 

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



[issue42179] Clarify chaining exceptions in tutorial/errors.rst

2020-11-05 Thread Vladimir Ryabtsev


Vladimir Ryabtsev  added the comment:

We have automatic chaining, so you don't need to use "from X" unless you want 
to have some control on the traceback message. Even without knowing of this 
syntax (and without using "from exc"), a user will get a traceback message 
similar to what is shown in the example. What is the purpose of the entire 
section then?

As I see it, the purpose might be providing some details about how exactly 
chaining works, so a user: a) could make an informed decision whether they need 
"from X" or not, b) would know how to retrieve the linked exception 
programmatically.

I generally feel that we don't want to deprive a user from special attributes, 
in Python they are everywhere, you cannot even construct a class instance 
without __init__().

--

___
Python tracker 

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



[issue42142] FAIL tkinter ttk LabeledScale test_resize, and more

2020-11-05 Thread E. Paine


E. Paine  added the comment:

I have been looking for a more permanent solution to that proposed in PR-23156. 
The most obvious solution is probably what I suggested in msg380371 as I don't 
believe the calls to `wait_visibility` are required (though, I don't really 
know enough to say for certain so am wary of making the tests unstable in a 
different way).

Another initial idea I had would be to mess around with threads and interrupt 
the main thread (which would be caught and ignored) if `wait_visibility` took 
too long.

It would be better, though, if we could actively predict a `wait_visibility` 
failure. I looked again at the Tcler's wiki 
(https://wiki.tcl-lang.org/page/tkwait+visibility) and noticed the hidden 
discussion titled "Windows bug or whatever - looking for help". In that 
discussion is a description of exactly the issue we are facing:
"Under strange totally unrelated circumstances [...] tkwait waits forever."

There, the OP includes a version which only calls `wait_visibility` if 
`winfo_ismapped` is 1, saying:
"The "winfo ismapped" is only 0 if the tkwait will stall"

In some initial testing (see attached demo script - uncomment the update call 
for `wait_visibility` to stall) I found the opposite to be true 
(`wait_visibility` fails when the widget *is already* mapped - I think this is 
because `wait_visibility` is waiting for VisibilityNotify but this was already 
issued when the widget was being mapped). Another proposed solution on the wiki 
is to avoid `wait_visibility` completely and instead use a combination of 
various calls including `tkraise` & `focus_force` (ideas/opinions?)

Note: I included both `winfo_ismapped` and `winfo_viewable` in the test script 
to try and find a case where the value of one is not the same as the other but 
I believe `winfo_ismapped` is the one we would want to use.

--
Added file: https://bugs.python.org/file49573/ismapped.py

___
Python tracker 

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



[issue42179] Clarify chaining exceptions in tutorial/errors.rst

2020-11-05 Thread Éric Araujo

Éric Araujo  added the comment:

I prefer the patch by Inada-san!

>> Describing the default behavior and "from None" is enough for new users
> Strange that you think that "from None" is more useful for beginners than 
> these special attributes.

Doesn’t feel strange to me:  `raise Exc from exc` or `from None` shows how to 
use the mecanism, whereas the special attributes are about the implementation.  
A tutorial can show how to use language features like for loops or with 
statements, but shouldn’t explain how to implement the protocols, that’s too 
much detail if you’re just starting to learn programming.

--
nosy: +eric.araujo, maxking, rhettinger

___
Python tracker 

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



[issue42272] Warning filter message/module documentation is misleading

2020-11-05 Thread Kevin Locke


Change by Kevin Locke :


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

___
Python tracker 

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



[issue42267] Python 3.9 broken installer

2020-11-05 Thread JackSkellington


JackSkellington  added the comment:

Also. How do I set the path for the Microsoft Store version of Python 3.9?

--

___
Python tracker 

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



[issue42267] Python 3.9 broken installer

2020-11-05 Thread JackSkellington


JackSkellington  added the comment:

Thank you so much for these alternatives. The only working one is the Microsoft 
Store one so far, but I'd like to know if the .msi package one is fixable.

--

___
Python tracker 

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



[issue42272] Warning filter message/module documentation is misleading

2020-11-05 Thread Kevin Locke


New submission from Kevin Locke :

"The Warnings Filter" section of the documentation for the warnings module 
describes the message and module filters as "a string containing a regular 
expression".  While that is true when they are arguments to the filterwarnings 
function, it is not true when they appear in -W or $PYTHONWARNINGS where they 
are matched literally (after stripping any starting/ending whitespace).

Additionally, in the "Describing Warning Filters" section, the example 
"error:::mymodule[.*]" does not behave as described.  If it were used as an 
argument to filterwarnings, where it would be treated as a regular expression, 
it would match the (invalid) module names mymodule. or mymodule* while it would 
match mymodule[.*] literally if passed via -W or $PYTHONWARNINGS.

--
assignee: docs@python
components: Documentation
messages: 380429
nosy: docs@python, kevinoid
priority: normal
severity: normal
status: open
title: Warning filter message/module documentation is misleading
type: enhancement
versions: Python 3.10

___
Python tracker 

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



[issue42271] Remove the error and the zipfile.ZipFile.BadZipfile aliases

2020-11-05 Thread Boštjan Mejak

New submission from Boštjan Mejak :

Remove the long-forgotten aliases 'error' and 'BadZipfile' in 'zipfile.ZipFile' 
class which are just pre-3.2 compatibility names. Python 3.10 should finally 
remove these aliases.

--
components: Library (Lib)
messages: 380428
nosy: PedanticHacker
priority: normal
pull_requests: 22083
severity: normal
status: open
title: Remove the error and the zipfile.ZipFile.BadZipfile aliases
type: enhancement
versions: Python 3.10

___
Python tracker 

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



[issue42267] Python 3.9 broken installer

2020-11-05 Thread Steve Dower


Steve Dower  added the comment:

As an alternative, you could install Python through the Microsoft Store. This 
version comes with a "Reset" button (also through Apps & Features) that will 
remove any packages you've installed into it and bring it back to a clean state 
very quickly.

The main difference between the two versions is it's much harder to mess with 
the install directory of the version from the Store.

--

___
Python tracker 

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



[issue42267] Python 3.9 broken installer

2020-11-05 Thread Steve Dower


Steve Dower  added the comment:

You need to use the installer to remove Python, as you have likely not cleaned 
up all of the registration. I suggest searching in Start for "Apps & Features" 
and finding Python in the list, and either choosing to Modify and then Repair 
it, or Uninstall it and then reinstall.

To remove other packages, you would probably be best to Uninstall, then delete 
the installation directory (%LocalAppData%\Programs\Python\Python39) before you 
reinstall. Alternatively, unless the package is doing something *very* wrong, 
you should be able to just remove it from Python39\Lib\site-packages.

--

___
Python tracker 

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



[issue1635741] Py_Finalize() doesn't clear all Python objects at exit

2020-11-05 Thread Erlend Egeberg Aasland


Change by Erlend Egeberg Aasland :


--
pull_requests: +22082
pull_request: https://github.com/python/cpython/pull/23170

___
Python tracker 

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



[issue42260] [C API] Add PyInterpreterState_SetConfig(): reconfigure an interpreter

2020-11-05 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +22081
pull_request: https://github.com/python/cpython/pull/23169

___
Python tracker 

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



[issue42179] Clarify chaining exceptions in tutorial/errors.rst

2020-11-05 Thread Vladimir Ryabtsev

Vladimir Ryabtsev  added the comment:

> I can not find confusion caused by this tutorial section

Inada, have you read the very first message in this ticket? It explains why 
this wording may cause confusion (and it did in me), and describes the problem 
part. A link for your convenience: 
https://docs.python.org/3/tutorial/errors.html#exception-chaining

> Describing the default behavior and "from None" is enough for new users

Strange that you think that "from None" is more useful for beginners than these 
special attributes.

Without understanding of __cause__ and __context__, stack traceback message 
looks like magic. Say you want to handle an exception and retrieve its cause 
(context) in runtime (this is what exception chaining for) – this section makes 
no clues about how to do that.

--

___
Python tracker 

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



[issue40522] [subinterpreters] Get the current Python interpreter state from Thread Local Storage (autoTSSkey)

2020-11-05 Thread Sebastian Berg


Change by Sebastian Berg :


--
nosy: +seberg

___
Python tracker 

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



[issue42260] [C API] Add PyInterpreterState_SetConfig(): reconfigure an interpreter

2020-11-05 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset dc42af8fd16b10127ce1fc93c13bc1bfd2674aa2 by Victor Stinner in 
branch 'master':
bpo-42260: PyConfig_Read() only parses argv once (GH-23168)
https://github.com/python/cpython/commit/dc42af8fd16b10127ce1fc93c13bc1bfd2674aa2


--

___
Python tracker 

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



[issue42260] [C API] Add PyInterpreterState_SetConfig(): reconfigure an interpreter

2020-11-05 Thread hai shi


Change by hai shi :


--
nosy: +shihai1991

___
Python tracker 

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



[issue42270] libregrtest BrokenPipeError on OpenEmbedded builds

2020-11-05 Thread Trevor


New submission from Trevor :

In OpenEmbedded we have a test wrapper for tests such as those in Python, and 
currently we are experiencing the following error when running them:

sed: couldn't flush stdout: Resource temporarily unavailable

  [37/1846]
test test_strftime crashed -- Traceback (most recent call last):
  File "/usr/lib/python3.9/test/libregrtest/runtest.py", line 270, in 
_runtest_inner
refleak = _runtest_inner2(ns, test_name)
 
  File "/usr/lib/python3.9/test/libregrtest/runtest.py", line 234, in 
_runtest_inner2
test_runner()  
  File "/usr/lib/python3.9/test/libregrtest/runtest.py", line 209, in 
_test_module
support.run_unittest(tests)   
  File "/usr/lib/python3.9/test/support/__init__.py", line 1918, in run_unittest
_run_suite(suite) 
  File "/usr/lib/python3.9/test/support/__init__.py", line 1796, in _run_suite
result = runner.run(suite)
  File "/usr/lib/python3.9/unittest/runner.py", line 176, in run
test(result)
  File "/usr/lib/python3.9/unittest/suite.py", line 84, in __call__
return self.run(*args, **kwds)
  File "/usr/lib/python3.9/unittest/suite.py", line 122, in run
test(result)
  File "/usr/lib/python3.9/unittest/suite.py", line 84, in __call__
return self.run(*args, **kwds)
  File "/usr/lib/python3.9/unittest/suite.py", line 122, in run
test(result)
  File "/usr/lib/python3.9/unittest/suite.py", line 84, in __call__
return self.run(*args, **kwds)
  File "/usr/lib/python3.9/unittest/suite.py", line 122, in run
test(result)
  File "/usr/lib/python3.9/unittest/case.py", line 653, in __call__
return self.run(*args, **kwds)
  File "/usr/lib/python3.9/unittest/case.py", line 566, in run
result.startTest(self)
  File "/usr/lib/python3.9/test/support/testresult.py", line 49, in startTest
self.stream.flush()
BrokenPipeError: [Errno 32] Broken pipe

Traceback (most recent call last):
  File "/usr/lib/python3.9/runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
  File "/usr/lib/python3.9/runpy.py", line 87, in _run_code
exec(code, run_globals)
  File "/usr/lib/python3.9/test/__main__.py", line 2, in 
main()
  File "/usr/lib/python3.9/test/libregrtest/main.py", line 716, in main
Regrtest().main(tests=tests, **kwargs)
  File "/usr/lib/python3.9/test/libregrtest/main.py", line 638, in main
self._main(tests, kwargs)
  File "/usr/lib/python3.9/test/libregrtest/main.py", line 691, in _main
self.run_tests()
  File "/usr/lib/python3.9/test/libregrtest/main.py", line 518, in run_tests
self.run_tests_sequential()
  File "/usr/lib/python3.9/test/libregrtest/main.py", line 409, in 
run_tests_sequential
self.display_progress(test_index, text)
  File "/usr/lib/python3.9/test/libregrtest/main.py", line 169, in 
display_progress
self.log(f"[{line}] {text}")
  File "/usr/lib/python3.9/test/libregrtest/main.py", line 158, in log
print(line, flush=True)
BrokenPipeError: [Errno 32] Broken pipe
Warning -- Unraisable exception
Exception ignored in: <_io.TextIOWrapper name=1 mode='w' encoding='utf-8'>
BrokenPipeError: [Errno 32] Broken pipe

---

I'm looking into it already, but need to document it.

--
components: Tests
messages: 380423
nosy: threexc
priority: normal
severity: normal
status: open
title: libregrtest BrokenPipeError on OpenEmbedded builds
type: crash
versions: Python 3.9

___
Python tracker 

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



[issue41877] Check against misspellings of assert etc. in mock

2020-11-05 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

Thanks for the patch!  I'm leaving this open as dealing with the other aspect:

* Wrong attribute names around asserts: autospect/auto_spec -> autospec, 
set_spec -> spec_set

is still a possibility.  (given you also found a number of those in our 
codebase leading to hidden testing bugs)


Vedran: We're not claiming these are fixes for the fundamental problem.  But 
they are useful practical bandaids on the existing APIs that a hundred of 
millions of lines of existing unittest code around the world make use of to 
prevent common unintended consequences of our existing API's now well know 
flaws.  issue24651 looks like the better place to take up future design ideas.

--

___
Python tracker 

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



[issue42260] [C API] Add PyInterpreterState_SetConfig(): reconfigure an interpreter

2020-11-05 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +22080
pull_request: https://github.com/python/cpython/pull/23168

___
Python tracker 

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



[issue42260] [C API] Add PyInterpreterState_SetConfig(): reconfigure an interpreter

2020-11-05 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset f3cb81431574453aac3b6dcadb3120331e6a8f1c by Victor Stinner in 
branch 'master':
bpo-42260: Add _PyConfig_FromDict() (GH-23167)
https://github.com/python/cpython/commit/f3cb81431574453aac3b6dcadb3120331e6a8f1c


--

___
Python tracker 

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



[issue38323] asyncio: MultiLoopWatcher has a race condition (test_asyncio: test_close_kill_running() hangs on AMD64 RHEL7 Refleaks 3.x)

2020-11-05 Thread Jakub Stasiak


Jakub Stasiak  added the comment:

FYI your PR 20142 together with my PR 
https://github.com/python/cpython/pull/23154 allow me to run the whole 
test_asyncio test suite on OpenIndiana 5.11:

$ ./python -m unittest -v test.test_asyncio
(...)
Ran 2298 tests in 71.668s

OK (skipped=52)


without your PR at least one of the tests is hanging forever. So, this PR 
improves Solaris/SunOS/illumos/OpenIndiana side of things as well.

--

___
Python tracker 

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



[issue41877] Check against misspellings of assert etc. in mock

2020-11-05 Thread Gregory P. Smith


Gregory P. Smith  added the comment:


New changeset 4662fa9bfe4a849fe87bfb321d8ef0956c89a772 by vabr-g in branch 
'master':
bpo-41877 Check for asert, aseert, assrt in mocks (GH-23165)
https://github.com/python/cpython/commit/4662fa9bfe4a849fe87bfb321d8ef0956c89a772


--

___
Python tracker 

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



[issue24651] Mock.assert* API is in user namespace

2020-11-05 Thread Gregory P. Smith


Change by Gregory P. Smith :


--
versions: +Python 3.10 -Python 3.6

___
Python tracker 

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



[issue41843] Reenable sendfile in shutil.copyfile() on Solaris

2020-11-05 Thread Jakub Stasiak


Change by Jakub Stasiak :


--
nosy: +jstasiak

___
Python tracker 

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



[issue24651] Mock.assert* API is in user namespace

2020-11-05 Thread Gregory P. Smith


Change by Gregory P. Smith :


--
nosy: +gregory.p.smith

___
Python tracker 

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



[issue42269] Add ability to set __slots__ in dataclasses

2020-11-05 Thread Jakub Stasiak


Change by Jakub Stasiak :


--
nosy: +jstasiak

___
Python tracker 

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



[issue41877] Check against misspellings of assert etc. in mock

2020-11-05 Thread Gregory P. Smith


Change by Gregory P. Smith :


--
assignee:  -> gregory.p.smith

___
Python tracker 

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



[issue41877] Check against misspellings of assert etc. in mock

2020-11-05 Thread Gregory P. Smith


Change by Gregory P. Smith :


--
nosy: +gregory.p.smith

___
Python tracker 

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



[issue41839] Solaris: Fix error checking in sched_get_priority_ functions

2020-11-05 Thread Jakub Stasiak


Jakub Stasiak  added the comment:

I think negative values aren't possible on Linux if one's to trust the 
sched_get_priority_min man page:


   Linux allows the static priority range 1 to 99 for the SCHED_FIFO and
   SCHED_RR policies, and the priority 0 for the remaining policies.
   Scheduling priority ranges for the various policies are not
   alterable.

But yeah, it seems that negative values need to be accepted on Solaris.

--
nosy: +jstasiak

___
Python tracker 

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



[issue38323] asyncio: MultiLoopWatcher has a race condition (test_asyncio: test_close_kill_running() hangs on AMD64 RHEL7 Refleaks 3.x)

2020-11-05 Thread Jakub Stasiak


Change by Jakub Stasiak :


--
nosy: +jstasiak

___
Python tracker 

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



[issue42173] Drop Solaris support

2020-11-05 Thread Jakub Stasiak


Change by Jakub Stasiak :


--
nosy: +jstasiak

___
Python tracker 

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



[issue42260] [C API] Add PyInterpreterState_SetConfig(): reconfigure an interpreter

2020-11-05 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +22079
pull_request: https://github.com/python/cpython/pull/23167

___
Python tracker 

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



[issue41712] REDoS in purge

2020-11-05 Thread Yash Shete


Change by Yash Shete :


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

___
Python tracker 

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



[issue20774] collections.deque should ship with a stdlib json serializer

2020-11-05 Thread Ken Jin


Ken Jin  added the comment:

Sorry to butt into this conversation, but I wanted to add that I have interest 
in this feature - deques are the fourth most common container types I use in 
Python. Is there any way I can help to get this PR across the finish line?

So far I've forked the PR, rebased it, then applied some changes (docs, news, 
and performance) to try to lessen the impact of checking for deque:

(Python/master branch)
>>> timeit.timeit(stmt="json.dumps(['test'])", setup="import json", 
>>> number=1_000_000)
2.25838627

>>> timeit.timeit(stmt="json.dumps(1)", setup="import json", 
>>> number=1_000_000)
1.984512199975

(Python/pr_830 branch)
>>> timeit.timeit(stmt="json.dumps(['test'])", setup="import json", 
>>> number=1_000_000)
2.32430339991

>>> timeit.timeit(stmt="json.dumps(1)", setup="import json", 
>>> number=1_000_000)
1.968071199971

The PR branch is here https://github.com/Fidget-Spinner/cpython/tree/pr_830.

I'm not a Git wizard, so I don't know what's the best next step. Do I 
a. Make a PR against Lisa's PR (or)
b. Make a brand new PR against cpython master ?

If the core devs here feel that after 6 years, this change might be unneeded 
after all, I don't mind closing the branch either. Thanks for reading.

--
nosy: +kj

___
Python tracker 

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



[issue42269] Add ability to set __slots__ in dataclasses

2020-11-05 Thread Eric V. Smith


New submission from Eric V. Smith :

I resisted adding the ability to set __slots__ in the first version of 
dataclasses, since it requires that instead of modifying an existing class, an 
entirely new class is returned.

But I think this feature would be useful enough that I'm now willing to add it. 
I have the code ready, I just need to work on tests and documentation.

--
assignee: eric.smith
components: Library (Lib)
messages: 380416
nosy: eric.smith
priority: normal
severity: normal
status: open
title: Add ability to set __slots__ in dataclasses
type: behavior
versions: Python 3.10

___
Python tracker 

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



[issue41111] Convert a few stdlib extensions to the limited C API

2020-11-05 Thread Petr Viktorin


Petr Viktorin  added the comment:

> Maybe we can do add new members for the 8 missing slots

See: https://bugs.python.org/issue41618?#msg380414

--
nosy: +petr.viktorin

___
Python tracker 

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



[issue41618] [C API] How many slots of static types should be exposed in PyType_GetSlot()

2020-11-05 Thread Petr Viktorin


Petr Viktorin  added the comment:

My views on individual slots:

Not a function, shouldn't be used with PyType_Slot:
  * tp_dict - I'd add a PyType_GetDict if there is a need to get this
  * tp_mro - I'd add a PyType_GetMRO if there is a need to get this
(There are existing slots that aren't functions; I'd like to deprecate them in 
the long term.)

internal use only, do not expose:
  * tp_cache
  * tp_subclasses
  * tp_weaklist
  * tp_as_*

Not part of limited API, do not expose:
  * tp_vectorcall

Can be exposed if we deem all of the related API stable:
  * bf_getbuffer
  * bf_releasebuffer

--

___
Python tracker 

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



[issue41712] REDoS in purge

2020-11-05 Thread Yash Shete


Yash Shete  added the comment:

Vulnerable regex conditions are removed

bpo-41712: Removal of Vulnerable regex conditions  
Using suggestion  ""For example, you can modify the sub-pattern \w+\d+ to 
([A-Za-z_]*\d)+""  and converted to ([A-za-z_]+\d+)
which should Fix the issue of vulnerable regex.
Test Result : Working as intended

Sorry if this not much this is my first pr to big org

--
Added file: https://bugs.python.org/file49572/purge.py

___
Python tracker 

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



[issue41877] Check against misspellings of assert etc. in mock

2020-11-05 Thread Václav Brožek

Václav Brožek  added the comment:

A pull request implementing the first part of this issue (Wrong prefixes of 
mock asserts: asert/aseert/assrt -> assert) is at 
https://github.com/python/cpython/pull/23165.

I acknowledge that this is a controversial topic and I put forward my reasons 
to carry on with the above pull request in msg378569. I welcome a further 
discussion on the PR.

--

___
Python tracker 

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



[issue41877] Check against misspellings of assert etc. in mock

2020-11-05 Thread Václav Brožek

Change by Václav Brožek :


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

___
Python tracker 

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



[issue40816] Add missed AsyncContextDecorator to contextlib

2020-11-05 Thread Ken Jin


Change by Ken Jin :


--
nosy: +kj
nosy_count: 5.0 -> 6.0
pull_requests: +22076
pull_request: https://github.com/python/cpython/pull/23164

___
Python tracker 

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



[issue41712] REDoS in purge

2020-11-05 Thread Yash Shete


Change by Yash Shete :


Removed file: https://bugs.python.org/file49571/purge.py

___
Python tracker 

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



[issue41712] REDoS in purge

2020-11-05 Thread Yash Shete


Yash Shete  added the comment:

converted regex from \w+\d+ to ([A-Za-z_]*\d)+
as asked.
you can modify the sub-pattern \w+\d+ to ([A-Za-z_]*\d)+
and is working fine

--
nosy: +Pixmew
Added file: https://bugs.python.org/file49571/purge.py

___
Python tracker 

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



[issue42108] HTTPSConnection hangs forever when the percentage completed of the upload drops from 100 to 0

2020-11-05 Thread Mickaël Schoentgen

Change by Mickaël Schoentgen :


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



[issue42108] HTTPSConnection hangs forever when the percentage completed of the upload drops from 100 to 0

2020-11-05 Thread Mickaël Schoentgen

Mickaël Schoentgen  added the comment:

So, after several weeks we found the issue. And it is not related to Python but 
a missing TCP keep alive option not set.

--
resolution:  -> not a bug

___
Python tracker 

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



[issue42262] [C API] Add Py_NewRef() function to get a new strong reference to an object

2020-11-05 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



[issue42262] [C API] Add Py_NewRef() function to get a new strong reference to an object

2020-11-05 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 53a03aafd5812018a3821a2e83063fd3d6cd2576 by Victor Stinner in 
branch 'master':
bpo-42262: Add Py_NewRef() and Py_XNewRef() (GH-23152)
https://github.com/python/cpython/commit/53a03aafd5812018a3821a2e83063fd3d6cd2576


--

___
Python tracker 

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



[issue42264] Deprecate or remove sqlite3.OptimizedUnicode

2020-11-05 Thread Erlend Egeberg Aasland


Change by Erlend Egeberg Aasland :


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

___
Python tracker 

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



[issue31861] add aiter() and anext() functions to operator module

2020-11-05 Thread John Belmonte


John Belmonte  added the comment:

Adding this would be a nice compliment to aclosing(), which was already merged 
for 3.10.

Otherwise, witness the ugliness of using aclosing() with an async iterable 
object:

async with aclosing(foo.__aiter__()) as agen:
async for item in agen:
...

I'd like:

async with aclosing(aiter(foo)) as agen:
async for item in agen:
...

--
nosy: +John Belmonte

___
Python tracker 

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



[issue26053] regression in pdb output between 2.7 and 3.5

2020-11-05 Thread Tal Einat


Tal Einat  added the comment:

Since it's a different implementation approach, I'd prefer a separate PR.

Whether we merge the existing one depends on whether we'd like to backport a 
fix for this to 3.9 and 3.8.

--

___
Python tracker 

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



[issue24160] Pdb sometimes raises exception when trying to remove a breakpoint defined in a different debugger session

2020-11-05 Thread Tal Einat


Tal Einat  added the comment:

Irit, I like the approach of your PR for an immediate fix, that we could 
consider backporting.

In the long term, ISTM that we should refactor to store the breakpoints with 
only a single source of truth, and avoid the duplication between 
Breakpoint.bplist, Breakpoint.bpbynumber and Bdb.breaks.

--
nosy: +taleinat

___
Python tracker 

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



[issue26053] regression in pdb output between 2.7 and 3.5

2020-11-05 Thread Irit Katriel


Irit Katriel  added the comment:

I like the idea of adding it to the Restart exception. Should we do this 
refactor in the same PR as fixing the regression or keep them separate?

--

___
Python tracker 

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



[issue26053] regression in pdb output between 2.7 and 3.5

2020-11-05 Thread Tal Einat


Tal Einat  added the comment:

I'm also uneasy about the sys.argv mangling.

It seem to me that it would be safer, and more explicit, to pass the desired 
arguments in the Restart exception instance.

--
nosy: +taleinat

___
Python tracker 

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



[issue41945] http.cookies.SimpleCookie.parse error after [keys]

2020-11-05 Thread Jan Novak


Jan Novak  added the comment:

Possible patch, load parts one by one:

http_cookie = 'id=12345; [object Object]=data; something=not_loaded'
for cookie_key in http_cookie.split(';'):
  c.load(cookie_key)

print c
Set-Cookie: id=12345
Set-Cookie: something=not_loaded

--

___
Python tracker 

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



[issue26053] regression in pdb output between 2.7 and 3.5

2020-11-05 Thread Irit Katriel


Change by Irit Katriel :


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

___
Python tracker 

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



[issue42265] Remove binhex module following PEP-594

2020-11-05 Thread Anatoliy Platonov


Anatoliy Platonov  added the comment:

Yeah, this was my mistake. I hurried a little with this issue and didn't notice 
that PEP is in draft state. Binhex module already marked as deprecated, since 
3.9 I think.

--

___
Python tracker 

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



[issue41810] Consider reintroducing `types.EllipsisType` for the sake of typing

2020-11-05 Thread Eric V. Smith


Eric V. Smith  added the comment:

I don't think we should backport them. It's definitely a new feature, and our 
policy is no new features in micro versions.

--

___
Python tracker 

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



[issue10529] [doc] Write argparse i18n howto

2020-11-05 Thread Irit Katriel


Change by Irit Katriel :


--
title: Write argparse i18n howto -> [doc] Write argparse i18n howto
versions: +Python 3.10, Python 3.8, Python 3.9 -Python 3.2

___
Python tracker 

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



[issue41810] Consider reintroducing `types.EllipsisType` for the sake of typing

2020-11-05 Thread Samuel Marks

Samuel Marks  added the comment:

Since we're bringing these back, would you accept a backport of these types?

[I'm writing a bunch of parsers/emitters—and starting to maintain an old 
runtime type-checker—for 3.6+]

--
nosy: +samuelmarks

___
Python tracker 

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



[issue42179] Clarify chaining exceptions in tutorial/errors.rst

2020-11-05 Thread Inada Naoki


Change by Inada Naoki :


--
pull_requests: +22074
pull_request: https://github.com/python/cpython/pull/23162

___
Python tracker 

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



[issue42266] LOAD_ATTR cache does not fully replicate PyObject_GetAttr behavior

2020-11-05 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



[issue42266] LOAD_ATTR cache does not fully replicate PyObject_GetAttr behavior

2020-11-05 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset 80449f243b13311d660eab3a751648029bcdd833 by Pablo Galindo in 
branch 'master':
bpo-42266: Handle monkey-patching descriptors in LOAD_ATTR cache (GH-23157)
https://github.com/python/cpython/commit/80449f243b13311d660eab3a751648029bcdd833


--

___
Python tracker 

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



[issue37826] Document PEP 3134 in tutorials/errors.rst

2020-11-05 Thread Inada Naoki


Change by Inada Naoki :


--
nosy: +methane
nosy_count: 4.0 -> 5.0
pull_requests: +22073
pull_request: https://github.com/python/cpython/pull/23162

___
Python tracker 

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



[issue40816] Add missed AsyncContextDecorator to contextlib

2020-11-05 Thread Andrew Svetlov


Change by Andrew Svetlov :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.10 -Python 3.9

___
Python tracker 

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



[issue40816] Add missed AsyncContextDecorator to contextlib

2020-11-05 Thread Andrew Svetlov


Andrew Svetlov  added the comment:


New changeset 178695b7aee7a7aacd49a3086060e06347d1e556 by Kazantcev Andrey in 
branch 'master':
bpo-40816 Add AsyncContextDecorator class (GH-20516)
https://github.com/python/cpython/commit/178695b7aee7a7aacd49a3086060e06347d1e556


--
nosy: +asvetlov

___
Python tracker 

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



[issue42179] Clarify chaining exceptions in tutorial/errors.rst

2020-11-05 Thread Inada Naoki

Inada Naoki  added the comment:

> 1. Such understanding of a tutorial is debatable. Tutorial is just a material 
> for learning written with some system in mind, which is more interesting to 
> read than dry reference material. A tutorial, generally dpeaking, may be both 
> for beginners and for professionals.

OK, I will send this topic to python-dev first.

> 2. The question about exception chaining is popular on Stackoverflow in 
> people who came to Python with Java or C# background (see “python inner 
> exception”).
> 3. Whatever material is given, it should not cause confusion, but now it does.

I searched it but I can not find confusion caused by this tutorial section. 
Please write a concrete URL caused by current tutorial?

> Since this section has been added recently, it is better to fix it rather 
> than remove entirely, aren’t you agree?

I prefer removing mention to __cause__, instead of adding mention to 
__context__.

No need to remove entire section. We can introduce high level overview of 
context chaining. Describing the default behavior and "from None" is enough for 
new users.

--

___
Python tracker 

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



[issue42179] Clarify chaining exceptions in tutorial/errors.rst

2020-11-05 Thread Vladimir Ryabtsev

Vladimir Ryabtsev  added the comment:

1. Such understanding of a tutorial is debatable. Tutorial is just a material 
for learning written with some system in mind, which is more interesting to 
read than dry reference material. A tutorial, generally dpeaking, may be both 
for beginners and for professionals.

2. The question about exception chaining is popular on Stackoverflow in people 
who came to Python with Java or C# background (see “python inner exception”).

3. Whatever material is given, it should not cause confusion, but now it does. 
Since this section has been added recently, it is better to fix it rather than 
remove entirely, aren’t you agree?

--

___
Python tracker 

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