[issue42905] Issue while installing numba inside fastparquet

2021-01-11 Thread Sachit Murarka


Change by Sachit Murarka :


--
title: Issue while installing numba -> Issue while installing numba inside 
fastparquet

___
Python tracker 

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



[issue42905] Issue while installing numba

2021-01-11 Thread Sachit Murarka


New submission from Sachit Murarka :

I am having Python 3.8
I am installing fastparquet.

It is giving following error. 

I am doing it in Centos

running build_ext
  building 'numba._dynfunc' extension
  Warning: Can't read registry to find the necessary compiler setting
  Make sure that Python modules winreg, win32api or win32con are installed.
  C compiler: gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g 
-fwrapv -O3 -Wall -fPIC

  creating build/temp.linux-x86_64-3.8
  creating build/temp.linux-x86_64-3.8/numba
  compile options: '-I/usr/local/include/python3.8 -c'
  gcc: numba/_dynfuncmod.c
  gcc -pthread -shared build/temp.linux-x86_64-3.8/numba/_dynfuncmod.o -o 
build/lib.linux-x86_64-3.8/numba/_dynfunc.cpython-38-x86_64-linux-gnu.so
  building 'numba._dispatcher' extension
  C compiler: gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g 
-fwrapv -O3 -Wall -fPI

--
components: Library (Lib)
messages: 384898
nosy: connectsachit
priority: normal
severity: normal
status: open
title: Issue while installing numba
type: compile error
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



[issue42903] optimize lru_cache for functions with no arguments

2021-01-11 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

FYI: The @cache decorator was added as a result of that discussion and the 
related on python-ideas.

--

___
Python tracker 

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



[issue42902] a python embedded program may load "C:\Lib\os.py" on windows system

2021-01-11 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



[issue42902] a python embedded program may load "C:\Lib\os.py" on windows system

2021-01-11 Thread Christian Heimes


Change by Christian Heimes :


--
components: +Interpreter Core, Windows -C API
nosy: +paul.moore, steve.dower, tim.golden, vstinner, zach.ware
type: behavior -> security

___
Python tracker 

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



[issue42903] optimize lru_cache for functions with no arguments

2021-01-11 Thread Eugene Toder


Eugene Toder  added the comment:

Ammar, thank you for the link.

--

___
Python tracker 

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



[issue42903] optimize lru_cache for functions with no arguments

2021-01-11 Thread Ammar Askar


Ammar Askar  added the comment:

Additional discussion on the same topic on discourse: 
https://discuss.python.org/t/reduce-the-overhead-of-functools-lru-cache-for-functions-with-no-parameters/3956

--
nosy: +ammar2

___
Python tracker 

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



[issue42903] optimize lru_cache for functions with no arguments

2021-01-11 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

Some other thoughts:

* A zero argument function that returns a constant is unlikely to ever be used 
in a tight loop. That would be pointless.

* The @cache decorator is already 30% faster than calling an empty function. 
It's very cheap.

* We really don't want the cache logic to get into the business of trying to 
deduce the arity of the function being cached.  That is a can of worms that we 
would regret opening.

--

___
Python tracker 

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



[issue42903] optimize lru_cache for functions with no arguments

2021-01-11 Thread Eugene Toder


Eugene Toder  added the comment:

As you can see in my original post, the difference between @cache (aka 
@lru_cache(None)) and just @lru_cache() is negligible in this case. The 
optimization in this PR makes a much bigger difference. At the expense of some 
lines of code, that's true.

Also, function calls in Python are quite slow, so being faster than a function 
call is not a high bar.

--

___
Python tracker 

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



[issue42862] Use functools.lru_cache iso. _sqlite.Cache in sqlite3 module

2021-01-11 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

+1 This seems reasonable to me.

--
nosy: +rhettinger

___
Python tracker 

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



[issue42903] optimize lru_cache for functions with no arguments

2021-01-11 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

Just use the new @cache decorator.¹  It's cleaner looking in code and already 
sets maxsize to None, making it perfect for your application.

With respect to the proposed optimization, I'm sorry but further optimization 
of this already fast special case isn't worth the added complexity.  It is 
almost certain that these few nanoseconds won't ever matter in a real 
application.  The @cache decorator is already faster than calling an empty 
function, "def f(): return None".

¹ https://docs.python.org/3/library/functools.html#functools.cache

--
nosy: +rhettinger
resolution:  -> rejected
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



[issue42888] Not installed “libgcc_s.so.1” causes parser crash.

2021-01-11 Thread Alexey Izbyshev


Alexey Izbyshev  added the comment:

I've encountered this issue too. My use case was a 32-bit Python on a 64-bit 
CentOS system, and my understanding of the issue was that 64-bit libgcc_s is 
somehow counted as a "provider" of libgcc_s for 32-bit libc by the package 
manager, so 32-bit libgcc_s is never installed even when "yum install 
glibc.i686" is used because everything seems "already OK":

$ yum deplist glibc

...
  dependency: libgcc
   provider: libgcc.x86_64 4.1.2-55.el5
   provider: libgcc.i386 4.1.2-55.el5
...

(The above is for CentOS 5, but at the time I tested 6 and 7 as well, with the 
same result).

But I suggest not to dismiss this issue as a packaging bug. Glibc needs 
libgcc_s for pthread_exit() because it's implemented in terms of 
pthread_cancel(), and the latter wants to do stack unwinding (probably to 
cleanup resources for each stack frame). But the code for unwinding lives in 
libgcc_s. The non-intuitive thing here is that glibc tried to optimize this 
dependency by dlopen'ing libgcc_s when pthread_cancel() is called instead of 
making it a startup dependency. Many people consider this a terrible design 
choice since your program can now fail at an arbitrary moment due to dlopen() 
failure (and missing libgcc_s is not the only possible reason[1]).

Since CPython doesn't use pthread_cancel() directly, I propose a simple 
solution  -- just `return NULL` from thread functions instead of calling 
pthread_exit(). The last time I looked, pthread_exit() in CPython is only 
called from top frames of the threads, so a direct `return` should suffice. If 
the top-level thread function simply returns, no stack unwinding is needed, so 
glibc never uses its cancellation machinery.

I've tested that this solution worked at the time (for 3.8 I think), and the 
test suite passed. If there is interest in going this way, I can test again.

[1] https://www.sourceware.org/bugzilla/show_bug.cgi?id=13119

--
nosy: +izbyshev

___
Python tracker 

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



[issue42895] Return multi-line list concatenation without parentheses returns only first operand

2021-01-11 Thread JD-Veiga

JD-Veiga  added the comment:

What a shame. I forget that + is also a unary operator. That produces a new 
logical line with correct identation though never executed. Sorry for the 
inconvenience.⁶

--

___
Python tracker 

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



[issue42904] get_type_hints does not provide localns for classes

2021-01-11 Thread Guido van Rossum


Guido van Rossum  added the comment:

It's apparently a bug in all versions that support `from __future__ import 
annotations` (and only when that is used). Though perhaps we should only fix in 
in 3.10.

--

___
Python tracker 

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



[issue42904] get_type_hints does not provide localns for classes

2021-01-11 Thread Guido van Rossum


Guido van Rossum  added the comment:

Fidget-Spinner, are you interested in taking this?

--

___
Python tracker 

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



[issue41868] SMTPLIB integrate or provide option to use "logging"

2021-01-11 Thread Pandu E POLUAN


Pandu E POLUAN  added the comment:

Will patching smtplib.SMTP._print_debug do?

You can subclass from smtplib.SMTP this way:

class MySMTPClient(smtplib.SMTP):
def __init__(self, *args, logger=None, **kwargs):
super().__init__(*args, **kwargs)
self.logger = logger
def _print_debug(self, *args):
if self.logger:
self.logger.debug(" ".join(args))
super()._print_debug(*args)

--
nosy: +pepoluan

___
Python tracker 

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



[issue42904] get_type_hints does not provide localns for classes

2021-01-11 Thread Paul Bryan


Change by Paul Bryan :


--
nosy: +larry

___
Python tracker 

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



[issue42904] get_type_hints does not provide localns for classes

2021-01-11 Thread Paul Bryan


New submission from Paul Bryan :

According to PEP 563:

> The get_type_hints() function automatically resolves the correct value of 
> globalns for functions and classes. It also automatically provides the 
> correct localns for classes.

This statement about providing correct localns for classes does not appear to 
be true.

Guido suggested this should be treated as a bug.

--
components: Library (Lib)
messages: 384885
nosy: gvanrossum, pbryan
priority: normal
severity: normal
status: open
title: get_type_hints does not provide localns for classes
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



[issue42903] optimize lru_cache for functions with no arguments

2021-01-11 Thread Roundup Robot


Change by Roundup Robot :


--
keywords: +patch
nosy: +python-dev
nosy_count: 3.0 -> 4.0
pull_requests: +23023
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/24197

___
Python tracker 

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



[issue41116] build on macOS 11 (beta) does not find system-supplied third-party libraries

2021-01-11 Thread Dustin Rodrigues


Dustin Rodrigues  added the comment:

If your 'brew --prefix' is /opt/homebrew, then setting

CFLAGS="-I/opt/homebrew/include" CPPFLAGS="-I/opt/homebrew/include" 
LDFLAGS="-L/opt/homebrew/lib"

when running ./configure appears to be sufficient to build the interpreter with 
lzma support once you've already done 'brew install xz'.

--
nosy: +dtrodrigues

___
Python tracker 

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



[issue42901] [Enum] move member creation to __set_name__ in order to support __init_subclass__

2021-01-11 Thread Ethan Furman


Change by Ethan Furman :


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

___
Python tracker 

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



[issue42903] optimize lru_cache for functions with no arguments

2021-01-11 Thread Eugene Toder


New submission from Eugene Toder :

It's convenient to use @lru_cache on functions with no arguments to delay doing 
some work until the first time it is needed. Since @lru_cache is implemented in 
C, it is already faster than manually caching in a closure variable. However, 
it can be made even faster and more memory efficient by not using the dict at 
all and caching just the one result that the function returns.

Here are my timing results. Before my changes:

$ ./python -m timeit -s "import functools; f = functools.lru_cache()(lambda: 
1)" "f()"
500 loops, best of 5: 42.2 nsec per loop
$ ./python -m timeit -s "import functools; f = 
functools.lru_cache(None)(lambda: 1)" "f()"
500 loops, best of 5: 38.9 nsec per loop

After my changes:

$ ./python -m timeit -s "import functools; f = functools.lru_cache()(lambda: 
1)" "f()"
1000 loops, best of 5: 22.6 nsec per loop

So we get improvement of about 80% compared to the default maxsize and about 
70% compared to maxsize=None.

--
components: Library (Lib)
messages: 384883
nosy: eltoder, serhiy.storchaka, vstinner
priority: normal
severity: normal
status: open
title: optimize lru_cache for functions with no arguments
type: performance
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



[issue27820] Possible bug in smtplib when initial_response_ok=False

2021-01-11 Thread Pandu E POLUAN


Change by Pandu E POLUAN :


--
components: +Tests

___
Python tracker 

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



[issue42902] a python embedded program may load "C:\Lib\os.py" on windows system

2021-01-11 Thread houjingyi

New submission from houjingyi :

environment: windows 10, python3.8.7 installed to "C:\Program Files\Python38".

datail info: According to https://docs.python.org/3/c-api/init.html: 
"Py_SetPath() set the default module search path. If this function is called 
before Py_Initialize(), then Py_GetPath() won’t attempt to compute a default 
search path but uses the one provided instead."
Write following code that only call Py_Initialize():

#include 
#include 
#include 
using namespace std;
int main()
{
Py_Initialize();
} 

In visual studio add "C:\Program Files\Python38\include" to 
AdditionalIncludeDirectories, add "C:\Program Files\Python38\libs\python38.lib" 
to AdditionalDependencies to compile it to poc.exe. Copy "C:\Program 
Files\Python38\Lib" to "C:\Lib" and modify "C:\Lib\os.py" to execute any code 
we like. For example we can add "import os" and add "os.system(notepad)" in 
function "def _exists(name)". Now run poc.exe it will create notepad. 

impact: In my report I showed that a python embedded program may load 
"C:\Lib\os.py" which lower privileged user can control. If this program runs as 
administrator then this may cause vertical privilege escalation, low privileged 
user gets higher privilege; If this program do not run as administrator then 
this may cause vertical privilege escalation, low privileged user can execute 
code as others(https://en.wikipedia.org/wiki/Privilege_escalation). In either 
case, the access control of the windows system is broken.

notice: The report was sent to secur...@python.org before and they suggested it 
can be reported publicly.

--
components: C API
messages: 384882
nosy: houjingyi233
priority: normal
severity: normal
status: open
title: a python embedded program may load "C:\Lib\os.py" on windows system
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



[issue42889] Incorrect behavior of Python parser after ast node of test program being modified

2021-01-11 Thread Guido van Rossum


Guido van Rossum  added the comment:

Hm, if your argument is just that you can make invalid identifiers this way, I 
still don't see why that's a big deal. You can do `x.__dict__["1"] = 1` and now 
you've given x an attribute that's not a valid identifier. You could also call 
the code object constructor directly with some valid identifiers. You have to 
do better than saying "it's dangerous". Can you demonstrate a segfault?

--

___
Python tracker 

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



[issue42880] ctypes: variadic function call still doesn't work on Apple Silicon

2021-01-11 Thread Ziqiao Kong


Ziqiao Kong  added the comment:

Sorry that our test machine failed to boot due to some firmware problem when 
upgrading to 11.1 yesterday. I will re-run my tests after the upgrade gets done.

Also, I'm sure the last output is "3" in my first message.

--

___
Python tracker 

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



[issue42889] Incorrect behavior of Python parser after ast node of test program being modified

2021-01-11 Thread Xinmeng Xia


Xinmeng Xia  added the comment:

Sorry, my description is a little confusing. My points lie on function 
'compile' and 'exec'. Yes, I agree. AST can be modified and don't correspond to 
valid programs.  But I don't think this invaild program can be compiled and 
exec without any check. It's dangerous.  

See the following program: For "compile" and "exec", no error is reported on 
Python 3.5-3.8 while error messages are reported on Python 3.9 and 3.10

==
import ast
class RewriteName(ast.NodeTransformer):
def visit_Name(self, node):
if node.id != "print":
node.id = str(False)
print(type(node.id))
return node

code = "a = 2;print(a)"

myast = ast.parse(code)
transformer = RewriteName()
newast = transformer.visit(myast)

c = compile(newast,'','exec')
exec(c)
=
Error message on Python 3.9  and 3.10.
-


Traceback (most recent call last):
  File "/home/xxm/Desktop/nameChanging/report/test1.py", line 574, in 
c = compile(newast,'','exec')
ValueError: Name node can't be used with 'False' constant
-

In fact, in class RewriteName, when "node.id" is assigned, the parser will 
check whether the identifier is a "str". If not,"TypeError: AST identifier must 
be of type str" will be reported. However, it's not enough. In Python, 
identifier names have their own naming rules.  "str" could be "+","1","False", 
but these are not legally id. So the above error could be reported.

--

___
Python tracker 

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



[issue42899] Possible regression introduced by bpo-42615

2021-01-11 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
priority: high -> release blocker

___
Python tracker 

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



[issue42899] Possible regression introduced by bpo-42615

2021-01-11 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
nosy: +pablogsal

___
Python tracker 

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



[issue42900] Ternary operator precedence relative to bitwise or

2021-01-11 Thread Guido van Rossum


Guido van Rossum  added the comment:

You may be surprised, but it's not a bug -- '|' binds tighter than 'if'/'else'.

If you need more help, please contact a user forum.

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



[issue42775] __init_subclass__ should be called in __init__

2021-01-11 Thread Guido van Rossum


Guido van Rossum  added the comment:

Thanks, that's great! And thanks, Nick!

--

___
Python tracker 

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



[issue42775] __init_subclass__ should be called in __init__

2021-01-11 Thread Ethan Furman


Ethan Furman  added the comment:

Nick Coghlan made the observation that `__set_name__` should be doing what is 
currently the after-new work.

Tracking in #42901.

--
keywords:  -patch
resolution:  -> rejected
stage: patch review -> resolved
status: open -> closed
superseder:  -> [Enum] move member creation to __set_name__ in order to support 
__init_subclass__

___
Python tracker 

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



[issue42901] [Enum] move member creation to __set_name__ in order to support __init_subclass__

2021-01-11 Thread Ethan Furman


New submission from Ethan Furman :

In discussions about moving the calls to `__set_name__` and 
`__init_subclass__`, Nick Coughlan made an observation:

Nick Coghlan:
> Both EnumMeta and ABCMeta should probably be relying on `__set_name__`
> for their per-member set up work these days, rather than deferring that
> work until after `__new__` returns.

By having `__set_name__` create the final members, they will be in place for 
the call to `__init_subclass__`.

--
assignee: ethan.furman
components: Library (Lib)
messages: 384875
nosy: barry, eli.bendersky, ethan.furman
priority: high
severity: normal
stage: needs patch
status: open
title: [Enum] move member creation to __set_name__ in order to support 
__init_subclass__
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



[issue42900] Ternary operator precedence relative to bitwise or

2021-01-11 Thread Peter


New submission from Peter :

Hello,

I expect the following code to run fine, but the assertion fails. dbg1 is 1, 
while dbg2 is 3.  I thought they would both be 3.
Note that the only difference between the expressions for dbg1 and dbg2 are the 
parentheses.
Please accept my apologies if this is expected behavior, but it came as a big 
surprise to me.


import json
if __name__ == "__main__":
msg = '''
{
"Sync Setup Flags": {
"Setup Sync": "Enable",
"Generate Primary Sync": "Enable",
"Backup Primary Sync": "Disable",
"Follow Only": "Disable",
"Use Local Clock": "Disable",
"Set Active": "Disable"
}
}
'''
obj = json.loads(msg)
dbg1 = \
1 if obj["Sync Setup Flags"]["Setup Sync"] == "Enable" else 0 | \
2 if obj["Sync Setup Flags"]["Generate Primary Sync"] == "Enable" else 
0 | \
4 if obj["Sync Setup Flags"]["Backup Primary Sync"] == "Enable" else 0 
| \
8 if obj["Sync Setup Flags"]["Follow Only"] == "Enable" else 0 | \
16 if obj["Sync Setup Flags"]["Use Local Clock"] == "Enable" else 0 | \
128 if obj["Sync Setup Flags"]["Set Active"] == "Enable" else 0
dbg2 = \
(1 if obj["Sync Setup Flags"]["Setup Sync"] == "Enable" else 0) | \
(2 if obj["Sync Setup Flags"]["Generate Primary Sync"] == "Enable" else 
0) | \
(4 if obj["Sync Setup Flags"]["Backup Primary Sync"] == "Enable" else 
0) | \
(8 if obj["Sync Setup Flags"]["Follow Only"] == "Enable" else 0) | \
(16 if obj["Sync Setup Flags"]["Use Local Clock"] == "Enable" else 0) | 
\
(128 if obj["Sync Setup Flags"]["Set Active"] == "Enable" else 0)

assert(dbg1 == dbg2)

--
messages: 384874
nosy: amazingmo
priority: normal
severity: normal
status: open
title: Ternary operator precedence relative to bitwise or
type: behavior
versions: Python 3.6

___
Python tracker 

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



[issue42899] Possible regression introduced by bpo-42615

2021-01-11 Thread Gregory P. Smith


Change by Gregory P. Smith :


--
priority: normal -> high

___
Python tracker 

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



[issue42899] Possible regression introduced by bpo-42615

2021-01-11 Thread Gregory P. Smith


Change by Gregory P. Smith :


--
nosy: +gregory.p.smith

___
Python tracker 

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



[issue42870] Document changed argparse output wrt optional arguments in What's new in Python 3.10

2021-01-11 Thread Guido van Rossum


Guido van Rossum  added the comment:

Thanks for your fix!

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

___
Python tracker 

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



[issue42870] Document changed argparse output wrt optional arguments in What's new in Python 3.10

2021-01-11 Thread Guido van Rossum

Guido van Rossum  added the comment:


New changeset fb35fa49d192368e94ffec09c092260ed0fea2e1 by Tomáš Hrnčiar in 
branch 'master':
bpo-42870: Document change in argparse help output. (GH-24190)
https://github.com/python/cpython/commit/fb35fa49d192368e94ffec09c092260ed0fea2e1


--

___
Python tracker 

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



[issue42812] @overload-ing method of parent class without actual implementation

2021-01-11 Thread Guido van Rossum


Guido van Rossum  added the comment:

I hesitate to add anything because you are exposing so much confusion. May I 
suggest that you ask about this on a user group first before proposing a new 
feature? One place that makes sense given that this is a type system feature 
would be this Gitter channel: https://gitter.im/python/typing

--
nosy:  -levkivskyi

___
Python tracker 

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



[issue42889] Incorrect behavior of Python parser after ast node of test program being modified

2021-01-11 Thread Guido van Rossum


Guido van Rossum  added the comment:

I don't think this is a bug, unless you can show an example where the bytecode 
compiler or the interpreter actually crashes. Basically you can change AST 
nodes in lots of ways that don't correspond to valid programs, and as long as 
you can't make CPython crash we don't care.

--
nosy: +gvanrossum

___
Python tracker 

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



[issue16845] warnings.simplefilter should validate input

2021-01-11 Thread Irit Katriel


Change by Irit Katriel :


--
keywords: +easy -patch
versions: +Python 3.10 -Python 3.5

___
Python tracker 

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



[issue39690] Compiler warnings in unicodeobject.c

2021-01-11 Thread Irit Katriel


Change by Irit Katriel :


--
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> PyUnicode_IsIdentifier has two if/thens that can be combined

___
Python tracker 

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



[issue16081] Fix compile warnings in thread_pthread.h

2021-01-11 Thread Irit Katriel


Irit Katriel  added the comment:

This was resolved here: 
https://github.com/python/cpython/commit/56379c0d8fc17e717ac1ad73353b5991adae6832

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



[issue42899] Possible regression introduced by bpo-42615

2021-01-11 Thread Mark Shannon


Change by Mark Shannon :


--
assignee:  -> Mark.Shannon

___
Python tracker 

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



[issue42899] Possible regression introduced by bpo-42615

2021-01-11 Thread Steve Stagg


Steve Stagg  added the comment:

Apologies, script should have read:
class B:
 def __bool__(self):
 print("bool(B)")
 raise AttributeError("don't do that!")

b = B()
try:
   if b:
pass
except AttributeError:
   print("GOT ERROR")
   raise IndexError("Should GET THIS")

print("SHOULDN'T GET THIS")


---

The DIS before the change for this code is:
BEFORE:
  1   0 LOAD_BUILD_CLASS
  2 LOAD_CONST   0 (", line 1>)
  4 LOAD_CONST   1 ('B')
  6 MAKE_FUNCTION0
  8 LOAD_CONST   1 ('B')
 10 CALL_FUNCTION2
 12 STORE_NAME   0 (B)

  6  14 LOAD_NAME0 (B)
 16 CALL_FUNCTION0
 18 STORE_NAME   1 (b)

  7  20 SETUP_FINALLY8 (to 30)

  8  22 LOAD_NAME1 (b)
 24 POP_JUMP_IF_FALSE   26

  9 >>   26 POP_BLOCK
 28 JUMP_FORWARD30 (to 60)

 10 >>   30 DUP_TOP
 32 LOAD_NAME2 (AttributeError)
 34 JUMP_IF_NOT_EXC_MATCH58
 36 POP_TOP
 38 POP_TOP
 40 POP_TOP

 11  42 LOAD_NAME3 (print)
 44 LOAD_CONST   2 ('GOT ERROR')
 46 CALL_FUNCTION1
 48 POP_TOP

 12  50 LOAD_NAME4 (IndexError)
 52 LOAD_CONST   3 ('Should GET THIS')
 54 CALL_FUNCTION1
 56 RAISE_VARARGS1
>>   58 RERAISE

 14 >>   60 LOAD_NAME3 (print)
 62 LOAD_CONST   4 ("SHOULDN'T GET THIS")
 64 CALL_FUNCTION1
 66 POP_TOP
 68 LOAD_CONST   5 (None)
 70 RETURN_VALUE

Disassembly of ", line 1>:
  1   0 LOAD_NAME0 (__name__)
  2 STORE_NAME   1 (__module__)
  4 LOAD_CONST   0 ('B')
  6 STORE_NAME   2 (__qualname__)

  2   8 LOAD_CONST   1 (", line 2>)
 10 LOAD_CONST   2 ('B.__bool__')
 12 MAKE_FUNCTION0
 14 STORE_NAME   3 (__bool__)
 16 LOAD_CONST   3 (None)
 18 RETURN_VALUE

Disassembly of ", line 2>:
  3   0 LOAD_GLOBAL  0 (print)
  2 LOAD_CONST   1 ('bool(B)')
  4 CALL_FUNCTION1
  6 POP_TOP

  4   8 LOAD_GLOBAL  1 (AttributeError)
 10 LOAD_CONST   2 ("don't do that!")
 12 CALL_FUNCTION1
 14 RAISE_VARARGS1



Afterwards, tehre's a single change:

8 becomes:

8  22 LOAD_NAME1 (b)
 24 POP_TOP

--

___
Python tracker 

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



[issue42899] Possible regression introduced by bpo-42615

2021-01-11 Thread Steve Stagg


New submission from Steve Stagg :

This was raised by Mats Wichmann   on the python-dev list.

Commit : c71581c7a4192e6ba9a79eccc583aaadab300efa
bpo-42615: Delete redundant jump instructions that only bypass empty blocks 
(GH-23733)

appears to have changed the behaviour of the following code:

class B:
 def __bool__(self):
 raise AttributeError("don't do that!")

b = B()
try:
   if b:
pass
except AttributeError:
   print("HI")


Before the change, the output is:

bool(B)
GOT ERROR
Traceback (most recent call last):
  File "../test.py", line 8, in 
if b:
  File "../test.py", line 4, in __bool__
raise AttributeError("don't do that!")
AttributeError: don't do that!

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "../test.py", line 12, in 
raise IndexError("Should GET THIS")
IndexError: Should GET THIS


After the change, just:

SHOULDN'T GET THIS

It seems like the entire branch is being eliminated prematurely, but maybe only 
when the statement is wrapped in a try-except?

--
messages: 384867
nosy: Mark.Shannon, m, stestagg
priority: normal
severity: normal
status: open
title: Possible regression introduced by bpo-42615
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



[issue42875] argparse incorrectly shows help string on a new line in case of long command string

2021-01-11 Thread Pavel Ditenbir


Change by Pavel Ditenbir :


--
versions:  -Python 3.6, Python 3.7

___
Python tracker 

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



[issue42875] argparse incorrectly shows help string on a new line in case of long command string

2021-01-11 Thread Pavel Ditenbir


Change by Pavel Ditenbir :


--
versions: +Python 3.10, 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



[issue42898] pickle.loads() crashes interpreter on invalid input

2021-01-11 Thread Christian Heimes


Christian Heimes  added the comment:

The pickle module is not safe against malicious or faulty data. Invalid data 
can cause code injects or even segfaults. It's a know and documented behavior, 
https://docs.python.org/3/library/pickle.html

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



[issue42898] pickle.loads() crashes interpreter on invalid input

2021-01-11 Thread Kale Kundert


Change by Kale Kundert :


--
type:  -> crash
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



[issue42898] pickle.loads() crashes interpreter on invalid input

2021-01-11 Thread Kale Kundert


New submission from Kale Kundert :

I expect `pickle.loads()` to raise `_pickle.UnpicklingError` for any invalid 
input, but for the specific example shown below, the interpreter crashes after 
attempting to allocate >16GB of memory.  Note that this input does not have the 
pickle header (b'0x80'), so it should be easy to distinguish from valid input.

$ python
Python 3.8.2 (default, Apr 13 2020, 11:02:04) 
[Clang 9.0.1 ] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import pickle
>>> pickle.loads(b'January 11')
[1]624227 killed python3

--
messages: 384865
nosy: kalekundert
priority: normal
severity: normal
status: open
title: pickle.loads() crashes interpreter on invalid input

___
Python tracker 

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



[issue42531] importlib.resources.path() raises TypeError for packages without __file__

2021-01-11 Thread William Schwartz


William Schwartz  added the comment:

> For that, please submit a PR to importlib_resources and it will get synced to 
> CPython later.

Will do once PR 23611 gets in shape. 

> Can you tell me more about the use-case that exhibited this undesirable 
> behavior?

Using the [PyOxidizer] "freezer". It compiles Python together with frozen 
Python code or byte code.

> That is, what loader is it that supports `open_binary` but not `is_resource` 
> and doesn't have a `__origin__`?

PyOxidizer's [OxidizedImporter] importer. It [does not set `__file__`] (i.e., 
`__spec__.origin__ is None`). Its maintainer has resolved some ambiguities in 
the resources API contract (#36128) [differently from CPython], but I don't 
think that's related to the issue I ran into. The resource-related 
functionality of the importer is implemented here (extension module written in 
Rust): 
https://github.com/indygreg/PyOxidizer/blob/e86b2f46ed6b449bdb912900b0ac83576ad5ebe9/pyembed/src/importer.rs#L1078-L1269

[PyOxidizer]: https://pyoxidizer.readthedocs.io
[OxidizedImporter]: 
https://pyoxidizer.readthedocs.io/en/v0.10.3/oxidized_importer.html
[does not set `__file__`]: 
https://pyoxidizer.readthedocs.io/en/v0.10.3/oxidized_importer_behavior_and_compliance.html#file-and-cached-module-attributes
[unsure about `ResourceReader` semantics]: 
https://pyoxidizer.readthedocs.io/en/v0.10.3/oxidized_importer_resource_files.html#resource-reader-support

--

___
Python tracker 

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



[issue42895] Return multi-line list concatenation without parentheses returns only first operand

2021-01-11 Thread Steven D'Aprano


Steven D'Aprano  added the comment:

As Guido says, a full explanation will have to to a user-forum such as 
https://discuss.python.org/c/users/7 but consider this example and see if it 
gives you insight:

def demo():
x = 1
return (
x - 1
)
print("This is not executed.")
- (5 * x)

and remember that `+` can also be a unary operator.

--
nosy: +steven.daprano

___
Python tracker 

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



[issue21865] Improve invalid category exception for warnings.filterwarnings

2021-01-11 Thread Irit Katriel


Change by Irit Katriel :


--
resolution:  -> duplicate
stage: patch review -> resolved
status: open -> closed
superseder:  -> Better warnings exception for bad category

___
Python tracker 

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



[issue20131] warnings module offers no documented, programmatic way to reset "seen-warning" flag

2021-01-11 Thread Irit Katriel


Change by Irit Katriel :


--
resolution:  -> duplicate
superseder:  -> warnings module offers no documented, programmatic way to reset 
"seen-warning" flag

___
Python tracker 

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



[issue42894] Debugging native Python modules on Windows with Visual Studio Toolchain

2021-01-11 Thread Guido van Rossum


Guido van Rossum  added the comment:

Steve, is there a better way?

--
components: +Windows -C API
nosy: +gvanrossum, paul.moore, steve.dower, tim.golden, zach.ware

___
Python tracker 

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



[issue42895] Return multi-line list concatenation without parentheses returns only first operand

2021-01-11 Thread Guido van Rossum


Guido van Rossum  added the comment:

This is not a bug -- it is how it's supposed to work (for better or for worse).

Please see a use forum to help you understand what's going on here.

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



[issue42897] Expose a way to determine if a process has been closed or not

2021-01-11 Thread Peter Van Sickel


New submission from Peter Van Sickel :

I have been using the multiprocessing Process class a good bit lately. I have a 
class that is managing the a given list of processes from launch to completion. 
Recently I started using Process close().  I found myself wanting to determine 
if a given process instance was closed or not before I did anything like check 
its exitcode or invoke any of the other methods that raise a ValueError if done 
so on a closed process.
As far as I can tell there is no exposed way to check if the process is closed. 
 The Process class has a _closed instance variable and a _check_closed() 
method, but those are not intended for direct use.
I created a simple wrapper class that has its own closed instance variable and 
wraps the close() method of Process so that the closed instance variable can be 
set to True when close() is called and then call super().close() to allow the 
normal close operation to complete.
It would be convenient if the Process class itself supported an is_closed() 
method or exposed a Boolean closed attribute to easily determine if a process 
instance has been closed.

--
messages: 384860
nosy: petervansickel
priority: normal
severity: normal
status: open
title: Expose a way to determine if a process has been closed or not
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



[issue42886] math.log and math.log10 domain error on very large Fractions

2021-01-11 Thread Camion


Camion  added the comment:

@mark.dickinson, I fell on this problem in the reached precision evaluation, of 
a multiprecision algorithm designed to compute decimals of PI (using "John 
Machin like" formulas). 

The fact is that fractions module is really nice to implement this kind of 
multiprecision algorithm and math.log10 on each subsequent term of the series 
gives you an immediate evaluation of the current reached precision.

I agree that the solution I used work pretty well, but it makes me sad because 
it's far from beautifull.

I think one should consider that there are two cases with different objectives 
: floats and the likes which target speed, and those multiprecision types which 
target - well... precision. I wonder if the solution would not be to implement 
those functions in the fractions and decimal libraries (just calling log on 
integer for numerator and denominator).

--

___
Python tracker 

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



[issue42862] Use functools.lru_cache iso. _sqlite.Cache in sqlite3 module

2021-01-11 Thread Erlend Egeberg Aasland


Change by Erlend Egeberg Aasland :


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

___
Python tracker 

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



[issue17243] The changes made for issue 4074 should be documented

2021-01-11 Thread Irit Katriel


Change by Irit Katriel :


--
stage: needs patch -> resolved
status: pending -> closed

___
Python tracker 

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



[issue24711] Document getpass.getpass behavior on ^C

2021-01-11 Thread Irit Katriel


Irit Katriel  added the comment:

Works for me on both linux and windows.

--
stage:  -> resolved
status: pending -> closed

___
Python tracker 

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



[issue42896] Solaris 11.4 crle output not handled correctly

2021-01-11 Thread David Murphy


David Murphy  added the comment:

Forgive any process/workflow errors first time, submitting to Python

--

___
Python tracker 

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



[issue42896] Solaris 11.4 crle output not handled correctly

2021-01-11 Thread David Murphy


New submission from David Murphy :

>From porting Python 3.7.8 to Solaris 11.4 (base open version) found that the 
>handling of crle output has changed between Solaris 11.3 and 11.4 and 
>accommodation has not been made for the change.

For example:
Solaris 11.3
root@sol11:~/sol_build/proto_salt# uname -a
SunOS sol11 5.11 11.3 i86pc i386 i86pc
root@sol11:~/sol_build/proto_salt# crle

Default configuration file (/var/ld/ld.config) not found
  Platform: 32-bit LSB 80386
  Default Library Path (ELF):   /lib:/usr/lib  (system default)
  Trusted Directories (ELF):/lib/secure:/usr/lib/secure  (system default)
root@sol11:~/sol_build/proto_salt# crle -64

Default configuration file (/var/ld/64/ld.config) not found
  Platform: 64-bit LSB AMD64
  Default Library Path (ELF):   /lib/64:/usr/lib/64  (system default)
  Trusted Directories (ELF):/lib/secure/64:/usr/lib/secure/64  (system 
default)
root@sol11:~/sol_build/proto_salt#


Solaris 11.4
root@sol114:/export/home/david/dev/dist/run# uname -a
SunOS sol114 5.11 11.4.0.15.0 i86pc i386 i86pc Solaris
root@sol114:/export/home/david/dev/dist/run# crle

Configuration file [version 5]: /var/ld/ld.config
Platform:   32-bit LSB 80386
Default Library Path:   
/usr/local/openssl/lib:/usr/local/lib:/lib:/usr/lib
Trusted Directories:/lib/secure:/usr/lib/secure  (system default)

Command line:
crle -c /var/ld/ld.config -l 
/usr/local/openssl/lib:/usr/local/lib:/lib:/usr/lib

root@sol114:/export/home/david/dev/dist/run# crle -64

Configuration file [version 5]: /var/ld/64/ld.config
Platform:   64-bit LSB AMD64
Default Library Path:   
/usr/local/openssl/lib:/usr/local/lib:/lib/64:/usr/lib/64
Trusted Directories:/lib/secure/64:/usr/lib/secure/64  (system 
default)

Command line:
crle -64 -c /var/ld/64/ld.config -l 
/usr/local/openssl/lib:/usr/local/lib:/lib/64:/usr/lib/64

root@sol114:/export/home/david/dev/dist/run#

Note: the missing '(ELF)' from the 'Default Library Path'


Simple fix is the following patch:
david@sol114:~/dev$ cat solaris11_crle.patch
--- util.py 2021-01-08 17:01:58.417014094 +
+++ util.py.new 2021-01-08 17:03:21.843483945 +
@@ -238,6 +238,10 @@
 line = line.strip()
 if line.startswith(b'Default Library Path (ELF):'):
 paths = os.fsdecode(line).split()[4]
+elif line.startswith(b'Default Library Path:'):
+## allow for Solaris 11.4 output
+paths = os.fsdecode(line).split()[3]
+
 
 if not paths:
 return None
david@sol114:~/dev$

--
components: ctypes
files: solaris11_crle.patch
keywords: patch
messages: 384856
nosy: dmurphy18
priority: normal
severity: normal
status: open
title: Solaris 11.4 crle output not handled correctly
versions: Python 3.10, Python 3.7, Python 3.8, Python 3.9
Added file: https://bugs.python.org/file49735/solaris11_crle.patch

___
Python tracker 

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



[issue42882] Restarting the interpreter causes UB on 3.10.0a4

2021-01-11 Thread Yannick Jadoul


Yannick Jadoul  added the comment:

Wow, that was fast! Thanks!

I tried this out locally, and all pybind11's tests pass now. We can try again 
once there's a nightly build or new alpha :-)

--

___
Python tracker 

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



[issue42895] Return multi-line list concatenation without parentheses returns only first operand

2021-01-11 Thread JD-Veiga


New submission from JD-Veiga :

I was trying to return the concatenation of several lists from a function but, 
inadvertently, forgot to surround the multi-line concatenation expression with 
parentheses. 

As a result, the function returns just the first operand and does not perform 
the concatenation at all. 


Basically, I am doing something like this:

```
def non_parens():
return [
1, 2, 3
]
+ [
4, 5
]

print(non_parens())

```

which outputs: `[1, 2, 3]`


On the contrary, parenthesised version such as:

```
def with_parens():
return (
[
1, 2, 3
]
+ [
4, 5
]
)

print(with_parens())

```

will output the "expected" result: `[1, 2, 3, 4, 5]`.


Even not breaking the line before the '+' operator:

```
def no_parens_without_newline_before_operator():
return [
1, 2, 3
] + [
4, 5
]

print(no_parens_without_newline_before_operator())

```

prints `[1, 2, 3, 4, 5]`.



My hypothesis is that first function `non_parens()` does not work because the 
expression has some kind of error after

```
return [
1, 2, 3
]
```

and 

```
+ [
4, 5
]
```

is never executed.


However, why does not the parser or the interpreter raise any error or warning 
about this malformed expression?


"Similar" expressions cause an error:

```
assert [
1, 2, 3
]
+ [
4, 5
]
```

raises: `IndentationError: unexpected indent`

and

```
[
1, 2, 3
]
+ [
4, 5
]
```

raises: `TypeError: bad operand type for unary +: 'list'`


What perplexes me the most about breaking lines in this case is that `] + [` 
works and `]+ [` does not (against PEP8 --of course, PEP8 is not the 
parser).


I am sure that I am missing something about expressions, line breaks, or 
lexical parsing.


I am using Python 3.8.7 and Python 3.9.1



Thank you a lot.

--
components: Interpreter Core
messages: 384854
nosy: JD-Veiga
priority: normal
severity: normal
status: open
title: Return multi-line list concatenation without parentheses returns only 
first operand
type: behavior
versions: 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



[issue42894] Debugging native Python modules on Windows with Visual Studio Toolchain

2021-01-11 Thread Jeff Moguillansky


New submission from Jeff Moguillansky :

I have a question regarding debugging native Python modules on Windows, with 
Visual Studio toolchain:

Currently I have a native module (native C code), along with Python API 
bindings (via Cython), and finally Python code that invokes the native module.  
I also use various third-party python modules like Pillow, etc.  

In order to debug on Windows, I have to use the following tricks:
1) Build the native module in Release Mode
2) Disable Compiler Optimization
3) Enable Debug symbols

I can't just use Python distutils out of the box, I have to manually modify the 
build commands to enable Debugging.

If I just try to build the native module in Debug mode, I get Visual Studio 
compile errors related to: not being able to mix code built with different C++ 
runtime libraries.  
Some of the 3rd-party Python modules are only available as Release builds (not 
Debug builds).

I'm wondering if anyone has encountered a similar issue, and what's your 
advice?  

On Linux, GNU toolchain, this isn't an issue.  The toolchain lets you mix 
release and debug libraries, no problem.

--
components: C API
messages: 384853
nosy: jmoguill2
priority: normal
severity: normal
status: open
title: Debugging native Python modules on Windows with Visual Studio Toolchain
type: compile error
versions: Python 3.10, 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



[issue42891] segfault with gunicorn and a library made with cython bindings

2021-01-11 Thread Amirouche Boubekki


Amirouche Boubekki  added the comment:

The problem is prolly in lsm-db.

ref: https://github.com/coleifer/python-lsm-db/issues/20

Sorry for the noise.

--
resolution:  -> third party
status: open -> closed

___
Python tracker 

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



[issue42848] asyncio produces an unexpected traceback with recursive __getattribute__

2021-01-11 Thread Irit Katriel


Change by Irit Katriel :


--
nosy: +rbcollins

___
Python tracker 

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



[issue42893] Strange XPath search behavior of xml.etree.ElementTree.Element.find

2021-01-11 Thread robpats


New submission from robpats :

Python 3.6.8 / 3.7.9 / 3.8.7

>>> import xml.etree.ElementTree
>>> e = xml.etree.ElementTree.fromstring('>> class="row"/>')
>>> list(e)
[, , 
, , 
, ]
>>> e.find("./div[1]")

>>> e.find("./div[2]")

>>> e.find("./div[3]")

>>> e.find("./hr[1]")

>>> e.find("./hr[2]")




# The following different from XPath implementation in Firefox
# https://developer.mozilla.org/en-US/docs/Web/XPath/Snippets

>>> list(e.iterfind("./*"))
[, , 
, , 
, ]
>>> e.find("./*[1]")

>>> e.find("./*[2]")
   <-- should be 'hr', same as 
e.find("./div[2]") instead of e[2]
>>> e.find("./*[3]")
   <-- same as e.find("./div[3]") instead 
of e[3]
>>> e.find("./*[4]")


>>> list(e.iterfind("./*[@class='row']"))
[, ]
>>> e.find("./*[@class='row'][1]")

>>> e.find("./*[@class='row'][2]")
>>> e.find("./*[@class='row'][3]")
   <--- cannot find element at [2] but 
found at [3]

--
components: Library (Lib)
messages: 384851
nosy: robpats
priority: normal
severity: normal
status: open
title: Strange XPath search behavior of xml.etree.ElementTree.Element.find
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



[issue42882] Restarting the interpreter causes UB on 3.10.0a4

2021-01-11 Thread STINNER Victor


STINNER Victor  added the comment:

Oh. In _PyUnicode_FromId(), I made the assumption that _PyRuntime is left 
unchanged when Py_Initialize()Py_Finalize() is called multiple times. But I was 
wrong, it is always reset to zero. So I wrote PR 24193 to explicitly 
save/restore _PyRuntime.unicode_ids.next_index value.

Using PR 24193, msg384761 example displays "Works" instead of failing with a 
Python fatal error.

--

___
Python tracker 

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



[issue42882] Restarting the interpreter causes UB on 3.10.0a4

2021-01-11 Thread STINNER Victor


Change by STINNER Victor :


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

___
Python tracker 

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



[issue41433] Logging libraries BufferingHandler flushed twice at shutdown

2021-01-11 Thread Irit Katriel


Irit Katriel  added the comment:

I'm assuming the link solved your issue. If you are still having a problem 
please create a new issue, and include a code snippet to show what you are 
doing exactly.

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



[issue42892] AttributeError in email.message.get_body()

2021-01-11 Thread Xavier Hausherr


Xavier Hausherr  added the comment:

Attached PR fix the issue.

--

___
Python tracker 

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



[issue42892] AttributeError in email.message.get_body()

2021-01-11 Thread Roundup Robot


Change by Roundup Robot :


--
keywords: +patch
nosy: +python-dev
nosy_count: 4.0 -> 5.0
pull_requests: +23019
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/24192

___
Python tracker 

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



[issue42892] AttributeError in email.message.get_body()

2021-01-11 Thread Xavier Hausherr


New submission from Xavier Hausherr :

Following this issue: https://bugs.python.org/issue33972

Same bug apply to email.message.get_body() with attached email example and the 
following code: 

from email.policy import default
import email

with open('email_bad_formatted.eml', 'rb') as fp:
msg = email.message_from_binary_file(fp, policy=default)
body = msg.get_body()

> Result:
E   AttributeError: 'str' object has no attribute 'is_attachment'

/usr/local/lib/python3.9/email/message.py:978: AttributeError

--
components: email
files: email_bad_formatted.eml
messages: 384847
nosy: barry, iritkatriel, r.david.murray, xavier2
priority: normal
severity: normal
status: open
title: AttributeError in email.message.get_body()
versions: Python 3.9
Added file: https://bugs.python.org/file49734/email_bad_formatted.eml

___
Python tracker 

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



[issue41116] build on macOS 11 (beta) does not find system-supplied third-party libraries

2021-01-11 Thread seb


seb  added the comment:

Thanks for the help! I tried the instructions, without success. I installed xz 
through homebrew (which needs to be installed on Silicon under /opt/homebrew). 
I can confirm the existance of: /opt/homebrew/Cellar/xz/5.2.5/include/lzma.h

I used CPPFLAGS and also modified the system_include_dirs variable in the 
setup.py file, in both cases lzma.h seems to be ignored.

> system_include_dirs = ['opt/homebrew/include', 
> '/opt/homebrew/Cellar/xz/5.2.5/include']

Am I missing something obvious here? Thanks!

--

___
Python tracker 

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



[issue42891] segfault with gunicorn and a library made with cython bindings

2021-01-11 Thread Amirouche Boubekki


Amirouche Boubekki  added the comment:

I tried to reduce the program by replacing gunicorn / uvicorn dependency with 
threading.Thread and multiprocess.Pool without success.

--

___
Python tracker 

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



[issue42880] ctypes: variadic function call still doesn't work on Apple Silicon

2021-01-11 Thread Ned Deily


Ned Deily  added the comment:

> Seems that we are getting the same libffi.dylib.

I suppose it is still possible that another libffi is being found first. To be 
absolutely sure, you could ask dyld to print the loaded libraries:

$ DYLD_PRINT_LIBRARIES=1 python3.9 test_main.py
[...]
dyld: loaded: <003A027D-9CE3-3794-A319-88495844662D> 
/usr/lib/system/libxpc.dylib
dyld: loaded: <7FBC5290-B2B3-3312-B69A-77378C539520> 
/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/lib-dynload/_ctypes.cpython-39-darwin.so
dyld: loaded: <943473A5-A82B-3E21-8EB3-0BBDF5E605AA> /usr/lib/libffi.dylib
dyld: loaded: <58910956-4F2F-363A-80E5-D5E1C71DD83E> 
/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/lib-dynload/_struct.cpython-39-darwin.so
dyld: loaded: <3444F392-DB43-3AEF-8596-2BFFBBD8EC0C> ./main.dylib
34

But, more importantly, the uname -a output for my M1 is:

Darwin ankl.local 20.2.0 Darwin Kernel Version 20.2.0: Wed Dec  2 20:40:21 PST 
2020; root:xnu-7195.60.75~1/RELEASE_ARM64_T8101 x86_64

Perhaps you have not updated to macOS 11.1 yet?
 
By the way, in your original message's last example, is the output really "3"?

--

___
Python tracker 

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



[issue42891] segfault with gunicorn and a library made with cython bindings

2021-01-11 Thread Amirouche Boubekki


Amirouche Boubekki  added the comment:

> ModuleNotFoundError: No module named 'foobar'

That is not a segfault. The problem I am reporting is a segfault.

It can be reproduced with uvicorn as follow:

from lsm import LSM


db = LSM('db.sqlite')


async def app(scope, receive, send):
assert scope['type'] == 'http'
global db
for (index, (key, value)) in enumerate(db[b'\x00':b'\xFF']):
pass

await send({
'type': 'http.response.start',
'status': 200,
'headers': [
[b'content-type', b'text/plain'],
],
})
await send({
'type': 'http.response.body',
'body': b'Hello, world!',
})

db.close()


Run the above program with: python -X dev -m uvicorn bobo:app

Then in another console: curl http://localhost:8000/

Here is the output:

$ python -X dev -m uvicorn bobo:app
INFO: Started server process [3580316]
INFO: Waiting for application startup.
INFO: ASGI 'lifespan' protocol appears unsupported.
INFO: Application startup complete.
INFO: Uvicorn running on http://127.0.0.1:8000 (Press CTRL+C to quit)
Fatal Python error: Segmentation fault

Current thread 0x7fbb6e49b740 (most recent call first):
  File "./bobo.py", line 10 in app
  File 
"/home/amirouche/.cache/pypoetry/virtualenvs/lsmdb-cTe2806J-py3.8/lib/python3.8/site-packages/uvicorn/middleware/proxy_headers.py",
 line 45 in __call__
  File 
"/home/amirouche/.cache/pypoetry/virtualenvs/lsmdb-cTe2806J-py3.8/lib/python3.8/site-packages/uvicorn/protocols/http/h11_impl.py",
 line 394 in run_asgi
  File "/usr/lib/python3.8/asyncio/events.py", line 81 in _run
  File "/usr/lib/python3.8/asyncio/base_events.py", line 1851 in _run_once
  File "/usr/lib/python3.8/asyncio/base_events.py", line 570 in run_forever
  File "/usr/lib/python3.8/asyncio/base_events.py", line 603 in 
run_until_complete
  File 
"/home/amirouche/.cache/pypoetry/virtualenvs/lsmdb-cTe2806J-py3.8/lib/python3.8/site-packages/uvicorn/server.py",
 line 48 in run
  File 
"/home/amirouche/.cache/pypoetry/virtualenvs/lsmdb-cTe2806J-py3.8/lib/python3.8/site-packages/uvicorn/main.py",
 line 386 in run
  File 
"/home/amirouche/.cache/pypoetry/virtualenvs/lsmdb-cTe2806J-py3.8/lib/python3.8/site-packages/uvicorn/main.py",
 line 362 in main
  File 
"/home/amirouche/.cache/pypoetry/virtualenvs/lsmdb-cTe2806J-py3.8/lib/python3.8/site-packages/click/core.py",
 line 610 in invoke
  File 
"/home/amirouche/.cache/pypoetry/virtualenvs/lsmdb-cTe2806J-py3.8/lib/python3.8/site-packages/click/core.py",
 line 1066 in invoke
  File 
"/home/amirouche/.cache/pypoetry/virtualenvs/lsmdb-cTe2806J-py3.8/lib/python3.8/site-packages/click/core.py",
 line 782 in main
  File 
"/home/amirouche/.cache/pypoetry/virtualenvs/lsmdb-cTe2806J-py3.8/lib/python3.8/site-packages/click/core.py",
 line 829 in __call__
  File 
"/home/amirouche/.cache/pypoetry/virtualenvs/lsmdb-cTe2806J-py3.8/lib/python3.8/site-packages/uvicorn/__main__.py",
 line 4 in 
  File "/usr/lib/python3.8/runpy.py", line 87 in _run_code
  File "/usr/lib/python3.8/runpy.py", line 194 in _run_module_as_main
Segmentation fault (core dumped)

--
resolution: third party -> 
status: closed -> open

___
Python tracker 

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



[issue31904] Python should support VxWorks RTOS

2021-01-11 Thread Peixing Xin


Change by Peixing Xin :


--
pull_requests: +23018
pull_request: https://github.com/python/cpython/pull/24191

___
Python tracker 

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



[issue42848] asyncio produces an unexpected traceback with recursive __getattribute__

2021-01-11 Thread Irit Katriel


Irit Katriel  added the comment:

I've simplified the format() code in the PR, based on the observation that only 
one chained exception is ever emitted. I think it's reasonably simple now.

--

___
Python tracker 

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



[issue42891] segfault with gunicorn and a library made with cython bindings

2021-01-11 Thread STINNER Victor


STINNER Victor  added the comment:

I get a crash without any code, just by running gunicorn. It looks like a bug 
in gunicorn.

---
$ python3.8 -m venv env
$ env/bin/python -m pip install gunicorn
(..)
Successfully installed gunicorn-20.0.4

$ ./env/bin/python -X dev -c 'from gunicorn.app.wsgiapp import run; run()' 
foobar:app 
...)

[2021-01-11 16:14:11 +0100] [32107] [ERROR] Exception in worker process
Traceback (most recent call last):
  (...)
  File 
"/home/vstinner/z/env/lib64/python3.8/site-packages/gunicorn/app/wsgiapp.py", 
line 39, in load_wsgiapp
return util.import_app(self.app_uri)
  File "/home/vstinner/z/env/lib64/python3.8/site-packages/gunicorn/util.py", 
line 358, in import_app
mod = importlib.import_module(module)
  (...)
ModuleNotFoundError: No module named 'foobar'

[2021-01-11 16:14:11 +0100] [32107] [INFO] Worker exiting (pid: 32107)
sys:1: ResourceWarning: unclosed 
ResourceWarning: Enable tracemalloc to get the object allocation traceback
Debug memory block at address p=0x55cfa92154a0: API '1'
3271705103877500672 bytes originally requested
The 7 pad bytes at p-7 are not all FORBIDDENBYTE (0xfd):
at p-7: 0x00 *** OUCH
at p-6: 0x00 *** OUCH
at p-5: 0x00 *** OUCH
at p-4: 0x00 *** OUCH
at p-3: 0x00 *** OUCH
at p-2: 0x00 *** OUCH
at p-1: 0x00 *** OUCH
Because memory is corrupted at the start, the count of bytes requested
   may be bogus, and checking the trailing pad bytes may segfault.
The 8 pad bytes at tail=0x2d67c444d794c3a0 are [2021-01-11 16:14:11 +0100] 
[32113] [INFO] Booting worker with pid: 32113

(...)
---

You should report the issue to gunicorn: 
https://github.com/benoitc/gunicorn/issues

--
resolution:  -> third party
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



[issue42891] segfault with gunicorn and a library made with cython bindings

2021-01-11 Thread Amirouche Boubekki


Amirouche Boubekki  added the comment:

You need to run the program with the following:

  python -X dev -c "from gunicorn.app.wsgiapp import run; run()" --workers=1 
foobar:app

where foobar.py is the code from the previous message.

The crash happen when, the function `app` is executed, hence you need to call 
in another console:

curl http://localhost:8000

note: lsm package can be installed with pip install lsm-db
note2: lsm db can not be installed with py3.9

--

___
Python tracker 

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



[issue42891] segfault with gunicorn and a library made with cython bindings

2021-01-11 Thread STINNER Victor


STINNER Victor  added the comment:

I put the code in a "bla.p" script and I ran it with Python 3.8 on Fedora 33:

python3.8 -m venv env
env/bin/python -m pip install lsm-db
env/bin/python bla.py 

It doesn't crash. Please provide a script reproducing the issue.

Note: lsm-db cannot be installed in Python 3.9 (errors about the removed 
PyTypeObject.tp_print member in C).

--
nosy: +vstinner

___
Python tracker 

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



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

2021-01-11 Thread Irit Katriel


Irit Katriel  added the comment:

Xavier, I think it would be best if you could open a new issue for that, and 
also include code to reproduce the problem.

--

___
Python tracker 

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



[issue42891] segfault with gunicorn and a library made with cython bindings

2021-01-11 Thread Amirouche Boubekki


New submission from Amirouche Boubekki :

Here is a simple way to reproduce:


from lsm import LSM


db = LSM('db.sqlite')

def app(environ, start_response):
"""Simplest possible application object"""

for (index, (key, value)) in enumerate(db[b'\x00':b'\xFF']):
pass

start_response(b'200', {})
return b''

db.close()


In my real program, if I add 'global db' in the function `app`, it does not 
segfault.


program: https://git.sr.ht/~amirouche/segfault
trace: https://wyz.fr/0I-MO

--
messages: 384836
nosy: amirouche
priority: normal
severity: normal
status: open
title: segfault with gunicorn and a library made with cython bindings
type: crash
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



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

2021-01-11 Thread Xavier Hausherr


Xavier Hausherr  added the comment:

The problem still occurs with the _find_body 
 method. The "part.is_attachment()" method can trigger an AttributeError too 
"AttributeError: 'str' object has no attribute 'is_attachment'"

https://github.com/python/cpython/blob/3.9/Lib/email/message.py#L978

--
nosy: +xavier2
versions: +Python 3.9 -Python 3.8

___
Python tracker 

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



[issue42870] Document changed argparse output wrt optional arguments in What's new in Python 3.10

2021-01-11 Thread Tomáš Hrnčiar

Change by Tomáš Hrnčiar :


--
keywords: +patch
nosy: +hrnciar
nosy_count: 5.0 -> 6.0
pull_requests: +23017
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/24190

___
Python tracker 

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



[issue7833] bdist_wininst installers fail to load extensions built with Issue4120 patch

2021-01-11 Thread Mark Dickinson


Change by Mark Dickinson :


--
nosy:  -mark.dickinson

___
Python tracker 

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



[issue42888] Not installed “libgcc_s.so.1” causes parser crash.

2021-01-11 Thread Christian Heimes


Christian Heimes  added the comment:

It might be a packaging or documentation issue. I'm assiging the ticket to 
Matthias. He is the Debian and Ubuntu package maintainer.

--
assignee:  -> doko
nosy: +doko

___
Python tracker 

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



[issue42888] Not installed “libgcc_s.so.1” causes parser crash.

2021-01-11 Thread Xinmeng Xia


Xinmeng Xia  added the comment:

>>uname -a
Linux xxm-System-Product-Name 4.15.0-64-generic #73~16.04.1-Ubuntu SMP Fri Sep 
13 09:56:18 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

>>uname -r
4.15.0-64-generic


>>lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:Ubuntu 16.04.3 LTS
Release:16.04
Codename:   xenial

I download Python from https://www.python.org/downloads/. Then I extract it,run 
install command ./configure,make,sudo make install. I also try the versions of 
Python 3.5-3.10 and even cPython on GitHub. The results are the same. But when 
I try this program on Python 2, the program will not cause core dump. I think 
Python 2 is initially installed with the system, not by me. So I guess no link 
is referred to libgcc_s.so.1 when I install new version of Python.

--

___
Python tracker 

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



[issue42802] distutils: Remove bdist_wininst command

2021-01-11 Thread STINNER Victor


STINNER Victor  added the comment:

I closed the 19 open issues which contained "wininst" in their title as "wont 
fix" with the message:

"The distutils bdist_wininst command has been removed in Python 3.10: see 
bpo-42802."

You can simply search for closed issue which contains "wininst" in their title 
if you want to list them.

--

___
Python tracker 

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



[issue14877] No option to run bdist_wininst against newer msvc versions on non-windows systems

2021-01-11 Thread STINNER Victor


STINNER Victor  added the comment:

The distutils bdist_wininst command has been removed in Python 3.10: see 
bpo-42802.

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



[issue1109963] bdist_wininst ignores build_lib from build command

2021-01-11 Thread STINNER Victor


STINNER Victor  added the comment:

The distutils bdist_wininst command has been removed in Python 3.10: see 
bpo-42802.

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



[issue12200] bdist_wininst install_script not run on uninstall

2021-01-11 Thread STINNER Victor


STINNER Victor  added the comment:

The distutils bdist_wininst command has been removed in Python 3.10: see 
bpo-42802.

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



[issue15321] bdist_wininst installers may terminate with "close failed in file object destructor:\nsys.excepthook is missing\nlost sys.stderr"

2021-01-11 Thread STINNER Victor


STINNER Victor  added the comment:

The distutils bdist_wininst command has been removed in Python 3.10: see 
bpo-42802.

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



[issue17419] bdist_wininst installer should allow install in user directory

2021-01-11 Thread STINNER Victor


STINNER Victor  added the comment:

The distutils bdist_wininst command has been removed in Python 3.10: see 
bpo-42802.

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



[issue4636] bdist_wininst installer with install script raises exception

2021-01-11 Thread STINNER Victor


STINNER Victor  added the comment:

The distutils bdist_wininst command has been removed in Python 3.10: see 
bpo-42802.

--
nosy: +vstinner
resolution:  -> wont fix
stage: test needed -> 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



[issue13038] bdist_wininst installers should warn if target dir is read-only

2021-01-11 Thread STINNER Victor


STINNER Victor  added the comment:

The distutils bdist_wininst command has been removed in Python 3.10: see 
bpo-42802.

--
nosy: +vstinner
resolution:  -> wont fix
stage: needs patch -> 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



  1   2   >