[issue39854] f-strings with format specifiers have wrong col_offset

2022-01-22 Thread Stéphane Blondon
Stéphane Blondon added the comment: I can reproduce it on python 3.8. I can't reproduce it on python 3.9 or 3.10. -- nosy: +sblondon ___ Python tracker <https://bugs.python.org/is

[issue43196] logging.config.dictConfig shuts down socket for existing SysLogHandlers

2022-01-22 Thread Stéphane Blondon
Stéphane Blondon added the comment: I can reproduce the error on Debian/testing with: - Python 3.9.9 - Python 3.10.0 -- nosy: +sblondon status: pending -> open ___ Python tracker <https://bugs.python.org/issu

[issue42914] pprint numbers with underscore

2021-03-14 Thread Stéphane Blondon
Change by Stéphane Blondon : -- keywords: +patch pull_requests: +23624 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24864 ___ Python tracker <https://bugs.python.org/issu

[issue42914] pprint numbers with underscore

2021-03-14 Thread Stéphane Blondon
Stéphane Blondon added the comment: Thank you Felipe for the news! :) I have committed a PR about this issue. Two remarks: - I changed the proposed implementation from 'format(integer, '_d')' to '{:_d}.format(integer)' because the first way raised an exception. (

[issue42914] pprint numbers with underscore

2021-03-22 Thread Stéphane Blondon
Stéphane Blondon added the comment: I changed the default to be backward compatible (so underscore_numbers=False). I think it would be better with underscore_numbers enabled by default but I understand the need for stability. Perhaps such break could be done in the future (in version 3.12 or

[issue42589] doc: Wrong "from" keyword link in Exceptions doc

2021-04-30 Thread Stéphane Blondon
Change by Stéphane Blondon : -- pull_requests: +24445 stage: backport needed -> patch review pull_request: https://github.com/python/cpython/pull/25755 ___ Python tracker <https://bugs.python.org/issu

[issue41411] Improve and consolidate f-strings docs

2021-05-02 Thread Stéphane Blondon
Stéphane Blondon added the comment: It seems ezio-melotti hesitates to continue the modifications in the PR https://github.com/python/cpython/pull/21552#pullrequestreview-458400056 IMO, the PR improves enough the documentation, so it would be nice to merge it, even without the other changes

[issue15373] copy.copy() does not properly copy os.environment

2021-08-16 Thread Stéphane Blondon
Stéphane Blondon added the comment: I think an asdict() method is not necessary. Instanciating a dict from os.environ is enough: >>> import os >>> os.environ environ({'SHELL': '/bin/bash', ...}) >>> dict(os.environ) {'SHELL': '/

[issue45095] Easier loggers traversal tree with a logger.getChildren method

2021-09-03 Thread Stéphane Blondon
New submission from Stéphane Blondon : Currently, logging.root.manager.loggerDict is usable to do a homemade traversal of the loggers tree. However, it's not a public interface. Adding a 'logger.getChildren()' method would help to implement the traversal. The method would

[issue42914] pprint numbers with underscore

2021-10-05 Thread Stéphane Blondon
Stéphane Blondon added the comment: Python 3.10 has now been released with the underscore_numbers parameter. I wonder which release could enable the parameter by default (so it would break the previous behavior): - the next release (3.11) is probably too short. - the safest strategy is to

[issue42914] pprint numbers with underscore

2021-10-09 Thread Stéphane Blondon
Stéphane Blondon added the comment: Ok, I will not send a PR to change the current behavior until python4 (in case it exists one day). -- ___ Python tracker <https://bugs.python.org/issue42

[issue41724] SQLite returns "str" instead of "datetime.datetime" with aggregate queries.

2020-12-19 Thread Stéphane Blondon
Change by Stéphane Blondon : -- keywords: +patch nosy: +sblondon nosy_count: 5.0 -> 6.0 pull_requests: +22720 stage: -> patch review pull_request: https://github.com/python/cpython/pull/23855 ___ Python tracker <https://bugs.python.org/i

[issue42589] doc: Wrong "from" keyword link in Exceptions doc

2020-12-20 Thread Stéphane Blondon
Change by Stéphane Blondon : -- keywords: +patch nosy: +sblondon nosy_count: 2.0 -> 3.0 pull_requests: +22734 stage: -> patch review pull_request: https://github.com/python/cpython/pull/23872 ___ Python tracker <https://bugs.python.org/i

[issue18163] Add a 'key' attribute to KeyError

2020-12-20 Thread Stéphane Blondon
Stéphane Blondon added the comment: Orian: your patch formats the error message but the original suggested solution is to store the missing key in a new attribute. I don't know if you go in the good direction. Adding an attribute is also suggested by issue #614557. --

[issue37779] configparser: add documentation about several read() behaviour

2020-12-24 Thread Stéphane Blondon
Stéphane Blondon added the comment: Merged by Łukasz Langa in september 2020. (Thanks Łukasz) -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue42643] http.server does not support HTTP range requests

2020-12-24 Thread Stéphane Blondon
Stéphane Blondon added the comment: RangeHTTPServer seems to support python3: there is a try-except clause to manage the different import of SimpleHTTPServer: https://github.com/danvk/RangeHTTPServer/blob/master/RangeHTTPServer/__main__.py#L13 The code is under Apache 2.0 licence. I don&#

[issue18163] Add a 'key' attribute to KeyError

2021-02-12 Thread Stéphane Blondon
Stéphane Blondon added the comment: I'm interested by such feature. I see examples of versions of the message provided by KeyError: - sometimes with a message (for example `PyErr_SetString(PyExc_KeyError, "name too long");` at [1]) - sometimes with the missing k

[issue42914] pprint numbers with underscore

2021-02-25 Thread Stéphane Blondon
Stéphane Blondon added the comment: I add the same idea but later than you, so I'm interested by such feature. Felipe: do you want to add a pull request to this issue (with Serhiy Storchaka implementation because it's the simplest one)? If not, I plan to write it. I will write

[issue37779] configparser: add documentation about several read() behaviour

2019-08-06 Thread Stéphane Blondon
New submission from Stéphane Blondon : The documentation is not explicit about the behaviour if several files are read by the same ConfigParser: the data are not reset between two read(). I suggest to add such information in the documentation. There is a draft: === start === When a

[issue37779] configparser: add documentation about several read() behaviour

2019-08-08 Thread Stéphane Blondon
Change by Stéphane Blondon : -- keywords: +patch pull_requests: +14908 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/15177 ___ Python tracker <https://bugs.python.org/issu

[issue37779] configparser: add documentation about several read() behaviour

2019-08-08 Thread Stéphane Blondon
Stéphane Blondon added the comment: Thank you for the idea. :) I committed something else, based on the previous example of the 'Quick Start' section. What do you think about it? -- ___ Python tracker <https://bugs.python.o

[issue32234] Add context management to mailbox.Mailbox

2018-03-23 Thread Stéphane Blondon
Stéphane Blondon added the comment: I don't know about something blocking the merge. I sent a message to Barry on Github the 3th january but perhaps it was a wrong timing (too soon after new year). -- ___ Python tracker <https://bugs.py

[issue32234] Add context management to mailbox.Mailbox

2018-03-28 Thread Stéphane Blondon
Stéphane Blondon added the comment: The availability of context manager does not make it mandatory if it does not fit some needs. > In the last example on https://docs.python.org/3/ > library/mailbox.html#examples inbox is locked and unlocked multiple > times. The with statement co

[issue33183] Refactoring: replacing some assertTrue by assertIn

2018-03-29 Thread Stéphane Blondon
New submission from Stéphane Blondon : In several cases, tests use ```self.assertTrue(a in b)```. Using ```self.assertIn(a, b)``` seems to be better. For examples: ./Lib/test/test_inspect.py: self.assertTrue('(po, pk' in repr(sig)) ./Lib/test/test_configparser.py: self.

[issue33256] module is not displayed by cgitb.html

2018-04-10 Thread Stéphane Blondon
New submission from Stéphane Blondon : The html produced by cgitb.html() does not display because the square brackets are interpreted as a html tag (see the picture in attachement). This bug occurs if the code is called directly in the module, not inside a function or a class

[issue33256] module is not displayed by cgitb.html

2018-04-10 Thread Stéphane Blondon
Change by Stéphane Blondon : -- type: -> behavior ___ Python tracker <https://bugs.python.org/issue33256> ___ ___ Python-bugs-list mailing list Unsubscrib

[issue33256] module is not displayed by cgitb.html

2018-04-10 Thread Stéphane Blondon
Change by Stéphane Blondon : -- keywords: +patch pull_requests: +6138 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue33256> ___ ___ Py

[issue33311] cgitb: remove parentheses when the error is in module

2018-04-18 Thread Stéphane Blondon
New submission from Stéphane Blondon : The cgitb module displays a traceback in text or html. When a module is called, there are no parameters (displayed as '()'). I think they are unnecessary and the parentheses should be removed. ### example for the text version ### $ pytho

[issue33311] cgitb: remove parentheses when the error is in module

2018-04-18 Thread Stéphane Blondon
Change by Stéphane Blondon : -- keywords: +patch pull_requests: +6215 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue33311> ___ ___ Py

[issue3356] some tests fail with 'make EXTRA_CFLAGS="-DPy_DEBUG"' (test_distutils, test_set)

2018-04-18 Thread Stéphane Blondon
Change by Stéphane Blondon : -- pull_requests: +6216 ___ Python tracker <https://bugs.python.org/issue3356> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue33311] cgitb: remove parentheses when the error is in module

2018-05-01 Thread Stéphane Blondon
Change by Stéphane Blondon : -- pull_requests: +6371 ___ Python tracker <https://bugs.python.org/issue33311> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue33507] Improving the html rendered by cgitb.html

2018-05-14 Thread Stéphane Blondon
New submission from Stéphane Blondon : cgitb.html() returns HTML code viewable in a browser. It would be nice to improve the rendering to have something more readable (increase space between each call, increase contrast for the source code) and more modern. You can see the difference in the

[issue33507] Improving the html rendered by cgitb.html

2018-05-14 Thread Stéphane Blondon
Stéphane Blondon added the comment: current.png is a screenshot of the html shown in a browser with 3.8 branch next.png is a screenshot of the modified cgitb.html() function. -- Added file: https://bugs.python.org/file47589/current.png ___ Python

[issue33507] Improving the html rendered by cgitb.html

2018-05-15 Thread Stéphane Blondon
Change by Stéphane Blondon : -- keywords: +patch pull_requests: +6529 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue33507> ___ ___ Py

[issue33507] Improving the html rendered by cgitb.html

2018-05-18 Thread Stéphane Blondon
Stéphane Blondon added the comment: > Instead of hardcoding colors, would it be better to use CSS instead. I agree with you. The current source code contains hardcoded colors. I could add an optional parameter to change the css for the cgitb.html() function: def html(einfo, context=5,

[issue33507] Improving the html rendered by cgitb.html

2018-06-20 Thread Stéphane Blondon
Stéphane Blondon added the comment: I added the optional parameter to cgitb.html() function and removed the hardcoded css from the html code. I think there are still several improvements to do: - add documentation for the new parameter of cgitb.html() - add the same parameter to cgitb.enable