[issue44637] Quoting issue on header Reply-To

2021-07-15 Thread Baptiste
Baptiste added the comment: Thanks David, Here is some other tests I ran Issuing: - msg['Reply-To'] = '"foo Research Inc Foofoo BarBar on Summer Special Friday 050 days (2021-02-31" ' - msg['Reply-To'] = '"foo Research Inc Foofoo

[issue44637] Quoting issue on header Reply-To

2021-07-14 Thread Baptiste
New submission from Baptiste : Hello, When using as_string() on a Reply-To header like the following: msg['Reply-To'] = '"foo Research, Inc. Foofoo BarBar on Summer Special Friday: 0.50 days (2021-02-31)" ' The double quote disappear, which lead to wrong heade

[issue24416] Have date.isocalendar() return a structseq instance

2020-12-15 Thread Baptiste Mispelon
Baptiste Mispelon added the comment: (Apologies if this isn't the right place and/or time for this kind of negative feedback. I'm open to suggestions for a more appropriate venue) I found it disheartening that my work on this ticket has been erased. While I understand

[issue38975] Add direct anchors to regex syntax documentation

2019-12-09 Thread Baptiste Mispelon
Baptiste Mispelon added the comment: I've tried using subsection (level 3) for each syntax element and I'm not sure it's a big improvement. Pros: * Visible ¶ anchors which make it easier to copy/paste a reference link Cons: * headings have a slightly different style (

[issue38975] Add direct anchors to regex syntax documentation

2019-12-04 Thread Baptiste Mispelon
New submission from Baptiste Mispelon : While writing documentation about regexps for a project I help maintain, I wanted to link to some specific aspects of Python's implementation (in my case, non-capturing groups) which are described on https://docs.python.org/3/library/re.html. Ther

[issue35328] Set a environment variable for venv prompt

2018-11-27 Thread Baptiste Darthenay
Baptiste Darthenay added the comment: How the venv prompt name would be displayed in a project like Powerline? Or in VS Code? https://i.ibb.co/JHYrnk2/Screenshot-from-2018-11-27-19-41-47.png Or in my custom prompt? https://gist.github.com/batisteo/c5c9bd87a344cdbfb7a6401648c118a2#file

[issue35328] Set a environment variable for venv prompt

2018-11-27 Thread Baptiste Darthenay
Change by Baptiste Darthenay : -- keywords: +patch pull_requests: +9992 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue35328> ___ _

[issue35328] Set a environment variable for venv prompt

2018-11-27 Thread Baptiste Darthenay
New submission from Baptiste Darthenay : When creating a new virtual env with `python3 -m venv .venv --prompt env`, the prompt information is only used to set a temporary PS1. This information is lost when using custom prompt, for example with ZSH. I propose to set VIRTUAL_ENV_PROMPT

[issue24416] Return a namedtuple from date.isocalendar()

2016-09-20 Thread Baptiste Mispelon
Baptiste Mispelon added the comment: I updated the patch based on Raymond's feedback. I don't know C at all and I tried to mimic the namedtuple usage of timemodule.c as much as I could (until the code compiled and the test suite passed). I still have two questions: * It seems that

[issue24416] Return a namedtuple from date.isocalendar()

2015-06-14 Thread Baptiste Mispelon
Baptiste Mispelon added the comment: Here's a new patch with the name `IsoCalendarDate` used (it also fixes a wrong version in the `versionadded` section in the docs). Thanks -- Added file: http://bugs.python.org/file39705/issue24416_4

[issue24416] Return a namedtuple from date.isocalendar()

2015-06-09 Thread Baptiste Mispelon
Baptiste Mispelon added the comment: For the name, I took (un)inspiration from ParseResult: https://docs.python.org/3/library/urllib.parse.html?highlight=urlparse#urllib.parse.ParseResult Any better suggestion is welcome of course. -- ___ Python

[issue24416] Return a namedtuple from date.isocalendar()

2015-06-09 Thread Baptiste Mispelon
Baptiste Mispelon added the comment: Some C code cleanups suggested by haypo. -- Added file: http://bugs.python.org/file39668/issue24416_3.diff ___ Python tracker <http://bugs.python.org/issue24

[issue24416] Return a namedtuple from date.isocalendar()

2015-06-09 Thread Baptiste Mispelon
Baptiste Mispelon added the comment: Here's a second attempt at a patch which seems to work. I don't know C at all but I used _decimal.c to try and figure out how to use namedtuple in C. The code compiles and the datetime test suite runs. I've added a test for the new featur

[issue24416] Return a namedtuple from date.isocalendar()

2015-06-09 Thread Baptiste Mispelon
Baptiste Mispelon added the comment: I didn't know about issues with pickling. As for the performance issue, is date.isocalendar() really performance critical? I found a precedent for replacing a tuple by a namedtuple: https://hg.python.org/cpython/rev/ef72142eb8a2 I'm trying

[issue24416] Return a namedtuple from date.isocalendar()

2015-06-09 Thread Baptiste Mispelon
Baptiste Mispelon added the comment: As far as I know, using a namedtuple in place of a tuple is fully backwards-compatible. -- ___ Python tracker <http://bugs.python.org/issue24

[issue24416] Return a namedtuple from date.isocalendar()

2015-06-09 Thread Baptiste Mispelon
New submission from Baptiste Mispelon: Currently, `date.isocalendar()` returns a plain tuple of (year, week, weekday). It would be a bit more useful if this tuple could be made into a namedtuple (with fields year, week and weekday). -- components: Library (Lib) messages: 245061 nosy

[issue23511] Broken code example in email module documentation

2015-02-25 Thread Baptiste Mispelon
Baptiste Mispelon added the comment: I wasn't sure if that was going to be out of scope or not. Here's an attached patch that fixes the remaining usages of `open` inside `Doc/includes` to always use a context manager. -- Added file: http://bugs.python.org

[issue23511] Broken code example in email module documentation

2015-02-24 Thread Baptiste Mispelon
Baptiste Mispelon added the comment: Patch attached. -- keywords: +patch Added file: http://bugs.python.org/file38228/issue23511.diff ___ Python tracker <http://bugs.python.org/issue23

[issue23511] Broken code example in email module documentation

2015-02-24 Thread Baptiste Mispelon
New submission from Baptiste Mispelon: The first code example at https://docs.python.org/3.5/library/email-examples.html throws an `AttributeError` because `MIMEText`'s constructor expects a `str` object, not a `bytes` one: >>> # Import smtplib for the actual sending funct

[issue20997] Wrong URL fragment identifier in search result

2014-03-20 Thread Baptiste Mispelon
New submission from Baptiste Mispelon: When doing a search for "PYTHONDONTWRITEBYTECODE" on the 2.7 docs (http://docs.python.org/2/search.html?q=PYTHONDONTWRITEBYTECODE), the first (and only) search result is the following link: http://docs.python.org/2/using/cmdline.html

[issue17802] html.HTMLParser raises UnboundLocalError:

2013-04-20 Thread Baptiste Mispelon
New submission from Baptiste Mispelon: When trying to parse the string `a&b`, the parser raises an UnboundLocalError: {{{ >>> from html.parser import HTMLParser >>> p = HTMLParser() >>> p.feed('a&b') >>> p.close() Traceback (most rece

[issue17746] test_shutil.TestWhich.test_non_matching_mode fails when running as root

2013-04-16 Thread Jean-Baptiste Lallement
Jean-Baptiste Lallement added the comment: Reference on LP: https://bugs.launchpad.net/ubuntu/+source/python3.3/+bug/1169458 -- ___ Python tracker <http://bugs.python.org/issue17

[issue17746] test_shutil.TestWhich.test_non_matching_mode fails when running as root

2013-04-16 Thread Jean-Baptiste Lallement
New submission from Jean-Baptiste Lallement: The test test_shutil.TestWhich.test_non_matching_mode fails when running as root because the temporary file is always writeable for this user. To reproduce on linux: $ sudo python3.3 -E -Wd -tt /usr/lib/python3.3/test/regrtest.py -v -w test_shutil

[issue17286] Make subprocess handling text output with universal_newlines more obious

2013-02-24 Thread Baptiste Lepilleur
New submission from Baptiste Lepilleur: It tooks me a while to figure out that using universal_newlines was the solution to "tell" subprocess that I wanted text string output instead of byte string. A search on stackoverflow shows that this issue is common and the solution near

[issue17285] subprocess.check_output incorrectly state that output is always bytes

2013-02-24 Thread Baptiste Lepilleur
New submission from Baptiste Lepilleur: Documentation states: >>> help( subprocess.check_output ) check_output(*popenargs, timeout=None, **kwargs) Run command with arguments and return its output as a byte string. But the most common usage is: >>> subprocess.check_

[issue16173] Wrong offset on SyntaxError when identifier contains non-ascii characters

2012-10-09 Thread Baptiste Mispelon
New submission from Baptiste Mispelon: When a syntax error happens, the exception that gets printed has an extra line with a caret that helps locate the error. If the line also contains an identifier with non-ascii characters, then this caret is misaligned (too far on the right). I&#x

[issue13386] Document documentation conventions for optional args

2011-11-17 Thread Baptiste Carvello
Baptiste Carvello added the comment: Le 18/11/2011 05:29, Terry J. Reedy a écrit : > > In the following, I give objections to this PO (position only) rule and > suggest an alternative ND (no default) rule: use 'name=default' when there is > a default and '[name]&#x

[issue13386] Document documentation conventions for optional args

2011-11-15 Thread Baptiste Carvello
Baptiste Carvello added the comment: Le 14/11/2011 20:51, Eric Snow a écrit : > > So would it be worth the effort to identify each such place in the > built-ins/stdlib and eventually change them all? I've seen support for doing > so in other tracker issues and think

[issue13386] Document documentation conventions for optional args

2011-11-14 Thread Baptiste Carvello
Baptiste Carvello added the comment: Le 14/11/2011 13:40, Ezio Melotti a écrit : >> 1) she naturally understood the meaning of the [opt] notation > > I guess this depends on her background, I've seen people trying to use [] in > function calls because they saw them in

[issue13386] Document documentation conventions for optional args

2011-11-14 Thread Baptiste Carvello
Baptiste Carvello added the comment: Hi all, here is a relevant user story. I'm afraid it won't help you much, but it highlights the importance of consistent conventions in doc. My girlfriend is learning Python with no prior programing experience. She quite naturally got used to ca

[issue12055] doctest not working on nested functions

2011-05-23 Thread Baptiste Carvello
Baptiste Carvello added the comment: Eric: my bad, I guess I was living in the past, before 3.2 was released :-) Anyway, my 3.2 patch applies to default (6354b4ceba1d), with just a one-line offset for test_doctest.py. All tests pass. By the way, my 2.7 patch was based on 76e5fe8e21fd

[issue12055] doctest not working on nested functions

2011-05-23 Thread Baptiste Carvello
Baptiste Carvello added the comment: here is the patch for 2.7. Dave: I don't know if or when the patch will be accepted, as this is a new feature. In the meantime, you can easily patch your system. As the code changes are all in Python, you don't need to recompile. Going to you

[issue12055] doctest not working on nested functions

2011-05-23 Thread Baptiste Carvello
Baptiste Carvello added the comment: Hello, the attached patch adds the requested feature to 3.2 (the patch is based on 6d67931c63f9), with appropriate doc changes and tests for the new behaviour. It does not apply to 2.7, so I'll send another patch for that soon. -- key

[issue6011] python doesn't build if prefix contains non-ascii characters

2011-05-13 Thread Baptiste Carvello
Baptiste Carvello added the comment: Indeed, I retried with 534a9e274d88 (that was the tip of 3.2 sometime yesterday) and my original problem is solved. Thank you. While I was at it, I ran "make test", and got 3 unusual skips and 1 failure. The skips are test_sax, test_xml

[issue11852] New QueueListener is unusable due to missing threading and queue import

2011-04-15 Thread Baptiste Lepilleur
Changes by Baptiste Lepilleur : -- title: New QueueListener is unusable due to threading and queue import -> New QueueListener is unusable due to missing threading and queue import ___ Python tracker <http://bugs.python.org/issu

[issue11852] New QueueListener is unusable due to threading and queue import

2011-04-15 Thread Baptiste Lepilleur
Baptiste Lepilleur added the comment: Forgot to give the precise python version: Python 3.2 (r32:88445, Feb 20 2011, 21:29:02) [MSC v.1500 32 bit (Intel)] on win32 -- ___ Python tracker <http://bugs.python.org/issue11

[issue11852] New QueueListener is unusable due to threading and queue import

2011-04-15 Thread Baptiste Lepilleur
New submission from Baptiste Lepilleur : How to reproduce: >>> from logging.handlers import QueueListener >>> from multiprocessing import Queue >>> q = Queue(100) >>> l = QueueListener(q) Traceback (most recent call last): File "", line 1, i

[issue10871] argparse example use "file" instead of "open"

2011-01-09 Thread Baptiste Lepilleur
New submission from Baptiste Lepilleur : In section "14.4.3.6. type" of the argparse module, the following code sample is given: >>> parser = argparse.ArgumentParser() >>> parser.add_argument('foo', type=int) >>> parser.add_argument('bar&#

[issue10870] Last line of argparse code samples can not be read on Windows

2011-01-09 Thread Baptiste Lepilleur
New submission from Baptiste Lepilleur : When the code samples from the CHM documentation are displayed, if the lines are too long, a scroll bar is added at the bottom which prevents reading the last line of the code sample. Usually this can be worked-around by making the windows larger, but

[issue6011] python doesn't build if prefix contains non-ascii characters

2010-12-24 Thread Baptiste Carvello
Baptiste Carvello added the comment: Hello, the patch solves the bug for me as well (using locale "C", the filesystem encoding is utf-8). However, I do not understand why the patch checks that the shebang line decodes with both utf-8 and the file's encoding. The shebang line

[issue6011] python doesn't build if prefix contains non-ascii characters

2010-10-29 Thread Baptiste Carvello
Baptiste Carvello added the comment: A little bit more information: the error message comes from Python/pythonrun.c, line 736, in function initfsencoding. This part of the code is protected with a preprocessor #if: #if defined(HAVE_LANGINFO_H) && defined(CODESET) so I tried replac

[issue6011] python doesn't build if prefix contains non-ascii characters

2010-10-29 Thread Baptiste Carvello
Baptiste Carvello added the comment: Hello, I can reproduce the exact same error as Éric. The end of the output is a little bit more informative here: Could not find platform dependent libraries Consider setting $PYTHONHOME to [:] Fatal Python error: Py_Initialize: Unable to get the locale

[issue6011] python doesn't build if prefix contains non-ascii characters

2010-09-13 Thread Baptiste Carvello
Baptiste Carvello added the comment: Eric: the bug does not exist with 2.7, as the Makefile is read as bytes. It exists with 3.1.2. By the way, when I say the bug is solved on 3.2, I only mean the narrow problem of using a non-ascii prefix that *is* decodable with the current locale. I do

[issue6011] python doesn't build if prefix contains non-ascii characters

2010-09-11 Thread Baptiste Carvello
Baptiste Carvello added the comment: Hello, I just tried your patch on latest svn (r84707), but I found out that the problem I reported can no more be reproduced. First, '_locale' seems now to be built earlier. Also, a fallback has been introduced in 'locale.getpreferred

[issue7578] Behavior of operations on a closed file object is not documented correctly

2009-12-26 Thread Baptiste Lepilleur
Changes by Baptiste Lepilleur : -- title: Behavio of operations on a closed file object is not documented correctly -> Behavior of operations on a closed file object is not documented correctly ___ Python tracker <http://bugs.python.org/iss

[issue7578] Behavio of operations on a closed file object is not documented correctly

2009-12-26 Thread Baptiste Lepilleur
New submission from Baptiste Lepilleur : The io.IOBase class doc says: """Note that calling any method (even inquiries) on a closed stream is undefined. Implementations may raise IOError in this case.""" But the io.IOBase.close() method document says: ""

[issue7287] import hook demo does not work

2009-11-08 Thread Baptiste Lepilleur
New submission from Baptiste Lepilleur : The import hook demo in the source directory Python-3.1.1\Demo\imputil\knee.py fails to run correctly: Python 3.1.1 (r311:74483, Aug 17 2009, 17:02:12) [MSC v.1500 32 bit (Intel)] on win32 Type "help", "copyright", "credi

[issue7280] PCBuild instruction says to use nasmw.exe but it no longer exist

2009-11-07 Thread Baptiste Lepilleur
New submission from Baptiste Lepilleur : PCBuild requires nasmw.exe but it no longer exists in the latest version of nasm. I had to rename nasm.exe to nasmw.exe. Would be nice to add this to the readme to avoid confusion... -- components: Build files: nasm-doc.patch keywords: patch

[issue6011] python doesn't build if prefix contains non-ascii characters

2009-05-14 Thread Baptiste Carvello
Baptiste Carvello added the comment: OK, here is also the patch to 'Modules/_io/textio.c', as it is in fact quite trivial. Choose which one you prefer :-) Baptiste -- Added file: http://bugs.python.org/file13984/textio.diff ___ Pyth

[issue6011] python doesn't build if prefix contains non-ascii characters

2009-05-13 Thread Baptiste Carvello
Baptiste Carvello added the comment: And here comes the patch -- keywords: +patch Added file: http://bugs.python.org/file13975/text_file.diff ___ Python tracker <http://bugs.python.org/issue6

[issue6011] python doesn't build if prefix contains non-ascii characters

2009-05-13 Thread Baptiste Carvello
New submission from Baptiste Carvello : I have tried to build python (version 3.1 beta 1) on linux and install it to a non-standard prefix which contains non-ascii utf-8 characters (my locale being utf-8). The build directory's path is ascii-only. The exact configure line is given i

[issue3187] os.listdir can return byte strings

2008-09-04 Thread Baptiste Carvello
Baptiste Carvello <[EMAIL PROTECTED]> added the comment: If, as I understand, it is the application's job to call listdir with bytes or unicode depending on the platform, it might be useful to have a function in the os module telling whether the filesystem is bytes of unicode-native.