[issue47158] logging.handlers.SysLogHandler doesn't get cleaned up properly on exit if it throws an exception

2022-03-31 Thread Grégory Starck

Grégory Starck  added the comment:

Enji : you can use this then:

```
In [6]: class Fixed(logging.handlers.SysLogHandler):
   ...: def __init__(self, *a, **kw):
   ...: self.socket = None
   ...: super().__init__(*a, **kw)
   ...: def close(self):
   ...: if self.socket is None:
   ...: return
   ...: super().close()
```

that looks to be enough to prevent the issue.

--

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



[issue47158] logging.handlers.SysLogHandler doesn't get cleaned up properly on exit if it throws an exception

2022-03-30 Thread Grégory Starck

Grégory Starck  added the comment:

I guess it could be done relatively easily.

but the question is more: should it be done ?

--

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



[issue47158] logging.handlers.SysLogHandler doesn't get cleaned up properly on exit if it throws an exception

2022-03-29 Thread Grégory Starck

Grégory Starck  added the comment:

I think this is fixed in main, thanks to this:

https://github.com/python/cpython/blob/main/Lib/logging/handlers.py#L862-L863

--
nosy: +gstarck

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



[issue40074] pickle module dump and load: add support for string file names

2022-03-19 Thread Grégory Starck

Grégory Starck  added the comment:

FWIW -1 as well, for same reasons.

--
nosy: +gstarck

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



[issue45625] Add support for top-level await

2021-11-01 Thread Grégory Starck

Grégory Starck  added the comment:

python --async myscript.py ?

--
nosy: +gstarck

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



[issue45511] Batch-mode input() limited to 4095 characters on *NIX

2021-10-25 Thread Grégory Starck

Grégory Starck  added the comment:

> This does not seems to be a copypaste issue.

well. it's either not a prob in my_fgets()/fgets IMO. what the process reads on 
its stdin is already corrupted/broken.

but I'm interrested in knowing more about the issue/original cause.

--

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



[issue45511] Batch-mode input() limited to 4095 characters on *NIX

2021-10-23 Thread Grégory Starck

Grégory Starck  added the comment:

reproduced and also seen in my_fgets.

but strange. it's fgets that seems to return/insert a \n after 4096 chars read 
from stdin :O I dont quite get. at all haha.

now just straced that.. we see 4 read of 1024 bytes/chars. 

and with strace -s 1025 I can see the last one : 

read(0, 
"AAA\n",
 1024) = 1024

so it's a prob in copy/paste of OS or something ?

--
nosy: +g.sta...@gmail.com
versions: +Python 3.10, Python 3.8, Python 3.9

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



[issue43535] Make str.join auto-convert inputs to strings.

2021-03-21 Thread Grégory Starck

Grégory Starck  added the comment:

FWIW -1 from me too.

That should be solved by creating a new function IMO : 

def joinstr(sep, *seq):
return sep.join(str(i) for i in seq)

--
nosy: +g.sta...@gmail.com

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



[issue43125] Trying To Concatenate Bytes and String in SMTPLIB

2021-02-07 Thread Grégory Starck

Grégory Starck  added the comment:

I filled the PR https://github.com/python/cpython/pull/24476

feel free to comment.

--

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



[issue43125] Trying To Concatenate Bytes and String in SMTPLIB

2021-02-07 Thread Grégory Starck

Change by Grégory Starck :


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

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



[issue43125] Trying To Concatenate Bytes and String in SMTPLIB

2021-02-07 Thread Grégory Starck

Change by Grégory Starck :


--
versions: +Python 3.6

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



[issue43125] Trying To Concatenate Bytes and String in SMTPLIB

2021-02-07 Thread Grégory Starck

Grégory Starck  added the comment:

problem seems to/could be in /usr/lib/python3.8/email/base64mime.py


```
def body_encode(s, maxlinelen=76, eol=NL):
r"""Encode a string with base64.

Each line will be wrapped at, at most, maxlinelen characters (defaults to
76 characters).

Each line of encoded text will end with eol, which defaults to "\n".  Set
this to "\r\n" if you will be using the result of this function directly
in an email.
"""
if not s:
return s
```

If function is supposed to return str for any bytes input, then there it is 
returning the original bytes instance.. which is the trouble. it should return 
`""` and that's it ?
 
I would like to work/contribute on this issue.. I'll further investigate this 
issue and possible solution and comes with a patch rather sooner than later..

--

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



[issue43125] Trying To Concatenate Bytes and String in SMTPLIB

2021-02-07 Thread Grégory Starck

Grégory Starck  added the comment:

I reproduced directly. by using a valid smtp server.

--
nosy: +g.sta...@gmail.com

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



[issue41406] BufferedReader causes Popen.communicate losing the remaining output.

2020-07-27 Thread Grégory Starck

Grégory Starck  added the comment:

also affecting 3.6

--
nosy: +g.sta...@gmail.com
versions: +Python 3.6

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



[issue9232] Allow trailing comma in any function argument list.

2015-07-13 Thread Grégory Starck

Grégory Starck added the comment:

Have also been confronted to this bug (imo) and this happen from time to time 
to me : 

I often like to ends my (big) functions defs and calls (those that span over 
multiple lines thus..) with that extra comma, 

so that when/if I add another argument (on a new line) later then there will be 
only a + line in my VCS).

There seems to have a consensus to apply the patch (unless it's not finished?)..

regards,

--
nosy: +g.sta...@gmail.com

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



[issue10682] With '*args' or even bare '*' in def/call argument list, trailing comma causes SyntaxError

2015-07-13 Thread Grégory Starck

Grégory Starck added the comment:

  unneeded consistency

unneeded consistency !:?

I'd say that either there is a full or complete consistency on the mentionned 
point/element of syntax, or there is none .. but an unneeded one.. or an 
half-one, isn't consistent consistency by then ;)

--
nosy: +g.sta...@gmail.com

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



[issue24600] function(**dict) does not accept comma after dict (inside parenthese)

2015-07-09 Thread Grégory Starck

New submission from Grégory Starck:

Consider following:

Python 3.4.0 (default, Jun 19 2015, 14:20:21) 
[GCC 4.8.2] on linux

 def f(**kw): pass

 f(a=1 , )
 # ok

 f(**{'a': 1} )
 # ok

 # but :

 f(**{'a': 1} , )
SyntaxError: invalid syntax
 

shouldn't the last form be also allowed as is the first one ??

if it is: Could I personnaly handle this fix ? I'd be very proud to bring (even 
such a low impact problem) my own stone to Python :)

Kind regards.

--
messages: 246525
nosy: g.sta...@gmail.com
priority: normal
severity: normal
status: open
title: function(**dict) does not accept comma after dict (inside parenthese)
versions: Python 3.4

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