[issue40847] New parser considers empty line following a backslash to be a syntax error, old parser didn't

2020-06-02 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
nosy: +gvanrossum, lys.nikolaou

___
Python tracker 

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



[issue40848] compile() can compile a bare starred expression with `PyCF_ONLY_AST` flag with the old parser, but not the new one

2020-06-02 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Yeah, this is not a bug as Serhiy points out. Regarding the error message, we 
are currently working on trying to unify the error messages in the the parser 
as much as we can but there is also no promise that they will match 100%.

Many grammar checks currently are done outside the parser (we mention it on  
PEP617) so I am not surprised that the old parser is ok with some invalid 
expressions and PyCF_ONLY_AST. This is one of the things we are trying to 
change with the new parser precisely.

I will close for now as "not a bug". Feel free to reopen if you think we missed 
something or if something was left to discuss.

--
resolution:  -> not a bug
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



[issue40222] "Zero cost" exception handling

2020-06-02 Thread Chris Jerdonek


Chris Jerdonek  added the comment:

To clarify, would there be any observable difference in behavior aside from 
speed? And would there be any limitations in when the speedup can be applied?

--
nosy: +chris.jerdonek

___
Python tracker 

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



[issue40851] subprocess.Popen: impossible to show console window when shell=True

2020-06-02 Thread Eryk Sun


Eryk Sun  added the comment:

I think you have the right idea for improving the behavior here. It should skip 
setting wShowWindow if startupinfo already has the flag STARTF_USESHOWWINDOW. 
For example:

if shell:
comspec = os.environ.get("COMSPEC", "cmd.exe")
args = '{} /c "{}"'.format (comspec, args)
if not startupinfo.dwFlags & _winapi.STARTF_USESHOWWINDOW:
startupinfo.dwFlags |= _winapi.STARTF_USESHOWWINDOW
startupinfo.wShowWindow = _winapi.SW_HIDE

--
components: +Library (Lib)
nosy: +eryksun
stage:  -> needs patch
type:  -> enhancement
versions:  -Python 3.5, Python 3.6, Python 3.7

___
Python tracker 

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



[issue40850] Programming FAQ - variables local to the lambdas

2020-06-02 Thread SilentGhost


SilentGhost  added the comment:

I don't think your suggestion improve readability there. I think explanation 
following the code example does a decent job without being overly verbose.

Regarding, memoization, it is mentioned in [0], right after describing the 
technique. So, I'm not sure why you had to specifically look it up or why you 
still suspect that memorisation would be correct

[0]: 
https://docs.python.org/3/faq/programming.html#why-are-default-values-shared-between-objects

--
nosy: +SilentGhost

___
Python tracker 

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



[issue40851] subprocess.Popen: impossible to show console window when shell=True

2020-06-02 Thread akdor1154


New submission from akdor1154 :

Hi all,
It seems impossible to show a new console window with calling subprocess.Popen 
on windows with shell=True.

Attempt:
si = subprocess.STARTUPINFO()
si.dwFlags = subprocess.STARTF_USESHOWWINDOW
si.wShowWindow = 5
proc = Popen(
cmd, cwd=runFolder, creationflags=subprocess.CREATE_NEW_CONSOLE, 
shell=True,
startupinfo=si
)

In the current source, it looks like this is due to the block in 
https://github.com/python/cpython/blob/master/Lib/subprocess.py#L1405 , which 
unreservedly wipes wShowWindow even if I have provided it.

Testing on Python 3.6 but I am assuming this affects all versions.

--
components: Windows
messages: 370639
nosy: akdor1154, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: subprocess.Popen: impossible to show console window when shell=True
versions: Python 3.10, Python 3.5, Python 3.6, 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



[issue39573] [C API] Make PyObject an opaque structure in the limited C API

2020-06-02 Thread STINNER Victor


STINNER Victor  added the comment:

> bpo-39573: Convert Py_TYPE() to a static inline function (GH-20290)

This change broke pycurl:
https://github.com/pycurl/pycurl/pull/636

Extract of its current code:
"""
/* Initialize the type of the new type objects here; doing it here
 * is required for portability to Windows without requiring C++. */
p_Curl_Type = &Curl_Type;
p_CurlMulti_Type = &CurlMulti_Type;
p_CurlShare_Type = &CurlShare_Type;
Py_TYPE(&Curl_Type) = &PyType_Type; 
Py_TYPE(&CurlMulti_Type) = &PyType_Type; 
Py_TYPE(&CurlShare_Type) = &PyType_Type; 
"""

--

___
Python tracker 

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



[issue40521] [subinterpreters] Make free lists and unicode caches per-interpreter

2020-06-02 Thread STINNER Victor


Change by STINNER Victor :


Removed file: https://bugs.python.org/file49211/bench_tuple.patch

___
Python tracker 

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



[issue40521] [subinterpreters] Make free lists and unicode caches per-interpreter

2020-06-02 Thread STINNER Victor


Change by STINNER Victor :


Added file: https://bugs.python.org/file49212/bench_tuple.patch

___
Python tracker 

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



[issue40521] [subinterpreters] Make free lists and unicode caches per-interpreter

2020-06-02 Thread STINNER Victor


Change by STINNER Victor :


Removed file: https://bugs.python.org/file49210/microbench_tuple.py

___
Python tracker 

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



[issue40521] [subinterpreters] Make free lists and unicode caches per-interpreter

2020-06-02 Thread STINNER Victor


Change by STINNER Victor :


Added file: https://bugs.python.org/file49213/microbench_tuple.py

___
Python tracker 

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



[issue40850] Programming FAQ - variables local to the lambdas

2020-06-02 Thread Rainald Koch


New submission from Rainald Koch :

In section [10] of the FAQ, I whould add "(a function parameter with different 
default values)" after "variables local to the lambdas".

Besides, I had to look up "memoizing" [2] and suspect that "memorizing" would 
be correct.

[10] 
https://docs.python.org/3/faq/programming.html#why-do-lambdas-defined-in-a-loop-with-different-values-all-return-the-same-result
[2] https://en.wikipedia.org/wiki/Memoization

--
assignee: docs@python
components: Documentation
messages: 370637
nosy: Rainald Koch, docs@python
priority: normal
severity: normal
status: open
title: Programming FAQ - variables local to the lambdas
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



[issue40521] [subinterpreters] Make free lists and unicode caches per-interpreter

2020-06-02 Thread STINNER Victor


Change by STINNER Victor :


Added file: https://bugs.python.org/file49211/bench_tuple.patch

___
Python tracker 

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



[issue40521] [subinterpreters] Make free lists and unicode caches per-interpreter

2020-06-02 Thread STINNER Victor


STINNER Victor  added the comment:

Microbenchmark for tuple free list to measure PR 20247 overhead: 
microbench_tuple.py. It requires to apply bench_tuple.patch.

--
Added file: https://bugs.python.org/file49210/microbench_tuple.py

___
Python tracker 

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



[issue19217] Calling assertEquals for moderately long list takes too long

2020-06-02 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



[issue32604] [subinterpreters] PEP 554 implementation: add interpreters module

2020-06-02 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +19829
pull_request: https://github.com/python/cpython/pull/20600

___
Python tracker 

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



[issue17305] IDNA2008 encoding is missing

2020-06-02 Thread Christian Heimes


Christian Heimes  added the comment:

BPO #40845 is another case of IDNA 2003 / 2008 bug.

--

___
Python tracker 

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



[issue40845] idna encoding fails for Cherokee symbols

2020-06-02 Thread Christian Heimes


Christian Heimes  added the comment:

There are two IDNA standard. Python's standard library only provides IDNA 2003 
and does not support IDNA 2008.

# IDNA 2003
>>> '\u13e3\u13b3\u13a9'.encode('idna')
b'xn--tz9ata7l'
# idna package with IDNA 2008
>>> idna.encode('\u13e3\u13b3\u13a9')
b'xn--f9dt7l'

The bug report is a duplicate of #17305.

--
nosy: +christian.heimes
resolution:  -> duplicate
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



[issue19217] Calling assertEquals for moderately long list takes too long

2020-06-02 Thread Trey Hunner


Trey Hunner  added the comment:

This is a bug for string comparisons as well. I just had to manually 
reimplement assertMultiLineEqual (which doesn't call assertSequenceEqual) on 
one of my test classes to workaround this issue.

--
nosy: +trey
versions: +Python 3.7, Python 3.8, Python 3.9

___
Python tracker 

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



[issue32604] [subinterpreters] PEP 554 implementation: add interpreters module

2020-06-02 Thread STINNER Victor


STINNER Victor  added the comment:

The following test is enough to reproduce the leak:
---
import unittest
import _xxsubinterpreters as _interpreters

class TestInterpreterDestroy(unittest.TestCase):

def tearDown(self):
for interp_id in _interpreters.list_all():
if interp_id == 0:  # main
continue
_interpreters.destroy(interp_id)

def test_from_current(self):
interp_id = _interpreters.create(isolated=True)
_interpreters.run_string(interp_id, "import select")
---

--

___
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-06-02 Thread Yury Selivanov


Yury Selivanov  added the comment:

This has long been implemented: 
https://docs.python.org/3/library/contextlib.html#contextlib.asynccontextmanager

--
nosy: +yselivanov

___
Python tracker 

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



[issue40845] idna encoding fails for Cherokee symbols

2020-06-02 Thread SilentGhost


SilentGhost  added the comment:

I took it from your msg370615: 

> of even more reliable
> Execute '\u13e3\u13b3\u13a9'.encode('idna')

--

___
Python tracker 

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



[issue40845] idna encoding fails for Cherokee symbols

2020-06-02 Thread Roman Akopov

Roman Akopov  added the comment:

This is how I extract data from Common Locale Data Repository v37
script assumes common\main working directory

from os import walk
from xml.etree import ElementTree

en_root = ElementTree.parse('en.xml')

for (dirpath, dirnames, filenames) in walk('.'):
for filename in filenames:
if filename.endswith('.xml'):
code = filename[:-4]
xx_root = ElementTree.parse(filename)
xx_lang = 
xx_root.find('localeDisplayNames/languages/language[@type=\'' + code + '\']')
en_lang = 
en_root.find('localeDisplayNames/languages/language[@type=\'' + code + '\']')

if en_lang.text == 'Cherokee':
print(en_lang.text)
print(xx_lang.text)
print(xx_lang.text.encode("unicode_escape"))
print(xx_lang.text.encode('idna'))
print(ord(xx_lang.text[0]))
print(ord(xx_lang.text[1]))
print(ord(xx_lang.text[2]))

script outputs

Cherokee
ᏣᎳᎩ
b'\\u13e3\\u13b3\\u13a9'
b'xn--tz9ata7l'
5091
5043
5033

If I change text to lower case

print(en_lang.text.lower())
print(xx_lang.text.lower())
print(xx_lang.text.lower().encode("unicode_escape"))
print(xx_lang.text.lower().encode('idna'))
print(ord(xx_lang.text.lower()[0]))
print(ord(xx_lang.text.lower()[1]))
print(ord(xx_lang.text.lower()[2]))

then script outputs

cherokee
ꮳꮃꭹ
b'\\uabb3\\uab83\\uab79'
b'xn--tz9ata7l'
43955
43907
43897

I am not sure where do you get '\u13e3\u13b3\u13a9' string. 
'\u13e3\u13b3\u13a9'.lower().encode('unicode_escape') gives 
b'\\uabb3\\uab83\\uab79'

--

___
Python tracker 

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



[issue40849] Expose X509_V_FLAG_PARTIAL_CHAIN ssl flag

2020-06-02 Thread Christian Heimes


Christian Heimes  added the comment:

Thanks for the patch!

I'm still pondering if I prefer VERIFY_PARTIAL_CHAIN over 
VERIFY_X509_PARTIAL_CHAIN. The string X509 is not meaningful here but fits with 
the other, much older flags.

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



[issue40848] compile() can compile a bare starred expression with `PyCF_ONLY_AST` flag with the old parser, but not the new one

2020-06-02 Thread Adam Williamson


Adam Williamson  added the comment:

Realized I forgot to give it, so in case it's important, the context here is 
the black test suite:

https://github.com/psf/black/issues/1441

that test suite has a file full of expressions that it expects to be able to 
parse this way (it uses `ast.parse()`, which in turn calls `compile()` with 
this flag). A bare (*starred) line is part of that file:

https://github.com/psf/black/blob/master/tests/data/expression.py#L149

and has been for as long as black has existed. Presumably if this isn't going 
to be fixed we'll need to adapt this black test file to test a starred 
expression in a 'valid' way, somehow.

--

___
Python tracker 

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



[issue10631] ZipFile and current directory change

2020-06-02 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
resolution:  -> out of date
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



[issue40848] compile() can compile a bare starred expression with `PyCF_ONLY_AST` flag with the old parser, but not the new one

2020-06-02 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

There is no promise that the parser can parse invalid Python code. I think 
there is no a bug here.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue40846] Misleading line in documentation

2020-06-02 Thread Jim Fasarakis-Hilliard


Jim Fasarakis-Hilliard  added the comment:

A simple substitution of 'types' with 'kind' should do it. This aligns with the 
terminology [1] used in the glossary.

[1] https://docs.python.org/3/glossary.html#term-parameter

--
nosy: +Jim Fasarakis-Hilliard

___
Python tracker 

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



[issue40563] Support pathlike objects on dbm/shelve

2020-06-02 Thread Sam Bull


Change by Sam Bull :


--
nosy: +dreamsorcerer

___
Python tracker 

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



[issue40844] Alternate ways of running coroutines

2020-06-02 Thread Yury Selivanov


Change by Yury Selivanov :


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



[issue40844] Alternate ways of running coroutines

2020-06-02 Thread Yury Selivanov


Yury Selivanov  added the comment:

> I'm suggesting a method on coroutines that runs them without blocking, and 
> will run a callback when it's complete.

And how would that method be implemented? Presumably the event loop would 
execute the coroutine, but that API is already there, and it's called 
create_task.  We will not be adding a builtin method for this.

You can use Task.add_done_callback() to add a callback.

--

___
Python tracker 

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



[issue40847] New parser considers empty line following a backslash to be a syntax error, old parser didn't

2020-06-02 Thread Christian Heimes


Change by Christian Heimes :


--
nosy: +christian.heimes

___
Python tracker 

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



[issue40848] compile() can compile a bare starred expression with `PyCF_ONLY_AST` flag with the old parser, but not the new one

2020-06-02 Thread Christian Heimes


Change by Christian Heimes :


--
nosy: +christian.heimes

___
Python tracker 

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



[issue40847] New parser considers empty line following a backslash to be a syntax error, old parser didn't

2020-06-02 Thread Christian Heimes


Change by Christian Heimes :


--
nosy: +benjamin.peterson, brett.cannon, pablogsal, yselivanov
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



[issue40848] compile() can compile a bare starred expression with `PyCF_ONLY_AST` flag with the old parser, but not the new one

2020-06-02 Thread Christian Heimes


Change by Christian Heimes :


--
nosy: +benjamin.peterson, brett.cannon, pablogsal, yselivanov
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



[issue40846] Misleading line in documentation

2020-06-02 Thread Rémi Lapeyre

Rémi Lapeyre  added the comment:

Hi, thanks for pointing this out.

I think "type" here is not about the type of the object but whether it is:

 - positional-only
 - positional or keyword
 - variadic positional
 - keyword-only
 - variadic keyword


The wording could certainly be improved as it is currently unclear. Could you 
make a suggestion and open a PR?

--
nosy: +remi.lapeyre

___
Python tracker 

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



[issue40849] Expose X509_V_FLAG_PARTIAL_CHAIN ssl flag

2020-06-02 Thread l0x


New submission from l0x :

This simple patch exposes OpenSSL's X509_V_FLAG_PARTIAL_CHAIN if it is defined. 
This lets us  trust a certificate if it is signed by a certificate in the trust 
store, even if that CA is not a root CA. It makes it possible to trust an 
intermediate CA without trusting the root and all the other intermediate CAs it 
has signed.

--
assignee: christian.heimes
components: SSL
messages: 370621
nosy: christian.heimes, l0x
priority: normal
pull_requests: 19828
severity: normal
status: open
title: Expose X509_V_FLAG_PARTIAL_CHAIN ssl flag
type: enhancement

___
Python tracker 

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



[issue40848] compile() can compile a bare starred expression with `PyCF_ONLY_AST` flag with the old parser, but not the new one

2020-06-02 Thread Batuhan Taskaya


Change by Batuhan Taskaya :


--
nosy: +BTaskaya

___
Python tracker 

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



[issue40848] compile() can compile a bare starred expression with `PyCF_ONLY_AST` flag with the old parser, but not the new one

2020-06-02 Thread Adam Williamson


New submission from Adam Williamson :

Not 100% sure this would be considered a bug, but it seems at least worth 
filing to check. This is a behaviour difference between the new parser and the 
old one. It's very easy to reproduce:

 sh-5.0# PYTHONOLDPARSER=1 python3
Python 3.9.0b1 (default, May 29 2020, 00:00:00) 
[GCC 10.1.1 20200507 (Red Hat 10.1.1-1)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from _ast import *
>>> compile("(*starred)", "", "exec", flags=PyCF_ONLY_AST)

>>> 
 sh-5.0# python3
Python 3.9.0b1 (default, May 29 2020, 00:00:00) 
[GCC 10.1.1 20200507 (Red Hat 10.1.1-1)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from _ast import *
>>> compile("(*starred)", "", "exec", flags=PyCF_ONLY_AST)
Traceback (most recent call last):
  File "", line 1, in 
  File "", line 1
(*starred)
  ^
SyntaxError: invalid syntax

That is, you can compile() the expression "(*starred)" with PyCF_ONLY_AST flag 
set with the old parser, but not with the new one. Without PyCF_ONLY_AST you 
get a SyntaxError with both parsers, though a with the old parser, the error 
message is "can't use starred expression here", not "invalid syntax".

--
components: Interpreter Core
messages: 370620
nosy: adamwill
priority: normal
severity: normal
status: open
title: compile() can compile a bare starred expression with `PyCF_ONLY_AST` 
flag with the old parser, but not the new one
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



[issue10631] ZipFile and current directory change

2020-06-02 Thread Zackery Spytz


Zackery Spytz  added the comment:

Python 2 is EOL, so I think this issue should be closed.

--
nosy: +ZackerySpytz

___
Python tracker 

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



[issue40847] New parser considers empty line following a backslash to be a syntax error, old parser didn't

2020-06-02 Thread Adam Williamson


New submission from Adam Williamson :

While debugging issues with the black test suite in Python 3.9, I found one 
which black upstream says is a Cpython issue, so I'm filing it here.

Reproduction is very easy. Just use this four-line tester:

print("hello, world")
\

print("hello, world 2")

with that saved as `test.py`, check the results:

 sh-5.0# PYTHONOLDPARSER=1 python3 test.py
hello, world
hello, world 2
 sh-5.0# python3 test.py
  File "/builddir/build/BUILD/black-19.10b0/test.py", line 3

^
SyntaxError: invalid syntax

The reason black has this test (well, a similar test - in black's test, the 
file *starts* with the backslash then the empty line, but the result is the 
same) is covered in https://github.com/psf/black/issues/922 and 
https://github.com/psf/black/pull/948 .

--
components: Interpreter Core
messages: 370618
nosy: adamwill
priority: normal
severity: normal
status: open
title: New parser considers empty line following a backslash to be a syntax 
error, old parser didn't
type: behavior
versions: Python 3.9

___
Python tracker 

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



[issue40845] idna encoding fails for Cherokee symbols

2020-06-02 Thread SilentGhost

SilentGhost  added the comment:

For the record:

>>> 'ꮳꮃꭹ'.encode('punycode')
b'tz9ata7l'
>>> '\u13e3\u13b3\u13a9'.encode('punycode')
b'f9dt7l'

Also, your unicode-escaped string is an upper-cased version of the first string.

--
nosy: +SilentGhost

___
Python tracker 

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



[issue40846] Misleading line in documentation

2020-06-02 Thread J Arun Mani


New submission from J Arun Mani :

Hi.

 In docs : 
https://docs.python.org/3/faq/programming.html#faq-argument-vs-parameter it 
says "Parameters define what types of arguments a function can accept."
 This is not true. Python's functions do not impose any type checking or raise 
error when the argument's type is not matching it's type hint. Please change 
the line to a better one. Maybe "Parameters define the names that will hold the 
supplied arguments."

Thanks ^^

--
assignee: docs@python
components: Documentation
messages: 370616
nosy: J Arun Mani, docs@python
priority: normal
severity: normal
status: open
title: Misleading line in documentation

___
Python tracker 

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



[issue40845] idna encoding fails for Cherokee symbols

2020-06-02 Thread Roman Akopov

New submission from Roman Akopov :

For a specific Cherokee string of three symbols b'\\u13e3\\u13b3\\u13a9' 
generating punycode representation fails.

What steps will reproduce the problem?

Execute 'ꮳꮃꭹ'.encode('idna')
of even more reliable
Execute '\u13e3\u13b3\u13a9'.encode('idna')

What is the expected result?

'xn--f9dt7l'

What happens instead?

'xn--tz9ata7l'

Version affected.

Tested on Python 3.8.3 Windows and Python 3.6.8 CentOS.

Other information.

I was testing if our product supports internationalized domain names. So I had 
written a Python script which generated DNS zone file with punycode encoded 
names and JavaScript file for a browser to send requests to URLs containing 
internationalized domain names. Strings were taken from Common Locale Data 
Repository. 193 various URL, one per language.
 
When executed in Google Chrome, Mozilla Firefox and Microsoft EDGE, domain name 
'ꮳꮃꭹ.myhost.local' is converted to 'xn--f9dt7l.myhost.local', but we have 
'xn--tz9ata7l.myhost.local' in DNS zone file and this is how I had found the 
bug. For 192 other languages I have tested everything works just fine. hese are 
Afrikaans, Aghem, Akan, Amharic, Arabic, Assamese, Asu, Asturian, Azerbaijani, 
Basaa, Belarusian, Bemba, Bena, Bulgarian, Bambara, Bangla, Tibetan, Breton, 
Bodo, Bosnian, Catalan, Chakma, Chechen, Cebuano, Chiga, Czech, Church Slavic, 
Welsh, Danish, Taita, German, Zarma, Lower Sorbian, Duala, Jola-Fonyi, 
Dzongkha, Embu, Ewe, Greek, English, Esperanto, Spanish, Estonian, Basque, 
Ewondo, Persian, Fulah, Finnish, Filipino, Faroese, French, Friulian, Western 
Frisian, Irish, Scottish Gaelic, Galician, Swiss German, Gujarati, Gusii, Manx, 
Hausa, Hebrew, Hindi, Croatian, Upper Sorbian, Hungarian, Armenian, 
Interlingua, Indonesian, Sichuan Yi, Icelandic, Italian, Japanese, Ngomba, 
Machame, Javanese, Georgian, Kabyle, Kamba, Makonde, Kabuverdianu, Kikuyu, 
Kako, Kalaallisut, Kalenjin, Khmer, Kannada, Korean, Konkani, Kashmiri, 
Shambala, Bafia, Colognian, Kurdish, Cornish, Kyrgyz, Langi, Luxembourgish, 
Ganda, Lakota, Lingala, Lao, Lithuanian, Luba-Katanga, Luo, Luyia, Latvian, 
Maithili, Masai, Meru, Malagasy, Makhuwa-Meetto, Metaʼ, Maori, Macedonian, 
Malayalam, Mongolian, Manipuri, Marathi, Malay, Maltese, Mundang, Burmese, 
Mazanderani, Nama, North Ndebele, Low German, Nepali, Dutch, Kwasio, Norwegian 
Nynorsk, Nyankole, Oromo, Odia, Ossetic, Punjabi, Polish, Prussian, Pashto, 
Portuguese, Quechua, Romansh, Rundi, Romanian, Rombo, Russian, Kinyarwanda, 
Rwa, Samburu, Santali, Sangu, Sindhi, Northern Sami, Sena, Sango, Tachelhit, 
Sinhala, Slovak, Slovenian, Inari Sami, Shona, Somali, Albanian, Serbian, 
Swedish, Swahili, Tamil, Telugu, Teso, Tajik, Thai, Tigrinya, Turkish, Tatar, 
Uyghur, Ukrainian, Urdu, Uzbek, Vai, Volapük, Vunjo, Walser, Wolof, Xhosa, 
Soga, Yangben, Yiddish, Cantonese, Standard Moroccan Tamazight, Chinese, 
Traditional Chinese, Zulu.

Somehow specifically Cherokee code points trigger the bug.

On top of that, https://www.punycoder.com/ converts 'ꮳꮃꭹ' into 'xn--f9dt7l' and 
back. However 'xn--tz9ata7l' is reported as an invalid punycode.

--
components: Unicode
messages: 370615
nosy: Roman Akopov, ezio.melotti, vstinner
priority: normal
severity: normal
status: open
title: idna encoding fails for Cherokee symbols
type: behavior
versions: Python 3.6, Python 3.7, Python 3.8

___
Python tracker 

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



[issue40844] Alternate ways of running coroutines

2020-06-02 Thread Matthew Francis


New submission from Matthew Francis <4576fran...@gmail.com>:

Currently, using await inside a coroutine will block inside the coroutine.  
This behavior would usually be fine, but for some usecases a way to 
nonblockingly run coroutines without creating a Task could be useful, because 
tasks don't allow for a callback.  I'm suggesting a method on coroutines that 
runs them without blocking, and will run a callback when it's complete.

--
components: asyncio
messages: 370614
nosy: asvetlov, matthewfrancis, yselivanov
priority: normal
severity: normal
status: open
title: Alternate ways of running coroutines
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



[issue35078] Allow customization of CSS class name of a month in calendar module

2020-06-02 Thread Walter Dörwald

Change by Walter Dörwald :


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



[issue40825] Add a "strict" parameter to csv.writer and csv.DictWriter

2020-06-02 Thread Eric V. Smith


Eric V. Smith  added the comment:

I wouldn't have a problem with isinstance(obj, str) for a string check in 
strict mode. If you want to write something like a Path, convert it to a string 
yourself. That's exactly the behavior I'd like enforced by strict: only accept 
numbers and actual strings.

--

___
Python tracker 

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



[issue40222] "Zero cost" exception handling

2020-06-02 Thread Dong-hee Na


Dong-hee Na  added the comment:

+1

--
nosy: +corona10

___
Python tracker 

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



[issue40843] tarfile: ignore_zeros = True exceedingly slow on a sparse tar file

2020-06-02 Thread mxmlnkn


New submission from mxmlnkn :

Consider this example replicating a real use case where I was downloading the 
1.191TiB ImageNet in sequential order for ~1GiB in order to preview it:

echo "foo" > bar
tar cf sparse.tar bar


#!/usr/bin/env python3
# -*- coding: utf-8 -*-

import os
import tarfile
import time

t0 = time.time()
for tarInfo in tarfile.open( 'sparse.tar', 'r:', ignore_zeros = True ):
pass
t1 = time.time()
print( f"Small TAR took {t1 - t0}s to iterate over" )

f = open( 'sparse.tar', 'wb' )
f.truncate( 2*1024*1024*1024 )
f.close()

t0 = time.time()
for tarInfo in tarfile.open( 'sparse.tar', 'r:', ignore_zeros = True ):
pass
t1 = time.time()
print( f"Small TAR with sparse tail took {t1 - t0}s to iterate over" )


Output:

Small TAR took 0.00020813941955566406s to iterate over
Small TAR with sparse tail took 6.999570846557617s to iterate over


So, iterating over sparse holes takes tarfile ~300MiB/s. Which sounds fast but 
is really slow for 1.2TiB and when thinking about it as tarfile doing basically 
>nothing<.

There should be better options like using os.lseek with os.SEEK_DATA if 
available to skip those empty holes.

An alternative would be an option to tell tarfile how many zeros it should at 
maximum skip.
Personally, I only use the ignore_zeros option to be able to work with 
concatenated TARs, which in my case only have up to 19*512 byte empty tar 
blocks to be skipped. Anything longer would indicate an invalid file. I'm aware 
that these maximum runs of zeros vary depending on the tar blocking factor, so 
it should be adjustable.

--
messages: 370611
nosy: mxmlnkn
priority: normal
severity: normal
status: open
title: tarfile: ignore_zeros = True exceedingly slow on a sparse tar file
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



[issue40232] PyOS_AfterFork_Child() should use _PyThread_at_fork_reinit()

2020-06-02 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 45b34a04a577aa49fa4825421758c3e8eaa1625d by Victor Stinner in 
branch 'master':
bpo-40232: _PyImport_ReInitLock() can now safely use its lock (GH-20597)
https://github.com/python/cpython/commit/45b34a04a577aa49fa4825421758c3e8eaa1625d


--

___
Python tracker 

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



[issue40222] "Zero cost" exception handling

2020-06-02 Thread Yonatan Goldschmidt


Change by Yonatan Goldschmidt :


--
nosy: +Yonatan Goldschmidt

___
Python tracker 

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



[issue40826] PyOS_InterruptOccurred() now requires to hold the GIL: PyOS_Readline() crash

2020-06-02 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +19827
pull_request: https://github.com/python/cpython/pull/20599

___
Python tracker 

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



[issue40232] PyOS_AfterFork_Child() should use _PyThread_at_fork_reinit()

2020-06-02 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +19826
pull_request: https://github.com/python/cpython/pull/20597

___
Python tracker 

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



[issue40793] print() performance problem with very large numbers

2020-06-02 Thread U.W.


U.W.  added the comment:

Well, the number in itself is not so useful, but...

- I encountered a performance problem in Python where I did not expect one
- Other people will encounter that, too, and now they easily find the reason 
behind it (I would not have opened this bug if I had found an explanation)
- Hopefully someone is bored enough to fix it and that will make Python an even 
better tool than it is already. This number can then be used as an example to 
recretew the problem and verify the solution.

- Hopefully no bad guy exploits this weakness by sending large numbers like 
this one to servers just to see if it triggers a denial of service...

--

___
Python tracker 

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



[issue40512] [subinterpreters] Meta issue: per-interpreter GIL

2020-06-02 Thread STINNER Victor


STINNER Victor  added the comment:

Currently, the import lock is shared by all interpreters. It would also help 
for performance to make it per-interpreter to parallelize imports.

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



[issue39465] [subinterpreters] Design a subinterpreter friendly alternative to _Py_IDENTIFIER

2020-06-02 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 297257f7bc198e2dc8e0866b539c73ff1a5cc588 by Victor Stinner in 
branch 'master':
bpo-39465: Cleanup _PyUnicode_FromId() code (GH-20595)
https://github.com/python/cpython/commit/297257f7bc198e2dc8e0866b539c73ff1a5cc588


--

___
Python tracker 

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



[issue39465] [subinterpreters] Design a subinterpreter friendly alternative to _Py_IDENTIFIER

2020-06-02 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +19825
pull_request: https://github.com/python/cpython/pull/20595

___
Python tracker 

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



[issue40839] Disallow calling PyDict_GetItem() with the GIL released

2020-06-02 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



[issue40839] Disallow calling PyDict_GetItem() with the GIL released

2020-06-02 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 59d3dce69b0a4f6ee17578ae68037cc7ae90936f by Victor Stinner in 
branch 'master':
bpo-40839: PyDict_GetItem() requires the GIL (GH-20580)
https://github.com/python/cpython/commit/59d3dce69b0a4f6ee17578ae68037cc7ae90936f


--

___
Python tracker 

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



[issue35228] Index search in CHM help crashes viewer

2020-06-02 Thread Steve Dower


Steve Dower  added the comment:

> Let's promote ePub and PDF instead.

Find a good viewer we can bundle with the installer with equivalent 
search/index functionality and we can consider it.

More realistically, including the docs as unbundled HTML files and relying on 
the default browser is probably an all-around better idea.

--

___
Python tracker 

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



[issue35078] Allow customization of CSS class name of a month in calendar module

2020-06-02 Thread Walter Dörwald

Walter Dörwald  added the comment:


New changeset 85339f5c220a5e79c47c3a33c93f1dca5c59c52e by Srinivas Reddy 
Thatiparthy (శ్రీనివాస్  రెడ్డి తాటిపర్తి) in branch 'master':
bpo-35078: Allow customization of CSS class name of a month in calendar module 
(gh-10137)
https://github.com/python/cpython/commit/85339f5c220a5e79c47c3a33c93f1dca5c59c52e


--

___
Python tracker 

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



[issue40842] _Pickler_CommitFrame() always returns 0 and its return code is checked needlessly

2020-06-02 Thread Rémi Lapeyre

Change by Rémi Lapeyre :


--
title: _Pickler_CommitFrame() always returns 0 but it's return code is checked 
-> _Pickler_CommitFrame() always returns 0 and its return code is checked 
needlessly

___
Python tracker 

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



[issue40842] _Pickler_CommitFrame() always returns 0 but it's return code is checked

2020-06-02 Thread Rémi Lapeyre

New submission from Rémi Lapeyre :

I'm currently investigating a SystemError one of our workers returned:

returned NULL without setting 
an error


While doing so I came across the _Pickler_CommitFrame() function:


static int
_Pickler_CommitFrame(PicklerObject *self)
{
size_t frame_len;
char *qdata;

if (!self->framing || self->frame_start == -1)
return 0;
frame_len = self->output_len - self->frame_start - FRAME_HEADER_SIZE;
qdata = PyBytes_AS_STRING(self->output_buffer) + self->frame_start;
if (frame_len >= FRAME_SIZE_MIN) {
qdata[0] = FRAME;
_write_size64(qdata + 1, frame_len);
}
else {
memmove(qdata, qdata + FRAME_HEADER_SIZE, frame_len);
self->output_len -= FRAME_HEADER_SIZE;
}
self->frame_start = -1;
return 0;
}


Is there a reason for this function to return an int if it is always 0? I 
checked all call sites (_Pickler_GetString(), _Pickler_OpcodeBoundary(), 
_Pickler_write_bytes() and dump()) and they all check the return code but it 
seems useless.

--
components: Library (Lib)
messages: 370603
nosy: remi.lapeyre
priority: normal
severity: normal
status: open
title: _Pickler_CommitFrame() always returns 0 but it's return code is checked
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



[issue40841] Provide mimetypes.sniff API as stdlib

2020-06-02 Thread Dong-hee Na


Dong-hee Na  added the comment:

I ping some of the core developers who recently work on this module.
Sorry if this topic is not interesting to you :(

I want to listen to how about provide this API as the stdlib API.
Three things I'd like to appeal through this proposal.

1. It will provide based on a more precise way.
2. There is a good standard(whatwg) in which format will be supported.
3. I am eager to maintain this module as the active core developer.

--
nosy: +berker.peksag, serhiy.storchaka, xtreak

___
Python tracker 

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



[issue11105] Compiling evil ast crashes interpreter

2020-06-02 Thread Batuhan Taskaya


Change by Batuhan Taskaya :


--
keywords: +patch
pull_requests: +19824
stage: test needed -> patch review
pull_request: https://github.com/python/cpython/pull/20594

___
Python tracker 

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



[issue40241] [C API] Make PyGC_Head structure opaque, or even move it to the internal C API

2020-06-02 Thread miss-islington


miss-islington  added the comment:


New changeset ff442f36b91810c8b8a6346e39f1dbf2c6d85764 by Miss Islington (bot) 
in branch '3.9':
bpo-40241: What's New in Python 3.9: opaque PyGC_Head (GH-20586)
https://github.com/python/cpython/commit/ff442f36b91810c8b8a6346e39f1dbf2c6d85764


--

___
Python tracker 

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



[issue40841] Provide mimetypes.sniff API as stdlib

2020-06-02 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



[issue40244] AIX: build: _PyObject_GC_TRACK Asstertion failure

2020-06-02 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



[issue40241] [C API] Make PyGC_Head structure opaque, or even move it to the internal C API

2020-06-02 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 2.0 -> 3.0
pull_requests: +19823
pull_request: https://github.com/python/cpython/pull/20593

___
Python tracker 

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



[issue40241] [C API] Make PyGC_Head structure opaque, or even move it to the internal C API

2020-06-02 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 337d3103a2344e1fec75985e85fabcbdedac7d26 by Victor Stinner in 
branch 'master':
bpo-40241: What's New in Python 3.9: opaque PyGC_Head (GH-20586)
https://github.com/python/cpython/commit/337d3103a2344e1fec75985e85fabcbdedac7d26


--

___
Python tracker 

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



[issue40403] pdb does not drop into debugger upon SyntaxError caused by ast.literal_eval

2020-06-02 Thread Batuhan Taskaya


Change by Batuhan Taskaya :


--
nosy: +BTaskaya

___
Python tracker 

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



[issue40244] AIX: build: _PyObject_GC_TRACK Asstertion failure

2020-06-02 Thread miss-islington


miss-islington  added the comment:


New changeset 50e847a9eb03f59e1d9268e46f3f98c2679caebd by Miss Islington (bot) 
in branch '3.9':
bpo-40244: Remove XLC's support from the noreturn flag (GH-20588)
https://github.com/python/cpython/commit/50e847a9eb03f59e1d9268e46f3f98c2679caebd


--

___
Python tracker 

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



[issue40686] Compiler warnings in _zoneinfo.c on Windows build in 64-bit

2020-06-02 Thread Ammar Askar


Ammar Askar  added the comment:

There's still the "unknown pragma" warnings left, I pinged p-ganssle about it 
in the zoneinfo commit but it should probably be guarded like the ones in the 
ssl module:

https://github.com/python/cpython/blob/a871f692b4a2e6c7d45579693e787edc0af1a02c/Modules/_ssl.c#L46

--
nosy: +ammar2

___
Python tracker 

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



[issue40686] Compiler warnings in _zoneinfo.c on Windows build in 64-bit

2020-06-02 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

> 1. GH-20342 solved this issue?

As far as I understand, yes. Although I did not check if all the warnings here 
are solved in that PR, as the PR eliminates all the ones that we found, it 
should be resolved.

I think we can close this issue

> Thanks Pablo

Thanks to you for all the help :)

--

___
Python tracker 

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



[issue40244] AIX: build: _PyObject_GC_TRACK Asstertion failure

2020-06-02 Thread miss-islington


Change by miss-islington :


--
pull_requests: +19822
pull_request: https://github.com/python/cpython/pull/20591

___
Python tracker 

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



[issue40244] AIX: build: _PyObject_GC_TRACK Asstertion failure

2020-06-02 Thread miss-islington


miss-islington  added the comment:


New changeset 033d10bd21d962a59c6c4fc503092046baa451a1 by Batuhan Taskaya in 
branch 'master':
bpo-40244: Remove XLC's support from the noreturn flag (GH-20588)
https://github.com/python/cpython/commit/033d10bd21d962a59c6c4fc503092046baa451a1


--
nosy: +miss-islington

___
Python tracker 

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



[issue40244] AIX: build: _PyObject_GC_TRACK Asstertion failure

2020-06-02 Thread Batuhan Taskaya


Change by Batuhan Taskaya :


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

___
Python tracker 

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



[issue40244] AIX: build: _PyObject_GC_TRACK Asstertion failure

2020-06-02 Thread Batuhan Taskaya


Batuhan Taskaya  added the comment:

> If you could prep a PR where the change is reverted - I would appreciate it. 
> If no time, I'll get to it as soon as I can.

I see. I'll try to get a patch to deactivate it and add a comment (for future 
about this issue).

--

___
Python tracker 

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



[issue40403] pdb does not drop into debugger upon SyntaxError caused by ast.literal_eval

2020-06-02 Thread Rémi Lapeyre

Rémi Lapeyre  added the comment:

Yes, the patch by Terry Reedy fixes this issue while still breaking the loop 
from `def f: pass`.

It will start the debugger once for `def f: pass` which may be weird as in this 
case no user code has been executed and it will be in bdb which may confuse 
users:


Traceback (most recent call last):
  File "/Users/remi/src/cpython/Lib/pdb.py", line 1703, in main
pdb._runscript(mainpyfile)
  File "/Users/remi/src/cpython/Lib/pdb.py", line 1572, in _runscript
self.run(statement)
  File "/Users/remi/src/cpython/Lib/bdb.py", line 580, in run
exec(cmd, globals, locals)
  File "", line 1, in 
  File "/Users/remi/src/cpython/tests.py", line 1
def f: pass
 ^
SyntaxError: invalid syntax
Uncaught exception. Entering post mortem debugging
Running 'cont' or 'step' will restart the program
> (1)()
(Pdb) bt
  /Users/remi/src/cpython/Lib/pdb.py(1703)main()
-> pdb._runscript(mainpyfile)
  /Users/remi/src/cpython/Lib/pdb.py(1572)_runscript()
-> self.run(statement)
  /Users/remi/src/cpython/Lib/bdb.py(580)run()
-> exec(cmd, globals, locals)
> (1)()


Perhaps we should should test whether the exception happened there and not drop 
in the debugger in that case?

--

___
Python tracker 

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



[issue40244] AIX: build: _PyObject_GC_TRACK Asstertion failure

2020-06-02 Thread Michael Felt


Michael Felt  added the comment:

I think this is showing up again. Ot seemed to be away when using xlcv13 (and 
is away with xlcv11).

I switched my bot off of xlc (v13) because compile fails again - and I'll 
investigate manually using xlc again.

If you could prep a PR where the change is reverted - I would appreciate it. If 
no time, I'll get to it as soon as I can.

--

___
Python tracker 

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



[issue40403] pdb does not drop into debugger upon SyntaxError caused by ast.literal_eval

2020-06-02 Thread Xavier de Gaye


Xavier de Gaye  added the comment:

In Kerrick's example ast.literal_eval('') could be ast.literal_eval(some_code) 
instead where some_code is a string containing dynamically generated Python 
code. pdb post-mortem debugging must allow finding the syntax error in this 
code. The patch proposed in issue 16180 by Terry may fix this problem (and 
issue 16180).

--

___
Python tracker 

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