[issue41046] unittest: make skipTest a classmethod

2020-06-29 Thread Andrei Daraschenka


Andrei Daraschenka  added the comment:

Hello and thanks for your issue. Can you explain why we need to make method as 
`classmethod` because in your example you don't provide argument for 
`cls.skipTest()`.

--
nosy: +dorosch

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



[issue39672] Segmentation fault on shutdown with shelve & c pickle

2020-06-29 Thread Andrei Daraschenka


Andrei Daraschenka  added the comment:

Hello zd nex

After a little research, it became clear that this drop is due to vague garbage 
collection behavior. As you know, method `__del__` is called by the garbage 
collector and when this happens there is no guarantee that the rest of the 
objects are not yet cleaned.

def __del__(self):
if not hasattr(self, 'writeback'):
return
self.close()

But in the `close` method, synchronization with the disk occurred and objects 
were created for modules that were no longer in memory and, as a result, method 
`dump` fell with an error, because when trying to get module `pickle` it was 
already gone (due to the garbage collector).

Modules/_pickle.c

4353 PickleState *st = _Pickle_GetGlobalState();


But `_Pickle_GetGlobalState` can't return right result because pickle module 
was gone from memory by garbage collector.

In this case, you encountered a problem when the C code tried to use a module 
that was no longer in memory since this module deleted the garbage collector.

--

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



[issue39774] Missing documentation on how to make package executable as script

2020-02-27 Thread Andrei Daraschenka


Change by Andrei Daraschenka :


--
keywords: +patch
nosy: +dorosch
nosy_count: 3.0 -> 4.0
pull_requests: +18037
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/18677

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



[issue39771] EmailMessage.add_header doesn't work

2020-02-27 Thread Andrei Daraschenka


Andrei Daraschenka  added the comment:

Hello, could you please attach minimal-work file for reproduce it?

--
nosy: +dorosch

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



[issue39759] os.getenv documentation is misleading

2020-02-26 Thread Andrei Daraschenka


Change by Andrei Daraschenka :


--
keywords: +patch
nosy: +dorosch
nosy_count: 2.0 -> 3.0
pull_requests: +18024
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/18668

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



[issue39672] SIGSEGV crash on shutdown with shelve & c pickle

2020-02-25 Thread Andrei Daraschenka


Change by Andrei Daraschenka :


--
pull_requests: +18016
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/18655

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



[issue39672] SIGSEGV crash on shutdown with shelve & c pickle

2020-02-25 Thread Andrei Daraschenka


Andrei Daraschenka  added the comment:

Hello
I was finally reproduce your problem.
Probles was in Lib/shelve.py module in method Shelf.sync. When python is shut 
down in classes calls __exit__ methods, in our issues method __exti__ called 
method close() which called method sync(). Method sync() tried sync data 
between disk and memory storage. But if key didn't exists on disk - python has 
error segfault.
I attach path for this problem and I will prepare PR soon.

--
keywords: +patch
Added file: https://bugs.python.org/file48913/shelve.py.patch

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



[issue39672] SIGSEGV crash on shutdown with shelve & c pickle

2020-02-24 Thread Andrei Daraschenka


Andrei Daraschenka  added the comment:

Yes, It's work for me

$ uname -a
Linux laptop 5.3.0-40-generic #32~18.04.1-Ubuntu SMP Mon Feb 3 14:05:59 UTC 
2020 x86_64 x86_64 x86_64 GNU/Linux
$ python3.8 --version
Python 3.8.0
$ python3.8 ce_test_2.py 
start
end

Could you please write about the results of the research with pdb.

--

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



[issue39672] SIGSEGV crash on shutdown with shelve & c pickle

2020-02-24 Thread Andrei Daraschenka


Andrei Daraschenka  added the comment:

Could you give more details for reproduce it because on the latest version 
cpython from master branch it's work
You can debug it with help pdb. Just set breakpoint:

...
test_shelve(data)
breakpoint()
data.close()
...

And try run it step-by-step (press 'S' to go to the next step and press 'll' to 
know where you are now)
https://docs.python.org/3/library/pdb.html#debugger-commands

--
nosy: +dorosch

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



[issue39728] Instantiating enum with invalid value results in ValueError twice

2020-02-24 Thread Andrei Daraschenka


Change by Andrei Daraschenka :


--
keywords: +patch
nosy: +dorosch
nosy_count: 4.0 -> 5.0
pull_requests: +18007
stage: test needed -> patch review
pull_request: https://github.com/python/cpython/pull/18641

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



[issue15474] Differentiate decorator and decorator factory in docs

2020-02-23 Thread Andrei Daraschenka

Andrei Daraschenka  added the comment:

Hi, Andrés Delfino. Are you still working on it? I could help with this issues.

--
nosy: +dorosch

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



[issue39693] tarfile's extractfile documentation is misleading

2020-02-23 Thread Andrei Daraschenka


Change by Andrei Daraschenka :


--
keywords: +patch
nosy: +dorosch
nosy_count: 3.0 -> 4.0
pull_requests: +18005
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/18639

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



[issue39710] "will be returned as unicode" reminiscent from Python 2

2020-02-23 Thread Andrei Daraschenka


Change by Andrei Daraschenka :


--
keywords: +patch
nosy: +dorosch
nosy_count: 2.0 -> 3.0
pull_requests: +17984
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/18619

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



[issue25866] Reference 3. Data Model: miscellaneous minor cleanups on the word "sequence".

2019-11-15 Thread Andrei Daraschenka


Change by Andrei Daraschenka :


--
pull_requests: +16683
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/17175

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



[issue38351] Modernize email example from %-formatting to f-string

2019-11-14 Thread Andrei Daraschenka


Change by Andrei Daraschenka :


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

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