[issue45593] SpooledTemporaryFile.truncate returns None

2021-10-23 Thread Maciej Urbański

Change by Maciej Urbański :


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

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



[issue45593] SpooledTemporaryFile.truncate returns None

2021-10-23 Thread Maciej Urbański

New submission from Maciej Urbański :

Related:
https://bugs.python.org/issue40287
https://bugs.python.org/msg319145

--
components: Library (Lib)
messages: 404914
nosy: rooter
priority: normal
severity: normal
status: open
title: SpooledTemporaryFile.truncate returns None
type: behavior
versions: Python 3.11

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



[issue26528] NameError for built in function open when re-raising stored exception from yielded function

2018-01-04 Thread Maciej Urbański

Maciej Urbański <roo...@kyberian.net> added the comment:

Reproduced in both v3.6.4 and v3.7.0a3

--
nosy: +rooter
versions: +Python 3.6, Python 3.7

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



[issue15013] smtplib: add low-level APIs to doc?

2016-10-13 Thread Maciej Urbański

Maciej Urbański added the comment:

I guess documenting `data` method may still be needed after all. For now I 
followed the suggestions from comments to best of my ability.

Please see attached patch.

--
keywords: +patch
nosy: +rooter
Added file: http://bugs.python.org/file45086/issue15013.patch

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



[issue27908] del _limbo[self] KeyError

2016-09-15 Thread Maciej Urbański

Maciej Urbański added the comment:

To address @Dima.Tisnek concern I have changed exception message in case thread 
start process is merely in progress.

I kept `self._started` check under a lock so we can avoid more extreme race 
condition of one thread checking `self._started` right before another sets it 
and exits the limbo.

As for testing `self._started` under a lock, but setting it without one. I'm 
avoiding it only because of performance reasons. The read is super cheap, while 
notification of `.set()` is more complex, so if aesthetics are only reasons for 
doing it there then I would advise against holding that lock while executing it.

Of course I could also do a `self in _active` check under a lock, but that is 
slightly more costly, than `self._started` check and not any more useful.

I may be prematurely optimizing things, but people tend to like they threads to 
startup ASAP.

--
Added file: http://bugs.python.org/file44677/issue27908_2.patch

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



[issue27908] del _limbo[self] KeyError

2016-09-13 Thread Maciej Urbański

Maciej Urbański added the comment:

@Dima.Tisnek, only reason for having both of these conditions together is so I 
won't have to repeat the same error message in the code at little price of the 
performance in this edge case (trying to start the same thread multiple times).

Unless I'm missing something there should be no way how it would make this lock 
required for setting `self._started`.

--

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



[issue27908] del _limbo[self] KeyError

2016-09-13 Thread Maciej Urbański

Maciej Urbański added the comment:

Successfully reproduced on 2.7.12 and 3.5.2 .
Currently there seems to be no protection against starting the same thread 
twice at the same time. What was checked was only if start operation already 
finished once.

Attached patch makes it so limbo, our starting threads' waiting room, is 
checked first.

--
keywords: +patch
nosy: +rooter
versions: +Python 2.7, Python 3.5
Added file: http://bugs.python.org/file44643/issue27908.patch

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