[issue40317] inspect.getsource() examines incorrect target

2020-04-18 Thread Grzegorz Krasoń

New submission from Grzegorz Krasoń :

Based on the attached example:

Expected output:
```
123
class Number:
payload = 123

321
class Number:
payload = 321
```

Actual output:
```
123
class Number:
payload = 123

321
class Number:
payload = 123
```

Reproduced using:

* Python 2.7.17
* Python 3.7.7
* Python 3.8.2

--
components: Library (Lib)
files: demo.py
messages: 366701
nosy: Grzegorz Krasoń
priority: normal
severity: normal
status: open
title: inspect.getsource() examines incorrect target
type: behavior
versions: Python 2.7, Python 3.7, Python 3.8
Added file: https://bugs.python.org/file49072/demo.py

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



[issue39818] Declaring local variable invalidates access to a global variable

2020-03-01 Thread Grzegorz Krasoń

Grzegorz Krasoń  added the comment:

Thanks!

--

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



[issue39818] Declaring local variable invalidates access to a global variable

2020-03-01 Thread Grzegorz Krasoń

New submission from Grzegorz Krasoń :

I'm not certain if this is intended behavior, but I would like to make sure. 
Please resolve with the lowest priority.

It seems tricky that line #6 can influence instruction that chronologically 
appears earlier. Especially taking into account that line #6 is never executed.

--
components: Interpreter Core
files: demo.py
messages: 363099
nosy: Grzegorz Krasoń
priority: normal
severity: normal
status: open
title: Declaring local variable invalidates access to a global variable
type: behavior
versions: Python 3.8
Added file: https://bugs.python.org/file48941/demo.py

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



[issue39668] segmentation fault on calling __reversed__()

2020-02-18 Thread Grzegorz Krasoń

Grzegorz Krasoń  added the comment:

I confirm. 3.8.1 is fixed. Thank you and sorry for bothering.

--

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



[issue39668] segmentation fault on calling __reversed__()

2020-02-18 Thread Grzegorz Krasoń

Grzegorz Krasoń  added the comment:

Python 3.8.0 (default, Oct 23 2019, 18:51:26) [GCC 9.2.0] on linux
Linux anarchy 4.19.91-1-lts #1 SMP Sat, 21 Dec 2019 16:34:46 + x86_64 
GNU/Linux
Intel(R) Core(TM) i5-6200U CPU @ 2.30GHz

--

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



[issue39668] segmentation fault on calling __reversed__()

2020-02-17 Thread Grzegorz Krasoń

New submission from Grzegorz Krasoń :

This causes segmentation fault:

list((lambda: None).__annotations__.__reversed__())

--
components: Interpreter Core
messages: 362164
nosy: Grzegorz Krasoń
priority: normal
severity: normal
status: open
title: segmentation fault on calling __reversed__()
type: crash
versions: Python 3.8

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



[issue37646] eval() in a list comprehension

2019-07-24 Thread Grzegorz Krasoń

Grzegorz Krasoń  added the comment:

I re-opened the issue.

Dear core developers, can we ask you to confirm if described behavior of eval() 
is expected?

--

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



[issue37646] eval() in a list comprehension

2019-07-24 Thread Grzegorz Krasoń

Change by Grzegorz Krasoń :


--
resolution: not a bug -> 
status: closed -> open

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



[issue37646] eval() in a list comprehension

2019-07-22 Thread Grzegorz Krasoń

Grzegorz Krasoń  added the comment:

Steven, I believed that any `` replaced by `eval('')` 
will not change behaviour of the code. Now I understand that my assumption was 
incorrect.

Raymond, thanks for helping me understand this.

--
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

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



[issue37646] eval() in a list comprehension

2019-07-21 Thread Grzegorz Krasoń

New submission from Grzegorz Krasoń :

eval() works in a global scope when invoked in a list comprehension.

--
components: Interpreter Core
files: demo.py
messages: 348271
nosy: Grzegorz Krasoń
priority: normal
severity: normal
status: open
title: eval() in a list comprehension
type: behavior
versions: Python 3.7
Added file: https://bugs.python.org/file48495/demo.py

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



[issue25952] code_context not available in exec()

2015-12-25 Thread Grzegorz Krasoń

New submission from Grzegorz Krasoń:

inspect.stack()[n].code_context() is empty when context is created by exec()

--
files: issue.py
messages: 256998
nosy: Grzegorz Krasoń
priority: normal
severity: normal
status: open
title: code_context not available in exec()
type: behavior
versions: Python 3.5
Added file: http://bugs.python.org/file41421/issue.py

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue25952>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com