[issue41199] Docstring convention not followed for dataclasses documentation page

2020-07-08 Thread శ్రీనివాస్ రెడ్డి తాటిపర్తి

Srinivas  Reddy Thatiparthy(శ్రీనివాస్ రెడ్డి తాటిపర్తి) 
 added the comment:

Please go ahead and create a PR.

--
nosy: +thatiparthy

___
Python tracker 

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



[issue41199] Docstring convention not followed for dataclasses documentation page

2020-07-08 Thread Wansoo Kim


Wansoo Kim  added the comment:

May I solve this issue?

--
nosy: +ys19991

___
Python tracker 

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



[issue41253] unittest -h shows a flag -s but it doesn't work

2020-07-08 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

The -s option shown in `python3 -m unittest -h` is grouped under help for 
discover. Options for a discover command don't necessarily apply to the 
unittest command itself.

$ python3 -m unittest -h
usage: python3 -m unittest [-h] [-v] [-q] [--locals] [-f] [-c] [-b]
   [-k TESTNAMEPATTERNS]
   [tests [tests ...]]

positional arguments:
  testsa list of any number of test modules, classes and test
   methods.

optional arguments:
  -h, --help   show this help message and exit
  -v, --verboseVerbose output
  -q, --quiet  Quiet output
  --locals Show local variables in tracebacks
  -f, --failfast   Stop on first fail or error
  -c, --catch  Catch Ctrl-C and display results so far
  -b, --buffer Buffer stdout and stderr during tests
  -k TESTNAMEPATTERNS  Only run tests which match the given substring

Examples:
  python3 -m unittest test_module   - run tests from test_module
  python3 -m unittest module.TestClass  - run tests from 
module.TestClass
  python3 -m unittest module.Class.test_method  - run specified test method
  python3 -m unittest path/to/test_file.py  - run tests from test_file.py

usage: python3 -m unittest discover [-h] [-v] [-q] [--locals] [-f] [-c] [-b]
[-k TESTNAMEPATTERNS] [-s START]
[-p PATTERN] [-t TOP]

optional arguments:
  -h, --helpshow this help message and exit
  -v, --verbose Verbose output
  -q, --quiet   Quiet output
  --locals  Show local variables in tracebacks
  -f, --failfastStop on first fail or error
  -c, --catch   Catch Ctrl-C and display results so far
  -b, --buffer  Buffer stdout and stderr during tests
  -k TESTNAMEPATTERNS   Only run tests which match the given substring
  -s START, --start-directory START
Directory to start discovery ('.' default)
  -p PATTERN, --pattern PATTERN
Pattern to match tests ('test*.py' default)
  -t TOP, --top-level-directory TOP
Top level directory of project (defaults to start
directory)

For test discovery all test modules must be importable from the top level
directory of the project.

--
nosy: +xtreak

___
Python tracker 

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



[issue41251] __future__.barry_as_FLUFL.getMandatoryRelease() is wrong

2020-07-08 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

It was not officially dropped. It was kept as a joke.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue41250] Number separators in different places

2020-07-08 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

This was considered in PEP 378 — Format Specifier for Thousands Separator.¹  
The decision was to keep it simple and only support groups of three digits 
using a comma as the separator.

FWIW, the decimal documentation has a formatting recipe that could be adapted 
to meet your needs.²

¹ https://www.python.org/dev/peps/pep-0378/
² https://docs.python.org/3/library/decimal.html#recipes

--
nosy: +rhettinger

___
Python tracker 

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



[issue41253] unittest -h shows a flag -s but it doesn't work

2020-07-08 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

Where do you see option -s?

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue41253] unittest -h shows a flag -s but it doesn't work

2020-07-08 Thread Faris Chugthai


New submission from Faris Chugthai :

I'm not 100% sure what's happening here but running:

`python -m unittest -h`

shows a flag `-s` as does

`python -m unittest discover -h`.

When run as:

`python -m unittest discover -s test`

the command runs correctly but when run as

`python -m unittest -s test`

the command fails.

```sh

$ python -m unittest -s test  
  
usage: python -m unittest [-h] [-v] [-q] [--locals] [-f]
[-c] [-b] [-k TESTNAMEPATTERNS]   [tests 
[tests ...]

   
python -m unittest: error: unrecognized arguments: -s

```

Which I believe to be a bug as the help generated by the discover subcommand 
indicates that the flag -s should be recognized.

--
components: Tests
messages: 373372
nosy: Faris Chugthai
priority: normal
severity: normal
status: open
title: unittest -h shows a flag -s but it doesn't work
type: behavior
versions: Python 3.8

___
Python tracker 

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



[issue41250] Number separators in different places

2020-07-08 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +eric.smith

___
Python tracker 

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



[issue41252] Incorrect reference counting in _ssl.c's _servername_callback()

2020-07-08 Thread Zackery Spytz


Change by Zackery Spytz :


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

___
Python tracker 

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



[issue41252] Incorrect reference counting in _ssl.c's _servername_callback()

2020-07-08 Thread Zackery Spytz


New submission from Zackery Spytz :

In _servername_callback(), servername_bytes will be used after being
decrefed if PyUnicode_FromEncodedObject() fails.

--
assignee: christian.heimes
components: Extension Modules, SSL
messages: 373371
nosy: ZackerySpytz, christian.heimes
priority: normal
severity: normal
status: open
title: Incorrect reference counting in _ssl.c's _servername_callback()
type: behavior
versions: Python 3.10, Python 3.8, Python 3.9

___
Python tracker 

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



[issue41251] __future__.barry_as_FLUFL.getMandatoryRelease() is wrong

2020-07-08 Thread wyz23x2


Change by wyz23x2 :


--
type:  -> behavior

___
Python tracker 

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



[issue41251] __future__.barry_as_FLUFL.getMandatoryRelease() is wrong

2020-07-08 Thread wyz23x2


wyz23x2  added the comment:

Help on _Feature in module __future__ object:   


class _Feature(builtins.object)
--snip--
|  getMandatoryRelease(self)
|  Return release in which this feature will become mandatory.
|
|  This is a 5-tuple, of the same form as sys.version_info, or, if
| the feature was dropped, is None. 
--snip--

--

___
Python tracker 

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



[issue41251] __future__.barry_as_FLUFL.getMandatoryRelease() is wrong

2020-07-08 Thread wyz23x2


Change by wyz23x2 :


--
components: +Library (Lib)
versions: +Python 3.10, Python 3.7, Python 3.8, Python 3.9

___
Python tracker 

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



[issue41251] __future__.barry_as_FLUFL.getMandatoryRelease() is wrong

2020-07-08 Thread wyz23x2


New submission from wyz23x2 :

__future__.barry_as_FLUFL turns x!=y into x<>y.
But the doc by help() says:
Help on _Feature in module __future__ object:   


class _Feature(builtins.object)
--snip--
|  getMandatoryRelease(self)
  |  Return release in which 
this feature will become mandatory. 
   |
 |  This is a 
5-tuple, of the same form as sys.version_info, or, if   
 |  the feature was dropped, is None. 
--snip--

Since <> is dropped, __future__.barry_as_FLUFL.getMandatoryRelease() should be 
None. But it instead returns (4, 0, 0, 'alpha', 0), which
means it will become default in Python 4 and drop != (!= is invalid
after the __future__ import).
That shouldn't be right.

--
messages: 373369
nosy: wyz23x2
priority: normal
severity: normal
status: open
title: __future__.barry_as_FLUFL.getMandatoryRelease() is wrong

___
Python tracker 

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



[issue41250] Number separators in different places

2020-07-08 Thread wyz23x2


wyz23x2  added the comment:

Q: Why not use f"{var:,}".replace(',', sepchar) for the sepchar parameter?
A: It is very complicated in the case below:
num = 1234567
text = 'Hello, world!'
print(f"{num:,}{text}").replace(',', ' ') # Becomes '1 234 567Hello world!'
print(f"{f'{num:,}'.replace(',', ' ')}{text}") # Too complicated!
print(f"{num:,}".replace(',', ' ')+text) # Slow!

--

___
Python tracker 

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



[issue41250] Number separators in different places

2020-07-08 Thread wyz23x2

New submission from wyz23x2 :

The current syntax is this for thousand separators:
f'{var:,}'
It will return this when var is 1234567:
'1,234,567'
But sometimes we need a way to insert them in other places. For example:
123456789 → '1,2345,6789' (4)
62938757312 → '6,29387,57312' (5)
This could be done like this:
Idea 1:
Add a new method to string:
string.sep(num: int_or_float, interval: int_or_iterable = 3, 
   sepchar: str = ',')
>>> import string
>>> string.sep(1234567, 3)
'1,234,567'
>>> string.sep(1234567890, range(1, 4))
'1,23,456,7890'
>>> string.sep('Hello')
TypeError: Invalid number 'Hello'
>>> string.sep(12345678, sepchar=' ')
'12 345 678'
>>> string.sep(123456789, 4, '|')
'1|2345|6789'

Idea 2: (Not as powerful as above)
(Future)
>>> f'{123456789:4,}'
'1,2345,6789'
>>> f'{62938757312:5,}'
'6,29387,57312'
>>> f'{1234567:,}' # Equal to f'{1234567:3,}'
'1,234,567'
(Current)
>>> f'{12345678:5,}' # 5 discarded
'12,345,678'

--
components: Interpreter Core, Library (Lib)
messages: 373367
nosy: wyz23x2
priority: normal
severity: normal
status: open
title: Number separators in different places
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



[issue41239] SSL Certificate verify failed in Python3.6/3.7

2020-07-08 Thread Wu Wenyan


Wu Wenyan  added the comment:

OK. Thanks for your suggestion.

--

___
Python tracker 

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



[issue37765] IDLE: Include keywords in module-level autocomplete list

2020-07-08 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

Tal, I suggested the compromise because of your original objection.  Since you 
think half is worse than all, I will revert the change.  It did get me to do a 
needed rewrite of the Completions section of the IDLE doc.

--
title: IDLE: Include longer keywords in __main__ autocomplete list -> IDLE: 
Include keywords in module-level autocomplete list

___
Python tracker 

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



[issue37179] asyncio loop.start_tls() provide support for TLS in TLS

2020-07-08 Thread Cooper Lees


Cooper Lees  added the comment:

Yury, only problem with that is aiohttp hard blocks HTTPS proxies period. The 
aiohttp issue says they won't fix this until asyncio supports it. Kinda 
understand that.

[cooper:~]$ ./aioclient.par
HTTPS proxies https://fwdproxy:8082 are not supported, ignoring
^CTraceback (most recent call last):
  File "", line 37, in 
  File "", line 35, in __run
  File "/usr/local/fbcode/platform007/lib/python3.7/runpy.py", line 193, in 
_run_module_as_main
"__main__", mod_spec)
  File "/usr/local/fbcode/platform007/lib/python3.7/runpy.py", line 85, in 
_run_code
exec(code, run_globals)
  File 
"/data/users/cooper/fbsource/fbcode/buck-out/dev/gen/ti/fwdproxy/client_samples/py/aioclient#link-tree/ti/fwdproxy/client_samples/py/aioclient.py",
 line 56, in 
asyncio.run(run_example())
  File "/usr/local/fbcode/platform007/lib/python3.7/asyncio/runners.py", line 
43, in run
return loop.run_until_complete(main)
  File "uvloop/loop.pyx", line 1450, in uvloop.loop.Loop.run_until_complete
  File "uvloop/loop.pyx", line 1443, in uvloop.loop.Loop.run_until_complete
  File "uvloop/loop.pyx", line 1351, in uvloop.loop.Loop.run_forever
  File "uvloop/loop.pyx", line 519, in uvloop.loop.Loop._run
  File "uvloop/handles/poll.pyx", line 213, in uvloop.loop.__on_uvpoll_event
  File "uvloop/cbhandles.pyx", line 90, in uvloop.loop.Handle._run
  File "uvloop/cbhandles.pyx", line 73, in uvloop.loop.Handle._run
  File "uvloop/loop.pyx", line 359, in uvloop.loop.Loop._read_from_self
  File "uvloop/loop.pyx", line 364, in uvloop.loop.Loop._invoke_signals
  File "uvloop/loop.pyx", line 339, in uvloop.loop.Loop._ceval_process_signals
KeyboardInterrupt

Kept stack trace to prove I was using uvloop :)

--

___
Python tracker 

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



[issue40597] generated email message exceeds RFC-mandated limit of 998 characters

2020-07-08 Thread Abhilash Raj


Abhilash Raj  added the comment:

Thanks Mark!

--

___
Python tracker 

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



[issue40597] generated email message exceeds RFC-mandated limit of 998 characters

2020-07-08 Thread Abhilash Raj


Abhilash Raj  added the comment:

Closing this since the PRs for the behavior change reported by Mike and 
BPO-41206 is now merged too.

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



[issue41206] behaviour change with EmailMessage.set_content

2020-07-08 Thread Abhilash Raj


Abhilash Raj  added the comment:

I have merged https://github.com/python/cpython/pull/20542 and backported to 
3.8 and 3.9 branches (https://github.com/python/cpython/pull/21404 & 
https://github.com/python/cpython/pull/21405).

Closing this issue.

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

___
Python tracker 

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



[issue41249] TypedDict inheritance doesn't work with get_type_hints and postponed evaluation of annotations across modules

2020-07-08 Thread Guido van Rossum


Change by Guido van Rossum :


--
nosy: +gvanrossum, levkivskyi

___
Python tracker 

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



[issue41249] TypedDict inheritance doesn't work with get_type_hints and postponed evaluation of annotations across modules

2020-07-08 Thread Keith Blaha


New submission from Keith Blaha :

Copied from https://github.com/python/typing/issues/737

I came across this issue while using inheritance to express required keys in a 
TypedDict, as is recommended by the docs.

It's most easily explained by a minimal example I cooked up. Let's say we have 
a module foo.py:

from __future__ import annotations

from typing import Optional
from typing_extensions import TypedDict

class Foo(TypedDict):
a: Optional[int]

And another module bar.py:

from __future__ import annotations

from typing import get_type_hints
from foo import Foo

class Bar(Foo, total=False):
b: int

print(get_type_hints(Bar))

Note that both foo.py and bar.py have adopted postponed evaluation of 
annotations (PEP 563) by using the __future__ import.

If we execute bar.py, we get the error message NameError: name 'Optional' is 
not defined.

This is due to the combination of:

get_type_hints relies on the MRO to resolve types: 
https://github.com/python/cpython/blob/3.7/Lib/typing.py#L970
TypedDict does not preserve the original bases, so Foo is not in the MRO 
for Bar:

typing/typing_extensions/src_py3/typing_extensions.py

Line 1652 in d79edde

 tp_dict = super(_TypedDictMeta, cls).__new__(cls, name, (dict,), ns) 

Thus, get_type_hints is unable to resolve the types for annotations that are 
only imported in foo.py.

I ran this example using typing_extensions 3.7.4.2 (released via #709) and 
Python 3.7.3, but it seems like this would be an issue using the current main 
branches of both repositories as well.

I'm wondering what the right approach is to tackling this issue. It is of 
course solvable by defining Bar in foo.py instead, but it isn't ideal or 
intuitive to always need to inherit from a TypedDict in the same module.

I was thinking that similarly to __required_keys__ and __optional_keys__, the 
TypedDict could preserve its original bases in a new dunder attribute, and 
get_type_hints could work off of that instead of MRO when it is dealing with a 
TypedDict. I would be willing to contribute the PRs to implement this if the 
design is acceptable, but am open to other ideas as well.

--
components: Library (Lib)
messages: 373360
nosy: keithblaha
priority: normal
severity: normal
status: open
title: TypedDict inheritance doesn't work with get_type_hints and postponed 
evaluation of annotations across modules
type: behavior
versions: Python 3.10, Python 3.7, Python 3.8, Python 3.9

___
Python tracker 

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



[issue37179] asyncio loop.start_tls() provide support for TLS in TLS

2020-07-08 Thread Cooper Lees


Change by Cooper Lees :


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

___
Python tracker 

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



[issue37179] asyncio loop.start_tls() provide support for TLS in TLS

2020-07-08 Thread Yury Selivanov


Yury Selivanov  added the comment:

Looks like https://github.com/python/cpython/pull/17975 was forgotten and was 
never committed to 3.9. So it's 3.10 now.

Best bet for you is to use uvloop which should support the feature.

--

___
Python tracker 

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



[issue34624] -W option and PYTHONWARNINGS env variable does not accept module regexes

2020-07-08 Thread Marco Paolini


Marco Paolini  added the comment:

hello Thomas,

do you need any help fixing the conflicts in your PR?


even if Lib/warnings.py changed a little in the last 2 years, your PR is still 
good!

--
nosy: +mpaolini

___
Python tracker 

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



[issue40170] [C API] Make PyTypeObject structure an opaque structure in the public C API

2020-07-08 Thread Andy Lester


Change by Andy Lester :


--
nosy:  -petdance

___
Python tracker 

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



[issue41194] Python 3.9.0b3 crash on compile() in PyAST_Check() when the _ast module is loaded more than once

2020-07-08 Thread Arcadiy Ivanov


Arcadiy Ivanov  added the comment:

$ PYTHONWARNINGS=ignore gdb --args 
/home/arcivanov/Documents/src/arcivanov/pybuilder/target/venv/test/cpython-3.9.0.beta.4/bin/python
 ./repro.py 
GNU gdb (GDB) Fedora 9.1-5.fc32
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later 
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
.
Find the GDB manual and other documentation resources online at:
.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from 
/home/arcivanov/Documents/src/arcivanov/pybuilder/target/venv/test/cpython-3.9.0.beta.4/bin/python...
(gdb) run
Starting program: 
/home/arcivanov/Documents/src/arcivanov/pybuilder/target/venv/test/cpython-3.9.0.beta.4/bin/python
 ./repro.py
Missing separate debuginfos, use: dnf debuginfo-install glibc-2.31-2.fc32.x86_64
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
[Detaching after fork from child process 185113]
{'_platform': 'linux', '_os_name': 'posix', '_executable': 
('/home/arcivanov/Documents/src/arcivanov/pybuilder/target/venv/test/cpython-3.9.0.beta.4/bin/python',),
 '_exec_dir': 
'/home/arcivanov/Documents/src/arcivanov/pybuilder/target/venv/test/cpython-3.9.0.beta.4/bin',
 '_name': 'CPython', '_type': 'cpython', '_version': (3, 9, 0, 'beta', 4), 
'_is_pypy': False, '_is_64bit': True, '_versioned_dir_name': 
'cpython-3.9.0.beta.4', '_environ': {'SHELL': '/bin/bash', 'SESSION_MANAGER': 
'local/unix:@/tmp/.ICE-unix/6175,unix/unix:/tmp/.ICE-unix/6175', 'WINDOWID': 
'56623111', 'COLORTERM': 'truecolor', 'PYENV_SHELL': 'bash', 'XDG_CONFIG_DIRS': 
'/etc/xdg:/usr/share/kde-settings/kde-profile/default/xdg', 'HISTCONTROL': 
'ignoredups', 'XDG_MENU_PREFIX': 'kf5-', 'rvm_prefix': '/home/arcivanov', 
'HISTSIZE': '-1', 'HOSTNAME': 'ai-karellen-lap', 'LANGUAGE': '', 'JAVA_HOME': 
'/home/arcivanov/devhome/current/jdk', 'SSH_AUTH_SOCK': 
'/tmp/ssh-2nZCuLIsvvyW/agent.5125', 'SHELL_SESSION_ID': '1fe1a56ee9dd4fac
 8589a5eebfb3e6b0', 'DEV_HOME': '/home/arcivanov/devhome/current', 
'MY_RUBY_HOME': '/home/arcivanov/.rvm/rubies/ruby-2.4.3', 'ANT_HOME': 
'/home/arcivanov/devhome/current/ant', 'XDM_MANAGED': 'method=classic', 
'DESKTOP_SESSION': 'default', 'RBENV_SHELL': 'bash', 'SSH_AGENT_PID': '5854', 
'GTK_RC_FILES': 
'/etc/gtk/gtkrc:/home/arcivanov/.gtkrc:/home/arcivanov/.config/gtkrc', 
'GDK_CORE_DEVICE_EVENTS': '1', 'XCURSOR_SIZE': '32', 'RUBY_VERSION': 
'ruby-2.4.3', 'XDG_SEAT': 'seat0', 'PWD': 
'/home/arcivanov/Documents/src/arcivanov/pybuilder', 'PYENV_VIRTUALENV_INIT': 
'1', 'LOGNAME': 'arcivanov', 'XDG_SESSION_TYPE': 'x11', 'MODULESHOME': 
'/usr/share/Modules', 'rvm_version': '1.29.10 (latest)', 'MANPATH': 
'/home/arcivanov/devhome/current/jdk/man:/home/arcivanov/devhome/current/postgres-xl/share/man:/home/arcivanov/devhome/current/haproxy/share/man:/home/arcivanov/devhome/current/jdk/man:/home/arcivanov/devhome/current/postgres-xl/share/man:/home/arcivanov/devhome/current/haproxy/share/man::',
 '_'
 : '/usr/bin/gdb', 'XAUTHORITY': '/tmp/xauth-1000-_0',
 'SDL_VIDEO_MINIMIZE_ON_FOCUS_LOSS': '0', 'WINDOWPATH': '1', 'LINES': '221', 
'GTK2_RC_FILES': 
'/etc/gtk-2.0/gtkrc:/home/arcivanov/.gtkrc-2.0:/home/arcivanov/.gtkrc-2.0-kde4:/home/arcivanov/.config/gtkrc-2.0',
 'HOME': '/home/arcivanov', 'SSH_ASKPASS': '/usr/bin/ksshaskpass', 'LANG': 
'en_US.UTF-8', 'LS_COLORS': 
'rs=0:di=38;5;33:ln=38;5;51:mh=00:pi=40;38;5;11:so=38;5;13:do=38;5;5:bd=48;5;232;38;5;11:cd=48;5;232;38;5;3:or=48;5;232;38;5;9:mi=01;37;41:su=48;5;196;38;5;15:sg=48;5;11;38;5;16:ca=48;5;196;38;5;226:tw=48;5;10;38;5;16:ow=48;5;10;38;5;21:st=48;5;21;38;5;15:ex=38;5;40:*.tar=38;5;9:*.tgz=38;5;9:*.arc=38;5;9:*.arj=38;5;9:*.taz=38;5;9:*.lha=38;5;9:*.lz4=38;5;9:*.lzh=38;5;9:*.lzma=38;5;9:*.tlz=38;5;9:*.txz=38;5;9:*.tzo=38;5;9:*.t7z=38;5;9:*.zip=38;5;9:*.z=38;5;9:*.dz=38;5;9:*.gz=38;5;9:*.lrz=38;5;9:*.lz=38;5;9:*.lzo=38;5;9:*.xz=38;5;9:*.zst=38;5;9:*.tzst=38;5;9:*.bz2=38;5;9:*.bz=38;5;9:*.tbz=38;5;9:*.tbz2=38;5;9:*.tz=38;5;9:*.deb=38;5;9:*.rpm=38;5;9:*.jar=38;5;9:*.war=38;5;9:*.ear=38;
 

[issue41194] Python 3.9.0b3 crash on compile() in PyAST_Check() when the _ast module is loaded more than once

2020-07-08 Thread Arcadiy Ivanov


Arcadiy Ivanov  added the comment:

"Short" reproducer:


repro.py:

```
import sys
from os import getcwd, chdir
from runpy import run_path


def smoke_test(script, *args):
old_argv = list(sys.argv)
del sys.argv[:]
sys.argv.append(script)
sys.argv.extend(args)

old_modules = dict(sys.modules)
old_meta_path = list(sys.meta_path)
old_cwd = getcwd()

try:
return run_path(script, run_name="__main__")
except SystemExit as e:
if e.code:
print("Test did not exit successfully")
finally:
del sys.argv[:]
sys.argv.extend(old_argv)

sys.modules.clear()
sys.modules.update(old_modules)

del sys.meta_path[:]
sys.meta_path.extend(old_meta_path)
chdir(old_cwd)


smoke_test("script.py")

smoke_test("script.py")
```

script.py:

```
import sys
import subprocess
import ast

_PYTHON_INFO_SCRIPT = """import platform, sys, os, sysconfig
_executable = os.path.normcase(os.path.abspath(getattr(sys, "_base_executable", 
sys.executable)))
_platform = sys.platform
if _platform == "linux2":
_platform = "linux"
print({
"_platform": _platform,
"_os_name": os.name,
"_executable": (_executable, ),
"_exec_dir": 
os.path.normcase(os.path.abspath(os.path.dirname(_executable))),
"_name": platform.python_implementation(),
"_type": platform.python_implementation().lower(),
"_version": tuple(sys.version_info),
"_is_pypy": "__pypy__" in sys.builtin_module_names,
"_is_64bit": (getattr(sys, "maxsize", None) or getattr(sys, "maxint")) > 2 
** 32,
"_versioned_dir_name": "%s-%s" % (platform.python_implementation().lower(), 
".".join(str(f) for f in sys.version_info)),
"_environ": dict(os.environ),
"_darwin_python_framework": sysconfig.get_config_var("PYTHONFRAMEWORK")
})
"""

result = subprocess.check_output([sys.executable, "-c", _PYTHON_INFO_SCRIPT], 
universal_newlines=True)
python_info = ast.literal_eval(result)
print(python_info)

```

--

___
Python tracker 

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



[issue37179] asyncio loop.start_tls() provide support for TLS in TLS

2020-07-08 Thread Cooper Lees


Cooper Lees  added the comment:

Another bump since I've waiting over a year. Any plans for this? Will it make 
3.10? Anything I can do?

--
versions: +Python 3.10 -Python 3.8

___
Python tracker 

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



[issue41247] asyncio.set_running_loop() cache running loop holder

2020-07-08 Thread Tony


Change by Tony :


--
pull_requests: +20555
pull_request: https://github.com/python/cpython/pull/21406

___
Python tracker 

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



[issue40597] generated email message exceeds RFC-mandated limit of 998 characters

2020-07-08 Thread miss-islington


miss-islington  added the comment:


New changeset e68978978f49cfc489fa0f888281ce84460818c0 by Miss Islington (bot) 
in branch '3.9':
bpo-40597: Allow email.contextmanager set_content() to set a null string. 
(GH-20542)
https://github.com/python/cpython/commit/e68978978f49cfc489fa0f888281ce84460818c0


--

___
Python tracker 

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



[issue40597] generated email message exceeds RFC-mandated limit of 998 characters

2020-07-08 Thread miss-islington


miss-islington  added the comment:


New changeset c1c50345933efca42169f03d79ff4fe3d9c06bdc by Miss Islington (bot) 
in branch '3.8':
bpo-40597: Allow email.contextmanager set_content() to set a null string. 
(GH-20542)
https://github.com/python/cpython/commit/c1c50345933efca42169f03d79ff4fe3d9c06bdc


--

___
Python tracker 

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



[issue41093] TCPServer's server_forever() shutdown immediately when calling shutdown()

2020-07-08 Thread Tony


Tony  added the comment:

bump

--

___
Python tracker 

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



[issue41194] Python 3.9.0b3 crash on compile() in PyAST_Check() when the _ast module is loaded more than once

2020-07-08 Thread Arcadiy Ivanov


Arcadiy Ivanov  added the comment:

I'm working on a short reproducer, but otherwise reproducer is exactly the same 
as described in https://bugs.python.org/issue41194#msg372854

The way I bumped into this is trying to confirm the fix in Beta 4 (which 
apparently didn't make it, as you mentioned).

--

___
Python tracker 

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



[issue40597] generated email message exceeds RFC-mandated limit of 998 characters

2020-07-08 Thread miss-islington


Change by miss-islington :


--
pull_requests: +20553
pull_request: https://github.com/python/cpython/pull/21404

___
Python tracker 

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



[issue40597] generated email message exceeds RFC-mandated limit of 998 characters

2020-07-08 Thread miss-islington


miss-islington  added the comment:


New changeset 4fa61a7732923f92de0f7830c12da48c4cec937f by Mark Sapiro in branch 
'master':
bpo-40597: Allow email.contextmanager set_content() to set a null string. 
(GH-20542)
https://github.com/python/cpython/commit/4fa61a7732923f92de0f7830c12da48c4cec937f


--

___
Python tracker 

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



[issue40597] generated email message exceeds RFC-mandated limit of 998 characters

2020-07-08 Thread miss-islington


Change by miss-islington :


--
pull_requests: +20554
pull_request: https://github.com/python/cpython/pull/21405

___
Python tracker 

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



[issue41202] Allow to provide custom exception handler to asyncio.run()

2020-07-08 Thread Kyle Stanley


Kyle Stanley  added the comment:

Yep, having to set a custom exception handler definitely constitutes as needing 
"finer control over the event loop behavior". There's absolute nothing wrong 
with using the low-level API when you need further customization, but we try to 
minimize the high-level API as much as possible to make it simple for the 
average user. I suspect that the majority of asyncio users don't have a need to 
customize the exception handler beyond the default settings.

--
nosy: +aeros

___
Python tracker 

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



[issue41194] Python 3.9.0b3 crash on compile() in PyAST_Check() when the _ast module is loaded more than once

2020-07-08 Thread STINNER Victor


STINNER Victor  added the comment:

I checked manually that msg372859 example is fixed.

> @vstinner, this is in the current 3.9 as of 
> a0a6f1167834c87f12e2eca11dd77143103e7691 (11hrs ago). We didn't get the 
> actual bug, we just got stopped by an assertion when python got built with 
> debug.

It sounds like a different bug. Can you provide a reproducer?

--

___
Python tracker 

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



[issue41194] Python 3.9.0b3 crash on compile() in PyAST_Check() when the _ast module is loaded more than once

2020-07-08 Thread Arcadiy Ivanov


Arcadiy Ivanov  added the comment:

@vstinner, this is in the current 3.9 as of 
a0a6f1167834c87f12e2eca11dd77143103e7691 (11hrs ago). We didn't get the actual 
bug, we just got stopped by an assertion when python got built with debug.

--

___
Python tracker 

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



[issue40360] Deprecate lib2to3 (and 2to3) for future removal

2020-07-08 Thread STINNER Victor


Change by STINNER Victor :


--
nosy:  -vstinner

___
Python tracker 

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



[issue40170] [C API] Make PyTypeObject structure an opaque structure in the public C API

2020-07-08 Thread STINNER Victor

STINNER Victor  added the comment:

> Thanks for doing this.  I can confirm the performance regression is fixed and 
> that clean code is being generated for PyTuple_Check().

Thanks for checking!

> BTW, I support your efforts — just wanted to make sure we didn't 
> unintentionally take a step backwards.

I tried to avoid changes which could affect performances.

I wrote PEP 620 for such changes.

--

___
Python tracker 

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



[issue41194] Python 3.9.0b3 crash on compile() in PyAST_Check() when the _ast module is loaded more than once

2020-07-08 Thread STINNER Victor


STINNER Victor  added the comment:

> I'm reopening this as the original SEGV didn't go away in 3.9 beta 4. It 
> looks like debug build caught an assertion and prevented the SEGV from 
> triggering.

Right, the fix was merged after v3.9.0b4 was merged.

The fix will be part of the next 3.9 release ("3.9.0 beta 5: Monday, 
2020-07-20"). Usually, issues are closed when fixes are merged, not when new 
versions including the fix are released.

--

___
Python tracker 

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



[issue41175] Static analysis issues reported by GCC 10

2020-07-08 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 61fc23ca106bc82955b0e59d1ab42285b94899e2 by stratakis in branch 
'master':
bpo-41175: Guard against a NULL pointer dereference within bytearrayobject 
(GH-21240)
https://github.com/python/cpython/commit/61fc23ca106bc82955b0e59d1ab42285b94899e2


--

___
Python tracker 

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



[issue41194] Python 3.9.0b3 crash on compile() in PyAST_Check() when the _ast module is loaded more than once

2020-07-08 Thread Arcadiy Ivanov


Arcadiy Ivanov  added the comment:

> Program received signal SIGSEGV, Segmentation fault.
0x00623339 in _Py_IS_TYPE (ob=0x0, type=0x8609e0 ) at 
./Include/object.h:128
128 return ob->ob_type == type;
(gdb) py-bt
Traceback (most recent call first):
  
  File "/home/arcivanov/.pyenv/versions/3.9-dev-debug/lib/python3.9/ast.py", 
line 306, in parse
lines.append(next_line)
  File "/home/arcivanov/.pyenv/versions/3.9-dev-debug/lib/python3.9/ast.py", 
line 62, in literal_eval
node_or_string = parse(node_or_string, mode='eval')
  File "./src/main/python/pybuilder/python_env.py", line 83, in populate
python_info = ast.literal_eval(result)
  File "./src/main/python/pybuilder/reactor.py", line 409, in __init__
self.propagate_property("explicit_namespaces")
  File "./src/main/python/pybuilder/cli.py", line 238, in init_reactor
reactor = Reactor(logger, execution_manager)
  File "./src/main/python/pybuilder/cli.py", line 415, in main
reactor = init_reactor(logger)
  File "./src/main/python/pybuilder/__init__.py", line 34, in bootstrap
sys.exit(pybuilder.cli.main(*sys.argv[1:]))
  File "/tmp/IntegrationTestSupporthzc3tee0/build.py", line 31, in 
bootstrap()
  
  File "/home/arcivanov/.pyenv/versions/3.9-dev-debug/lib/python3.9/runpy.py", 
line 343, in _run_code
  File "/home/arcivanov/.pyenv/versions/3.9-dev-debug/lib/python3.9/runpy.py", 
line 353, in _run_module_code
  File "/home/arcivanov/.pyenv/versions/3.9-dev-debug/lib/python3.9/runpy.py", 
line 524, in run_path
  File 
"/home/arcivanov/Documents/src/arcivanov/pybuilder/src/integrationtest/python/smoke_itest_support.py",
 line 72, in smoke_test
return run_path(self.build_py, run_name="__main__")
  File 
"/home/arcivanov/Documents/src/arcivanov/pybuilder/src/integrationtest/python/smoke_clean_tests.py",
 line 30, in test_build_then_clean
self.smoke_test("-v", "-X", "clean")
  File 
"/home/arcivanov/.pyenv/versions/3.9-dev-debug/lib/python3.9/unittest/case.py", 
line 550, in _callTestMethod
method()
  File 
"/home/arcivanov/.pyenv/versions/3.9-dev-debug/lib/python3.9/unittest/case.py", 
line 1617, in run
  File 
"/home/arcivanov/.pyenv/versions/3.9-dev-debug/lib/python3.9/unittest/case.py", 
line 653, in __call__
return self.run(*args, **kwds)
  File 
"/home/arcivanov/.pyenv/versions/3.9-dev-debug/lib/python3.9/unittest/suite.py",
 line 378, in run
  File 
"/home/arcivanov/.pyenv/versions/3.9-dev-debug/lib/python3.9/unittest/suite.py",
 line 84, in __call__
return self.run(*args, **kwds)
  File 
"/home/arcivanov/.pyenv/versions/3.9-dev-debug/lib/python3.9/unittest/suite.py",
 line 378, in run
  File 
"/home/arcivanov/.pyenv/versions/3.9-dev-debug/lib/python3.9/unittest/suite.py",
 line 84, in __call__
return self.run(*args, **kwds)
  File 
"/home/arcivanov/.pyenv/versions/3.9-dev-debug/lib/python3.9/unittest/runner.py",
 line 432, in run
  File 
"/home/arcivanov/.pyenv/versions/3.9-dev-debug/lib/python3.9/unittest/main.py", 
line 783, in runTests
  File 
"/home/arcivanov/.pyenv/versions/3.9-dev-debug/lib/python3.9/unittest/main.py", 
line 101, in __init__
self.runTests()
  File 
"/home/arcivanov/Documents/src/arcivanov/pybuilder/src/integrationtest/python/smoke_clean_tests.py",
 line 34, in 
unittest.main()
(gdb) py-bt-full
#7 
#11 Frame 0xb67600, for file 
/home/arcivanov/.pyenv/versions/3.9-dev-debug/lib/python3.9/ast.py, line 306, 
in parse (source="{'_platform': 'linux', '_os_name': 'posix', '_executable': 
('/home/arcivanov/Documents/src/arcivanov/pybuilder/target/venv/test/cpython-3.9.0.beta.4/bin/python',),
 '_exec_dir': 
'/home/arcivanov/Documents/src/arcivanov/pybuilder/target/venv/test/cpython-3.9.0.beta.4/bin',
 '_name': 'CPython', '_type': 'cpython', '_version': (3, 9, 0, 'beta', 4), 
'_is_pypy': False, '_is_64bit': True, '_versioned_dir_name': 
'cpython-3.9.0.beta.4', '_environ': {'SHELL': '/bin/bash', 'SESSION_MANAGER': 
'local/unix:@/tmp/.ICE-unix/6175,unix/unix:/tmp/.ICE-unix/6175', 'WINDOWID': 
'56623111', 'COLORTERM': 'truecolor', 'PYENV_SHELL': 'bash', 'XDG_CONFIG_DIRS': 
'/etc/xdg:/usr/share/kde-settings/kde-profile/default/xdg', 'HISTCONTROL': 
'ignoredups', 'XDG_MENU_PREFIX': 'kf5-', 'rvm_prefix': '/home/arcivanov', 
'HISTSIZE': '-1', 'HOSTNAME': 'ai-karellen-lap', 'LANGUAGE': '', 'JAVA_HOME': 
'/ho
 me/arcivanov/devhome/current/j...(truncated)
lines.append(next_line)
#18 Frame 0x7fffe92ad230, for file 
/home/arcivanov/.pyenv/versions/3.9-dev-debug/lib/python3.9/ast.py, line 62, in 
literal_eval (node_or_string="{'_platform': 'linux', '_os_name': 'posix', 
'_executable': 
('/home/arcivanov/Documents/src/arcivanov/pybuilder/target/venv/test/cpython-3.9.0.beta.4/bin/python',),
 '_exec_dir': 
'/home/arcivanov/Documents/src/arcivanov/pybuilder/target/venv/test/cpython-3.9.0.beta.4/bin',
 '_name': 'CPython', '_type': 'cpython', '_version': (3, 9, 0, 'beta', 4), 
'_is_pypy': False, '_is_64bit': True, '_versioned_dir_name': 
'cpython-3.9.0.beta.4', '_environ': 

[issue39017] Infinite loop in the tarfile module

2020-07-08 Thread Ben Caller


Ben Caller  added the comment:

A smaller bug: If instead of 0 you use a large number (> 2^63) e.g. 
999 you get `OverflowError: Python int too large to convert to 
C ssize_t` rather than the expected `tarfile.ReadError` regardless of 
errorlevel.

--

___
Python tracker 

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



[issue41247] asyncio.set_running_loop() cache running loop holder

2020-07-08 Thread miss-islington


miss-islington  added the comment:


New changeset fbd71f66843aea71c09656f17a196d29d5d484af by Miss Islington (bot) 
in branch '3.9':
bpo-41247: asyncio.set_running_loop() cache running loop holder (GH-21401)
https://github.com/python/cpython/commit/fbd71f66843aea71c09656f17a196d29d5d484af


--

___
Python tracker 

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



[issue39017] Infinite loop in the tarfile module

2020-07-08 Thread Ben Caller


Ben Caller  added the comment:

I've attached a minimal tar file which reproduces this. I think the minimum 
length is 516 bytes.

We need a 512 byte PAX format header block as normal.

Then we need a pax header which matches the regex in 
https://github.com/python/cpython/blob/b26a0db8ea2de3a8a8e4b40e69fc8642c7d7cb68/Lib/tarfile.py#L1243

length, keyword = re.compile(br"(\d+) ([^=]+)=").groups()

We use the `length` variable to iterate:
https://github.com/python/cpython/blob/b26a0db8ea2de3a8a8e4b40e69fc8642c7d7cb68/Lib/tarfile.py#L1271

while True:
...
pos += length

So we can start the block with "0 X=". This makes length=0. So it will 
increment pos by 0 each loop and loop the same code forever.

Nice find.

Do you think this denial of service is worth requesting a CVE for? If so, can 
someone else do it.

--
nosy: +bc
Added file: https://bugs.python.org/file49309/recursion.tar

___
Python tracker 

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



[issue40170] [C API] Make PyTypeObject structure an opaque structure in the public C API

2020-07-08 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

Thanks for doing this.  I can confirm the performance regression is fixed and 
that clean code is being generated for PyTuple_Check().

BTW, I support your efforts — just wanted to make sure we didn't 
unintentionally take a step backwards.

--
nosy: +rhettinger

___
Python tracker 

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



[issue41247] asyncio.set_running_loop() cache running loop holder

2020-07-08 Thread Yury Selivanov


Yury Selivanov  added the comment:

> n python to know if there could be a context switch to get_running_loop while 
> set_running_loop is running.


No, it's protected by the GIL.

Good catch, and merged.

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



[issue41247] asyncio.set_running_loop() cache running loop holder

2020-07-08 Thread miss-islington


Change by miss-islington :


--
pull_requests: +20551
pull_request: https://github.com/python/cpython/pull/21402

___
Python tracker 

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



[issue41247] asyncio.set_running_loop() cache running loop holder

2020-07-08 Thread miss-islington


Change by miss-islington :


--
pull_requests: +20552
pull_request: https://github.com/python/cpython/pull/21403

___
Python tracker 

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



[issue41247] asyncio.set_running_loop() cache running loop holder

2020-07-08 Thread miss-islington


miss-islington  added the comment:


New changeset 529f42645d38b6b0075f256814dfb3d220ac7d92 by Tony Solomonik in 
branch 'master':
bpo-41247: asyncio.set_running_loop() cache running loop holder (GH-21401)
https://github.com/python/cpython/commit/529f42645d38b6b0075f256814dfb3d220ac7d92


--
nosy: +miss-islington

___
Python tracker 

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



[issue41248] Python manual forced in maximized window

2020-07-08 Thread Mischiew Rithe


New submission from Mischiew Rithe :

In versions 3.8.1 and 3.8.3-amd64 (only versions tested), on Windows, the 
"Python 3.8 Manuals" opens in a maximized window.

This is unexpected and undesired, as the user cannot see the other windows, 
including the one he's developing from (IDE, editor, shell, ...).

The problem seems to come from the shortcut created in the menu, which forces a 
maximized window. It has to be set to "normal window" instead.

--
assignee: docs@python
components: Documentation
messages: 373335
nosy: Mischiew Rithe, docs@python
priority: normal
severity: normal
status: open
title: Python manual forced in maximized window
type: behavior
versions: Python 3.8

___
Python tracker 

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



[issue41247] asyncio.set_running_loop() cache running loop holder

2020-07-08 Thread Tony


Change by Tony :


--
title: asyncio module better caching for set and get_running_loop -> 
asyncio.set_running_loop() cache running loop holder

___
Python tracker 

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



[issue41247] asyncio.set_running_loop() cache running loop holder

2020-07-08 Thread Tony


Change by Tony :


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

___
Python tracker 

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



[issue40360] Deprecate lib2to3 (and 2to3) for future removal

2020-07-08 Thread Peter Ludemann


Peter Ludemann  added the comment:

Yes, I'm thinking of doing this as a wrapper, in such a way that it could be 
incorporated into Lib/ast.py eventually. (Also, any lib2to3-ish capabilities 
would probably not be suitable for inclusion in the stdlib, at least not 
initially ... but I have no plans to work on something to replace lib2to3's 
fixers.)

--

___
Python tracker 

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



[issue41247] asyncio module better caching for set and get_running_loop

2020-07-08 Thread Tony


New submission from Tony :

There is a cache variable for the running loop holder, but once 
set_running_loop is called the variable was set to NULL so the next time 
get_running_loop would have to query a dictionary to receive the running loop 
holder.

I thought why not always cache the latest set_running_loop?

The only issue I thought of here is in the details of the implementation: I 
have too little experience in python to know if there could be a context switch 
to get_running_loop while set_running_loop is running.

If a context switch is possible there then this issue would be way harder to 
solve, but it is still solvable.

--
messages: 37
nosy: tontinton
priority: normal
severity: normal
status: open
title: asyncio module better caching for set and get_running_loop

___
Python tracker 

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



[issue40360] Deprecate lib2to3 (and 2to3) for future removal

2020-07-08 Thread Guido van Rossum


Guido van Rossum  added the comment:

Can that be done as a 3rd party wrapper? Then you would be able to support 
older Python versions, and typed_ast (which can parse older Python grammars 
with a newer Python that's older than 3.8). Plus it would be much easier to get 
your code released -- no waiting for core devs to review it or waiting for the 
next CPython (bugfix or feature) release to get a bug fixed or small feature 
added.

--

___
Python tracker 

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



[issue41244] Change to use str.join() instead of += when concatenating string

2020-07-08 Thread Yury Selivanov


Yury Selivanov  added the comment:

> Changes in bpo-41242 were rejected not because the new code is worse, but 
> because it is not obviously and significantly better that the existing code. 
> Here status quo wins for the same reasons. This rule saves us from endless 
> rewriting the code and allows to focus on important things.

+1.

--

___
Python tracker 

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



[issue41245] cmath module documentation is misleading on branch cuts

2020-07-08 Thread Mark Dickinson


Mark Dickinson  added the comment:

> [...] see the change of sign in the real part below [...]

Grr. Stupid fingers. That should say "imaginary part", not "real part"

--

___
Python tracker 

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



[issue41245] cmath module documentation is misleading on branch cuts

2020-07-08 Thread Mark Dickinson


Mark Dickinson  added the comment:

Yes, that looks like the right part of the sqrt code.

For the acos docstring, "continuous from below" implies that for any complex 
number z that lies exactly _on_ the branch cut, acos(z) is close to acos(w) for 
a nearby value w just _below_ the branch cut. But that's demonstrably not true: 
see the change of sign in the real part below:

>>> acos(complex(2.3, -1e-10))  # value just "below" the branch cut
(4.828045495852677e-11+1.475044781241425j)
>>> acos(complex(2.3, 0.0))  # nearby value exactly _on_ the branch cut
-1.475044781241425j

In effect, for a branch cut along the real axis, the sign of the zero in the 
imaginary part of the argument allows us to be continuous from both sides at 
once.

--

___
Python tracker 

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



[issue41245] cmath module documentation is misleading on branch cuts

2020-07-08 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

+1 for changing the language to match the actual mechanics.


> "the sign of the imaginary part of x is used [...]"

I'm trying to see where this happens.  Is this part of cmath_sqrt?

if (z.real >= 0.) {
r.real = s;
r.imag = copysign(d, z.imag); 
} else {
r.real = d;
r.imag = copysign(s, z.imag);
}


> "continuous from below" and "continuous from above" 
> language is misleading;

I'm curious, is that language incorrect?  My mental image of a branch cut is a 
helical graph with the edge cases being continuous from above and below.  
Likewise, my mental model for branch cut logic is it resolves multiple possible 
output values in a way preserves continuity from one side or the other.

In other words, I think about branch cuts in terms of continuity rather than 
sign preservation.  Is that incorrect?

--
nosy: +rhettinger

___
Python tracker 

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



[issue41172] test_peg_generator C tests fail on Windows ARM

2020-07-08 Thread Steve Dower


Change by Steve Dower :


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

___
Python tracker 

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



[issue41246] IOCP Proactor same socket overlapped callbacks

2020-07-08 Thread Tony


Change by Tony :


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

___
Python tracker 

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



[issue40360] Deprecate lib2to3 (and 2to3) for future removal

2020-07-08 Thread Peter Ludemann


Peter Ludemann  added the comment:

I've written up a proposal for adding "whitespace" handling to the ast module:
https://mail.python.org/archives/list/python-id...@python.org/thread/X2HJ6I6XLIGRZDB27HRHIVQC3RXNZAY4/

I don't think it's a "summer-of-code-sized project", mainly because I already 
have various bits of code that handle the fiddly byte/str offset conversions.

--

___
Python tracker 

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



[issue41194] Python 3.9.0b3 crash on compile() in PyAST_Check() when the _ast module is loaded more than once

2020-07-08 Thread Arcadiy Ivanov


Arcadiy Ivanov  added the comment:

Confirmed not fixed.

Taken with 3.9 branch as of today.

(pyb-3.9-dev-d) [arcivanov@ai-karellen-lap pybuilder]$ abrt gdb 1f24453
GNU gdb (GDB) Fedora 9.1-5.fc32
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later 
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
.
Find the GDB manual and other documentation resources online at:
.

For help, type "help".
Type "apropos word" to search for commands related to "word".
No symbol table is loaded.  Use the "file" command.
No symbol table is loaded.  Use the "file" command.
Reading symbols from 
/home/arcivanov/Documents/src/arcivanov/pybuilder/target/venv/test/cpython-3.9.0.beta.4/bin/python...
[New LWP 144565]
warning: Unexpected size of section `.reg-xstate/144565' in core file.
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Core was generated by 
`/home/arcivanov/Documents/src/arcivanov/pybuilder/target/venv/test/cpython-3.9.'.
Program terminated with signal SIGSEGV, Segmentation fault.
warning: Unexpected size of section `.reg-xstate/144565' in core file.
#0  0x00623339 in _Py_IS_TYPE (ob=0x0, type=0x8609e0 ) at 
./Include/object.h:128
128 return ob->ob_type == type;
>FromTo  Syms Read   Shared Object Library
0x7fcbed8db050  0x7fcbed8efd69  Yes (*) /lib64/libcrypt.so.2
0x7fcbed8beaf0  0x7fcbed8cdb95  Yes (*) /lib64/libpthread.so.0
0x7fcbed8b2270  0x7fcbed8b31c9  Yes (*) /lib64/libdl.so.2
0x7fcbed8ac3f0  0x7fcbed8acdb0  Yes (*) /lib64/libutil.so.1
0x7fcbed7743d0  0x7fcbed80f078  Yes (*) /lib64/libm.so.6
0x7fcbed5c0670  0x7fcbed70e80f  Yes (*) /lib64/libc.so.6
0x7fcbed94f110  0x7fcbed96f574  Yes (*) /lib64/ld-linux-x86-64.so.2
0x7fcbed91a0f0  0x7fcbed91bc18  Yes 
/home/arcivanov/Documents/src/arcivanov/pybuilder/target/venv/test/cpython-3.9.0.beta.4/lib/python3.9/lib-dynload/_heapq.cpython-39d-x86_64-linux-gnu.so
0x7fcbed93c3d0  0x7fcbed940cfc  Yes 
/home/arcivanov/Documents/src/arcivanov/pybuilder/target/venv/test/cpython-3.9.0.beta.4/lib/python3.9/lib-dynload/zlib.cpython-39d-x86_64-linux-gnu.so
0x7fcbe00cc5f0  0x7fcbe00d9bd8  Yes (*) /lib64/libz.so.1
0x7fcbed9342f0  0x7fcbed935f82  Yes 
/home/arcivanov/Documents/src/arcivanov/pybuilder/target/venv/test/cpython-3.9.0.beta.4/lib/python3.9/lib-dynload/_bz2.cpython-39d-x86_64-linux-gnu.so
0x7fcbe0078570  0x7fcbe0084996  Yes (*) /lib64/libbz2.so.1
0x7fcbed9294a0  0x7fcbed92cba6  Yes 
/home/arcivanov/Documents/src/arcivanov/pybuilder/target/venv/test/cpython-3.9.0.beta.4/lib/python3.9/lib-dynload/_lzma.cpython-39d-x86_64-linux-gnu.so
0x7fcbe004f9f0  0x7fcbe0067076  Yes (*) /lib64/liblzma.so.5
0x7fcbe0115280  0x7fcbe01160b3  Yes 
/home/arcivanov/Documents/src/arcivanov/pybuilder/target/venv/test/cpython-3.9.0.beta.4/lib/python3.9/lib-dynload/grp.cpython-39d-x86_64-linux-gnu.so
0x7fcbe0104590  0x7fcbe010bc77  Yes 
/home/arcivanov/Documents/src/arcivanov/pybuilder/target/venv/test/cpython-3.9.0.beta.4/lib/python3.9/lib-dynload/math.cpython-39d-x86_64-linux-gnu.so
0x7fcbe00fb150  0x7fcbe00fc200  Yes 
/home/arcivanov/Documents/src/arcivanov/pybuilder/target/venv/test/cpython-3.9.0.beta.4/lib/python3.9/lib-dynload/_bisect.cpython-39d-x86_64-linux-gnu.so
0x7fcbe00f52f0  0x7fcbe00f6a1e  Yes 
/home/arcivanov/Documents/src/arcivanov/pybuilder/target/venv/test/cpython-3.9.0.beta.4/lib/python3.9/lib-dynload/_random.cpython-39d-x86_64-linux-gnu.so
0x7fcbe00ea190  0x7fcbe00efad0  Yes 
/home/arcivanov/Documents/src/arcivanov/pybuilder/target/venv/test/cpython-3.9.0.beta.4/lib/python3.9/lib-dynload/_sha512.cpython-39d-x86_64-linux-gnu.so
0x7fcbdfef05a0  0x7fcbdff012c9  Yes 
/home/arcivanov/Documents/src/arcivanov/pybuilder/target/venv/test/cpython-3.9.0.beta.4/lib/python3.9/lib-dynload/_datetime.cpython-39d-x86_64-linux-gnu.so
0x7fcbdfedd420  0x7fcbdfee607e  Yes 
/home/arcivanov/Documents/src/arcivanov/pybuilder/target/venv/test/cpython-3.9.0.beta.4/lib/python3.9/lib-dynload/_json.cpython-39d-x86_64-linux-gnu.so
0x7fcbdfed53f0  0x7fcbdfed734f  Yes 
/home/arcivanov/Documents/src/arcivanov/pybuilder/target/venv/test/cpython-3.9.0.beta.4/lib/python3.9/lib-dynload/_posixsubprocess.cpython-39d-x86_64-linux-gnu.so
0x7fcbdfeca400  0x7fcbdfecd9b2 

[issue41245] cmath module documentation is misleading on branch cuts

2020-07-08 Thread Mark Dickinson


Change by Mark Dickinson :


--
assignee:  -> docs@python
components: +Documentation
nosy: +docs@python
versions: +Python 3.10, Python 3.7, Python 3.8, Python 3.9

___
Python tracker 

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



[issue41246] IOCP Proactor same socket overlapped callbacks

2020-07-08 Thread Tony


New submission from Tony :

In IocpProactor I saw that the callbacks to the functions recv, recv_into, 
recvfrom, sendto, send and sendfile all give the same callback function for 
when the overlapped operation is done.

I just wanted cleaner code so I made a static function inside the class that I 
give to each of these functions as the overlapped callbacks.

--
messages: 373324
nosy: tontinton
priority: normal
severity: normal
status: open
title: IOCP Proactor same socket overlapped callbacks

___
Python tracker 

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



[issue41245] cmath module documentation is misleading on branch cuts

2020-07-08 Thread Mark Dickinson


Mark Dickinson  added the comment:

> the sign of x is used [...]

Correction: That should say "the sign of the imaginary part of x is used [...]"

--

___
Python tracker 

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



[issue41245] cmath module documentation is misleading on branch cuts

2020-07-08 Thread Mark Dickinson

New submission from Mark Dickinson :

The documentation for the cmath module is misleading on the behaviour near 
branch cuts. For example, the documentation for cmath.acos says:

   Return the arc cosine of x. There are two branch cuts: One
   extends right from 1 along the real axis to ∞, continuous
   from below. The other extends left from -1 along the real
   axis to -∞, continuous from above.

That "continuous from below" and "continuous from above" language is 
misleading; in fact what happens on the vast majority of systems (those for 
which the floating-point format used is IEEE 754 binary64), if the imaginary 
part of x is zero, the sign of x is used to determine which side of the branch 
cut x lies.

--
messages: 373323
nosy: mark.dickinson
priority: normal
severity: normal
status: open
title: cmath module documentation is misleading on branch cuts

___
Python tracker 

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



[issue41242] When concating strings, I think it is better to use += than join the list

2020-07-08 Thread Wansoo Kim


Wansoo Kim  added the comment:

Well... to be honest, I'm a little confused. bpo-41244 and this issue are 
completely opposite. I'm not used to Python community yet because it hasn't 
been long since I joined it.

You're saying that if a particular method is not dramatically good, we prefer 
to keep the existing one as it is, right?

Your comment was very helpful to me. Maybe I can learn one by one like this.

Thank you very much.

--

___
Python tracker 

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



[issue41244] Change to use str.join() instead of += when concatenating string

2020-07-08 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

Changes in bpo-41242 were rejected not because the new code is worse, but 
because it is not obviously and significantly better that the existing code. 
Here status quo wins for the same reasons. This rule saves us from endless 
rewriting the code and allows to focus on important things.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue41242] When concating strings, I think it is better to use += than join the list

2020-07-08 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

In this particular case the number of concatenations is limited, the resulting 
string is usually short, and the code is not performance critical (it is the 
__repr__ implementation). So there is no significant advantage of one way over 
other, and no way is obviously wrong. In such cases the status quo wins.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue41244] Change to use str.join() instead of += when concatenating string

2020-07-08 Thread Zachary Ware


Zachary Ware  added the comment:

That is not performance-critical code, and in that case it is clearer to use 
`+=` than str.join.

Closing the issue; Andrew or Yury can of course reopen it if they disagree with 
my assessment.

--
nosy: +zach.ware
resolution:  -> wont fix
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



[issue41244] Change to use str.join() instead of += when concatenating string

2020-07-08 Thread Wansoo Kim


Change by Wansoo Kim :


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

___
Python tracker 

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



[issue41244] Change to use str.join() instead of += when concatenating string

2020-07-08 Thread Wansoo Kim


New submission from Wansoo Kim :

https://bugs.python.org/issue41242

According to BPO-41242, it is better to use join than += when concatenating 
multiple strings.

https://github.com/python/cpython/blob/b26a0db8ea2de3a8a8e4b40e69fc8642c7d7cb68/Lib/asyncio/queues.py#L82

However, the link above uses += in the same pattern. I think we'd better change 
this to `str.join()`

--
components: asyncio
messages: 373317
nosy: asvetlov, ys19991, yselivanov
priority: normal
severity: normal
status: open
title: Change to use str.join() instead of += when concatenating string
type: enhancement

___
Python tracker 

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



[issue41194] Python 3.9.0b3 crash on compile() in PyAST_Check() when the _ast module is loaded more than once

2020-07-08 Thread Arcadiy Ivanov


Arcadiy Ivanov  added the comment:

I'm reopening this as the original SEGV didn't go away in 3.9 beta 4. It looks 
like debug build caught an assertion and prevented the SEGV from triggering.

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



[issue41243] SPAM

2020-07-08 Thread Zachary Ware


Change by Zachary Ware :


--
components:  -Interpreter Core
nosy:  -Deon257
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



[issue41243] SPAM

2020-07-08 Thread Zachary Ware


Change by Zachary Ware :


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

___
Python tracker 

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



[issue41242] When concating strings, I think it is better to use += than join the list

2020-07-08 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

Remi is correct.
Closing the issue.

--

___
Python tracker 

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



[issue41242] When concating strings, I think it is better to use += than join the list

2020-07-08 Thread Andrew Svetlov


Change by Andrew Svetlov :


--
resolution:  -> wont fix
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



[issue33840] connection limit on listening socket in asyncio

2020-07-08 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


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

___
Python tracker 

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



[issue41243] SPAM

2020-07-08 Thread Steven D'Aprano


Change by Steven D'Aprano :


--
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed
title: Android Game -> SPAM
type: security -> 

___
Python tracker 

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



[issue33840] connection limit on listening socket in asyncio

2020-07-08 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


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

___
Python tracker 

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



[issue41243] Android Game

2020-07-08 Thread Deon


New submission from Deon :

Download FIFA 14 apk

https://apkgreat.com/fifa-14-apk/

--
components: Interpreter Core
messages: 373315
nosy: Deon257
priority: normal
severity: normal
status: open
title: Android Game
type: security
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



[issue33840] connection limit on listening socket in asyncio

2020-07-08 Thread Deon


Deon  added the comment:

Download FIFA 14 apk
https://apkgreat.com/fifa-14-apk/

--

___
Python tracker 

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



[issue33840] connection limit on listening socket in asyncio

2020-07-08 Thread Deon


Deon  added the comment:

hi

--
nosy: +Deon257

___
Python tracker 

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



[issue41242] When concating strings, I think it is better to use += than join the list

2020-07-08 Thread Rémi Lapeyre

Rémi Lapeyre  added the comment:

Hi Wansoo, using += instead of str.join() is less performant. Concatenating n 
strings with + will create and allocate n new strings will str.join() will 
carefully look ahead and allocate the correct amount of memory and do all 
concatenation at one:


➜  ~ python3 -m timeit -s 's = ""' 'for i in range(1_000_000): s += "foo\n"'
5 loops, best of 5: 107 msec per loop
➜  ~ python3 -m timeit -s 'l = ["foo"]*1_000_000' '"\n".join(l)'
20 loops, best of 5: 9.96 msec per loop


It's a common idiom that you will meet a lot in Python.

--
nosy: +remi.lapeyre

___
Python tracker 

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



[issue22239] asyncio: nested event loop

2020-07-08 Thread mike bayer


mike bayer  added the comment:

I tested "cancellation", shutting down the DB connection mid query.  Because 
the greenlet is only in the middle and not at the endpoints, it propagates the 
exception and there does not seem to be anything different except for the 
greenlet sequence in the middle, which is also clear:

https://gist.github.com/zzzeek/9e0d78eff14b3bbd5cf12fed8b02bce6

the first comment on the gist has the stack trace produced.

--

___
Python tracker 

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



[issue41242] When concating strings, I think it is better to use += than join the list

2020-07-08 Thread Wansoo Kim


Change by Wansoo Kim :


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

___
Python tracker 

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



[issue41242] When concating strings, I think it is better to use += than join the list

2020-07-08 Thread Wansoo Kim


New submission from Wansoo Kim :

Hello

I think it's better to use += than list.join() when concating strings.

This is more intuitive than other methods.

Also, I personally think it is not good for one variable to change to another 
type during runtime.

https://github.com/python/cpython/blob/b26a0db8ea2de3a8a8e4b40e69fc8642c7d7cb68/Lib/asyncio/base_events.py#L826

If you look at the link above, `msg` was a list type at first, in the end 
 become a str type.

--
components: asyncio
messages: 373310
nosy: asvetlov, ys19991, yselivanov
priority: normal
severity: normal
status: open
title: When concating strings, I think it is better to use += than join the list
type: enhancement

___
Python tracker 

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



[issue41241] Unnecessary Type casting in 'if condition'

2020-07-08 Thread Wansoo Kim


Change by Wansoo Kim :


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

___
Python tracker 

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



[issue41241] Unnecessary Type casting in 'if condition'

2020-07-08 Thread Wansoo Kim


New submission from Wansoo Kim :

Hello!

When using 'if syntax', casting condition to bool type is unnecessary. Rather, 
it only occurs overhead.

https://github.com/python/cpython/blob/b26a0db8ea2de3a8a8e4b40e69fc8642c7d7cb68/Lib/asyncio/futures.py#L118

If you look at the link above, the `val` has been cast to bool type. This works 
well without bool casting.

This issue is my first issue. So if you have a problem, please tell me!

Thanks You!

--
components: asyncio
messages: 373309
nosy: asvetlov, ys19991, yselivanov
priority: normal
severity: normal
status: open
title: Unnecessary Type casting in 'if condition'
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



[issue41073] [C API] PyType_GetSlot() should accept static types

2020-07-08 Thread hai shi


Change by hai shi :


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

___
Python tracker 

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



[issue41239] SSL Certificate verify failed in Python3.6/3.7

2020-07-08 Thread Christian Heimes


Christian Heimes  added the comment:

I'm afraid I have to close this issue as OUT-OF-DATE. It's either a bug in 
pywbem or a 3.6-only bug. Python 3.6 is in security maintenance mode and no 
longer receive bug fixes.

I suggest that you take this issue to pywbem bug tracker and get assistance 
there.

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



[issue16396] Importing ctypes.wintypes on Linux gives a ValueError instead of an ImportError

2020-07-08 Thread Jason R. Coombs


Change by Jason R. Coombs :


--
pull_requests: +20542
pull_request: https://github.com/python/cpython/pull/21394

___
Python tracker 

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



[issue22239] asyncio: nested event loop

2020-07-08 Thread mike bayer


mike bayer  added the comment:

as far as cancellation, I gather you're referring to what in gevent / greenlet 
is the GreenletExit exception.  Sure, that thing is a PITA.   Hence we're all 
working to provide asyncio frontends and networking backends so that the 
effects of cancellation I (handwavy handwavy) believe would work smoothly as 
long as the middle part is done right.   cancellation is likely a more 
prominent issue with HTTP requests and responses because users are hitting 
their browser stop buttons all the time.  With databases this typically is 
within the realm of network partitioning or service restarts, or if the driver 
is screwing up in some way which with the monkeypatching thing is more likely, 
but "cancellation" from a database perspective is not the constant event that I 
think it would be in an HTTP perspective.


> I think I either disagree or am missing something :-). Certainly for both 
> edgedb and urllib3, when they're running in sync mode, they end up using 
> synchronous network APIs at the "bottom", and it works fine.

OK it took me a minute to understand what you're saying, which is, if we are 
doing the coroutine.send() thing you illustrated below, we're not in an event 
loop anyway so we can just call blocking code.   OK I did not understand that.  
I haven't looked at the coroutine internals through all of this (which is part 
of my original assertion that I should not have been the person proposing this 
whole greenlet thing anyway :) ).

Why did urllib3 write unasync?  https://pypi.org/project/unasync/strictly 
so they can have a python 2 codebase and that's it?   

SQLAlchemy goes python 3 only in version 2.0.  I did bench the coro example 
against a non-coro example and it's 3x slower likely due to the StopIteration 
but as mentioned earlier if this is only once per front-to-back then it would 
not amount to anything in context.   Still, the risk factor of a rewrite like 
that, where risk encompasses just all the dumb mistakes and bugs that would be 
introduced by rewriting everything, does not seem worth it.

--

___
Python tracker 

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



  1   2   >