[issue15679] HTMLParser can fail on unquoted attributes.

2012-08-16 Thread Julien Palard
New submission from Julien Palard: This is accepted by browsers but raises an exception in HTMLParser : from HTMLParser import HTMLParser HTMLParser().feed(a onclick=foo({bar:42}); class=baz) -- components: Library (Lib) messages: 168352 nosy: JulienPalard priority: normal severity

[issue17981] SysLogHandler closes connection before using it

2013-05-15 Thread Julien Palard
New submission from Julien Palard: I have a script that close its socket to /dev/log immediatly before using it, causing it to fail, here is the code : {{{ #!/usr/bin/env python # -*- coding: utf-8 -*- import logging import logging.handlers import daemon from daemon.pidlockfile import

[issue17981] SysLogHandler closes connection before using it

2013-05-16 Thread Julien Palard
Julien Palard added the comment: I understand the files_preserve parameter, the bug I'm filling is the innability of SysLogHandler to reopen the socket, although it tries : // DaemonContext closing all FDs: close(3)= 0 close(2)= 0

[issue21216] getaddrinfo is wrongly considered thread safe on linux

2014-04-14 Thread Julien Palard
New submission from Julien Palard: I just found that python consider linux implementation of getaddrinfo thread safe : ./python2.6-2.6.8/Modules/socketmodule.c:180 /* On systems on which getaddrinfo() is believed to not be thread-safe

[issue8706] accept keyword arguments on most base type methods and builtins

2014-07-21 Thread Julien Palard
Julien Palard added the comment: I think for some builtins it may be usefull to have keyword arguments, in the case they take more than one parameter. Typically, it's impossible to write: self.drop_elements(partial(isinstance, type(lxml.etree.Comment))) Because isinstance take its

[issue23043] doctest ignores from __future__ import print_function

2014-12-23 Thread Julien Palard
Julien Palard added the comment: Works for me in 2.7.8: $ python --version Python 2.7.8 # cat /tmp/test.py #!/usr/bin/env python from __future__ import print_function def toto(): print (42, 43) 42 43 return 42 $ python -m doctest -v /tmp/test.py Trying: print (42

[issue24486] http/client.py block indefinitely on line 308 in _read_status

2015-06-24 Thread Julien Palard
Changes by Julien Palard mandark@gmail.com: -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24486 ___ ___ Python-bugs

[issue24486] http/client.py block indefinitely on line 308 in _read_status

2015-06-24 Thread Julien Palard
Julien Palard added the comment: OK, so, requests have a `timeout` and take it into account, and it solves my problem. Yet I don't understand one little thing: With both requests `timeout` parameter set or unset, the exact same http.client.py:_read_status call the same socket.readinto

[issue24486] http/client.py block indefinitely on line 308 in _read_status

2015-06-22 Thread Julien Palard
New submission from Julien Palard: Requesting HTTP using `requests`, which uses `http.client` which use `socket`, sometimes, my program get stuck like this: ``` File /usr/lib/python3.2/socket.py, line 287 in readinto File /usr/lib/python3.2/http/client.py, line 308 in _read_status File /usr

[issue24486] http/client.py block indefinitely on line 308 in _read_status

2015-06-23 Thread Julien Palard
Julien Palard added the comment: I only have a `socket.setdefaulttimeout(10)` just after my imports... -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24486

[issue28866] Type cache is not correctly invalidated on a class defining mro()

2017-02-18 Thread Julien Palard
Julien Palard added the comment: Hi, Tried again, this time getting some stats with MCACHE_STATS 1, to check if my patch is defeating the cache: Without my patch: $ time ./python performance/benchmarks/bm_chaos.py --worker -l1 -w0 -n1 --filename chaos.ppm --width=512 --height=512

[issue24339] iso6937 encoding missing

2017-02-19 Thread Julien Palard
Julien Palard added the comment: John: You should probably package this as a pip module alongisde with a git repository, at least to measure qty of interested persones, and get some feedback / contributions. -- ___ Python tracker <

[issue28754] Argument Clinic for bisect.bisect_left

2017-02-19 Thread Julien Palard
Changes by Julien Palard <julien+pyt...@palard.fr>: -- pull_requests: +143 ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue28754> ___

[issue29594] implementation of __or__ in enum.auto

2017-02-19 Thread Julien Palard
Julien Palard added the comment: Your implementation looks right, but I don't see the point of defining combinations AB, AC, ABD in the Foo enum. Foo may only define A, B, C, D and outside of Foo anyone can build any needed combinations. This way it looks clear in the Foo declaration (4 lines

[issue28685] Optimizing list.sort() by performing safety checks in advance

2016-11-14 Thread Julien Palard
Julien Palard added the comment: Hi Elliot, nice spot! Why are you redefining Py_ABS, which looks already defined in `pymacro.h` included itself by `Python.h`? I'm not fan of undefining it later, it may surprise someone later expecting it to be there. I tried to compile without your

[issue24339] iso6937 encoding missing

2016-11-14 Thread Julien Palard
Julien Palard added the comment: @Serhiy @haypo: Popular enough or not, it may start as a lib on pypi, we'll see its usage from here. -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/i

[issue28754] Argument Clinic for bisect.bisect_left

2016-11-25 Thread Julien Palard
Julien Palard added the comment: Quoting @martin > * bisect_right(a, x[, lo[, hi]]) -> index > This signature is removed. I think removing it is reasonable, because pydoc > can extract the proper signature from the Arg Clinic metadata. In fact, http://docs.python.org/howto/clinic.

[issue28754] Argument Clinic for bisect.bisect_left

2016-11-26 Thread Julien Palard
Julien Palard added the comment: Should we also update howto/clinic, bullet "11.", to be explicit about not adding per-parameter in the same patch? Like a: > If you're porting existing function to Argument clinic, skip this step to > simp

[issue28754] Argument Clinic for bisect.bisect_left

2016-11-26 Thread Julien Palard
Julien Palard added the comment: Here is the new patch, I ran a diff between "./python -m pydoc _bisect" before and after my patch, here it is: 13,15c13 < bisect_left(...) < bisect_left(a, x[, lo[, hi]]) -> index < --- > bisect_left(a,

[issue26483] docs unclear on difference between str.isdigit() and str.isdecimal()

2016-11-26 Thread Julien Palard
Julien Palard added the comment: Proposing a patch. -- keywords: +patch Added file: http://bugs.python.org/file45653/issue26483.diff ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/i

[issue26363] __builtins__ propagation is misleading described in exec and eval documentation

2016-11-26 Thread Julien Palard
Julien Palard added the comment: Hi Xavier, thanks for reporting, Your first point is right, the implementation being: if (PyDict_GetItemString(globals, "__builtins__") == NULL) { if (PyDict_SetItemString(globals, "__builtins__", PyEval

[issue28754] Argument Clinic for bisect.bisect_left

2016-11-26 Thread Julien Palard
Julien Palard added the comment: Hi Raymond, > Curiously, this patch gives about a 10% to 15% speedup. Any sense of how > that improvement arises? That's because Argument Clinic is generating methoddef with METH_FASTCALL: $ grep FASTCALL Modules/clinic/_bisectmodule.c.h {"b

[issue28754] Argument Clinic for bisect.bisect_left

2016-11-26 Thread Julien Palard
Julien Palard added the comment: Hi Serhiy, hi: Py_ssize_t(py_default="len(a)") = -1 Won't works, as pydoc will use the inspect module (_signature_fromstr) to get the signature. _signature_fromstr expects a valid python signature, but `def foo(a, x, lo=0, high=len(a)): pass` is

[issue24339] iso6937 encoding missing

2016-11-26 Thread Julien Palard
Julien Palard added the comment: According to https://webstore.iec.ch/preview/info_isoiec6937%7Bed3.0%7Den.pdf: > NOTE: The shaded positions 00/00 to 01/15 and 07/15 to 09/15 are outside the > scope of this International Standard. So it's clear to me that they are not undefined, they ar

[issue28754] Argument Clinic for bisect.bisect_left

2016-11-26 Thread Julien Palard
Julien Palard added the comment: Hi Serhiy, > Julien, you can declare the hi parameter as >hi: Py_ssize_t(py_default="len(a)") = -1 Looks like a good idea, I was aware of its existance but did not took the time to read the doc about it, kind of learning step by stpe. But

[issue28753] Clinic: Converting Your First Function is not up to date

2016-11-23 Thread Julien Palard
Julien Palard added the comment: Reopening to remind @Victor we have a question about METH_FASTCALL. -- status: closed -> open ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.or

[issue28772] Bus error in Python 3.6.0beta

2016-11-22 Thread Julien Palard
Julien Palard added the comment: I can't reproduce the issue: $ ./python Python 3.6.0b4+ (default, Nov 23 2016, 00:23:59) [GCC 5.4.1 20160904] on linux Type "help", "copyright", "credits" or "license" for more information. >>> o

[issue28754] Argument Clinic for bisect.bisect_left

2016-11-24 Thread Julien Palard
Julien Palard added the comment: New simplier patch thanks to https://bugs.python.org/issue28792. Also corrected docstrings. Also ran a micro-benchmark of `bisect.bisect(foo, "c")` with `foo = list("abcdef")`: Median +- std dev: [before] 434 ns +- 17 ns -> [after]

[issue28792] bisect: implement aliases in Python, remove C aliases

2016-11-24 Thread Julien Palard
Julien Palard added the comment: LGTM -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue28792> ___ ___ Python-bugs-list mailing list

[issue28793] Copy-paste error in collections.abc docs for AsyncGenerator

2016-11-24 Thread Julien Palard
Julien Palard added the comment: Proposed a simple patch. Error was introduced by "Issue #28720: Add collections.abc.AsyncGenerator.", git commit c75c1f44, hg changeset 105163. I reread it and did not find other occurrences of the error. -- keywords: +patch nosy: +mdk

[issue28795] Misleading stating, that SIGINT handler is installed by default

2016-11-24 Thread Julien Palard
Julien Palard added the comment: Maybe something like: > Python installs a small number of signal handlers by default: SIGPIPE is > ignored (so write errors on pipes and sockets can be reported as ordinary > Python exceptions) and SIGINT (if parent process has not changed it) is >

[issue28796] FIX warnings in documentation build

2016-11-24 Thread Julien Palard
New submission from Julien Palard: Just a little patch to fix 4 doc build warning. -- messages: 281673 nosy: mdk priority: normal severity: normal status: open title: FIX warnings in documentation build ___ Python tracker <rep...@bugs.python.

[issue28796] FIX warnings in documentation build

2016-11-24 Thread Julien Palard
Changes by Julien Palard <julien+pyt...@palard.fr>: -- keywords: +patch Added file: http://bugs.python.org/file45631/issue28796.diff ___ Python tracker <rep...@bugs.python.org> <http://bugs.python

[issue28753] Clinic: Converting Your First Function is not up to date

2016-11-24 Thread Julien Palard
Julien Palard added the comment: After a discussion with Victor, I propose a patch to update the documentation allowing users strictly following the doc to let Clinic use FASTCALLs, it's a nice performance gain, and it's safe to let clinic use it. -- Added file: http://bugs.python.org

[issue28796] FIX warnings in documentation build

2016-11-24 Thread Julien Palard
Changes by Julien Palard <julien+pyt...@palard.fr>: -- assignee: -> docs@python components: +Documentation nosy: +docs@python versions: +Python 3.7 ___ Python tracker <rep...@bugs.python.org> <http://bugs.pyt

[issue28820] Typo in section 6 of the Python 3.4 documentation

2016-11-28 Thread Julien Palard
Julien Palard added the comment: Hi Rares thanks for reporting. While building a patch for this issue I found another occurrence of the error. -- keywords: +patch nosy: +mdk Added file: http://bugs.python.org/file45672/issue28820.diff ___ Python

[issue28754] Argument Clinic for bisect.bisect_left

2016-11-28 Thread Julien Palard
Julien Palard added the comment: Hi Raymond, About Argument Clinic # Just to clarify the situation, Argument Clinic allows for clear method signature, typically: `hi: Py_ssize_t(py_default="len(a)") = -1` gives the expected "hi=len(a)" signature succes

[issue28754] Argument Clinic for bisect.bisect_left

2016-11-24 Thread Julien Palard
Changes by Julien Palard <julien+pyt...@palard.fr>: Added file: http://bugs.python.org/file45626/issue28754-4.diff ___ Python tracker <rep...@bugs.python.org> <http://bugs.python

[issue28729] Exception from sqlite3 adapter masked by sqlite3.InterfaceError

2016-11-18 Thread Julien Palard
Julien Palard added the comment: By moving: ``` /* else set the right exception and return NULL */ PyErr_SetString(pysqlite_ProgrammingError, "can't adapt"); ``` from `pysqlite_microprotocols_adapt` to `pysqlite_adapt` (to avoid changing the semantics from the out

[issue28724] Add method send_io, recv_io to the socket module.

2016-11-17 Thread Julien Palard
Julien Palard added the comment: Hi, thanks for your contribution! Documentation give examples implementation of your methods: - https://docs.python.org/3/library/socket.html#socket.socket.sendmsg - https://docs.python.org/3/library/socket.html#socket.socket.recvmsg and from here, some

[issue28729] Exception from sqlite3 adapter masked by sqlite3.InterfaceError

2016-11-17 Thread Julien Palard
Julien Palard added the comment: I missed an occurrence of this "if/else" block, and by changing it, a lot of tests are failing, typically: ```== ERROR: CheckBlob (sqlite3.test.types.Sqlit

[issue28729] Exception from sqlite3 adapter masked by sqlite3.InterfaceError

2016-11-17 Thread Julien Palard
Julien Palard added the comment: Problems looks from `Modules/_sqlite/statement.c`: ``` if (!_need_adapt(current_param)) { adapted = current_param; } else { adapted = pysqlite_microprotocols_adapt(current_param, (PyObject*)_PrepareProtocolType, NULL); if (adapted

[issue28753] Clinic: Converting Your First Function is not up to date

2016-11-20 Thread Julien Palard
New submission from Julien Palard: It looks like the "Converting Your First Function" has been written with clinic-generated C code interspersed with user C code. But it looks like nowadays a `clinic/{}.c.h` file is generated, so the "Converting Your First Function" s

[issue28753] Clinic: Converting Your First Function is not up to date

2016-11-20 Thread Julien Palard
Changes by Julien Palard <julien+pyt...@palard.fr>: -- components: +Argument Clinic nosy: +larry versions: +Python 3.6 ___ Python tracker <rep...@bugs.python.org> <http://bugs.python

[issue28753] Clinic: Converting Your First Function is not up to date

2016-11-20 Thread Julien Palard
Julien Palard added the comment: @Larry: As a french-speaking guy, I typically don't write non-internal doc in english, fearing it sound weird for natives. I prefer translating it back in french (I'm the current leader of https://github.com/afpy/python_doc_fr) Here, here is a patch

[issue28753] Clinic: Converting Your First Function is not up to date

2016-11-20 Thread Julien Palard
Changes by Julien Palard <julien+pyt...@palard.fr>: -- assignee: -> docs@python components: +Documentation nosy: +docs@python type: -> enhancement ___ Python tracker <rep...@bugs.python.org> <http://bugs.

[issue28753] Clinic: Converting Your First Function is not up to date

2016-11-20 Thread Julien Palard
Changes by Julien Palard <julien+pyt...@palard.fr>: -- versions: +Python 3.7 ___ Python tracker <rep...@bugs.python.org> <http://bugs.python

[issue28754] Argument Clinic for bisect.bisect_left

2016-11-20 Thread Julien Palard
New submission from Julien Palard: Today I read https://docs.python.org/3.6/howto/clinic.html so I tried one: bisect.bisect_left. I was unable to do `bisect_right`, as it's an "alias" for `bisect`, and there's a unit-test checking `self.assertEqual(self.mod

[issue28754] Argument Clinic for bisect.bisect_left

2016-11-20 Thread Julien Palard
Changes by Julien Palard <julien+pyt...@palard.fr>: -- keywords: +patch Added file: http://bugs.python.org/file45562/issue28754.diff ___ Python tracker <rep...@bugs.python.org> <http://bugs.python

[issue28754] Argument Clinic for bisect.bisect_left

2016-11-20 Thread Julien Palard
Changes by Julien Palard <julien+pyt...@palard.fr>: Added file: http://bugs.python.org/file45563/issue28754-2.diff ___ Python tracker <rep...@bugs.python.org> <http://bugs.python

[issue28707] add 'directory' option to the http.server module

2016-11-15 Thread Julien Palard
Julien Palard added the comment: Hi Stéphane, Your patch is simple and elegant, but I'm asking myself a question about the idea to pass a class instead of an instance to the TCPServer ctor (I know that's not your choice). If we were able to pass an instance of SimpleHTTPRequestHandler

[issue28692] gettext: deprecate selecting plural form by fractional numbers

2016-11-14 Thread Julien Palard
Julien Palard added the comment: Hi, did you forget to attach the patch? -- nosy: +mdk ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/i

[issue28753] Clinic: Converting Your First Function is not up to date

2016-11-20 Thread Julien Palard
Julien Palard added the comment: Should we keep this open for the FASTCALL bit? -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/i

[issue28754] Argument Clinic for bisect.bisect_left

2016-11-20 Thread Julien Palard
Julien Palard added the comment: The whole diff is reviewable in `issue28754-3.diff`. -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/i

[issue28753] Clinic: Converting Your First Function is not up to date

2016-11-20 Thread Julien Palard
Julien Palard added the comment: Thanks for proof-reading my english, your editions are really nice: LGTM. -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/i

[issue28754] Argument Clinic for bisect.bisect_left

2016-11-20 Thread Julien Palard
Changes by Julien Palard <julien+pyt...@palard.fr>: Added file: http://bugs.python.org/file45572/issue28754-3.diff ___ Python tracker <rep...@bugs.python.org> <http://bugs.python

[issue28755] Rework syntax highlighing in howto/clinic.rst

2016-11-20 Thread Julien Palard
Changes by Julien Palard <julien+pyt...@palard.fr>: -- keywords: +patch Added file: http://bugs.python.org/file45573/issue28755.diff ___ Python tracker <rep...@bugs.python.org> <http://bugs.python

[issue28755] Rework syntax highlighing in howto/clinic.rst

2016-11-20 Thread Julien Palard
New submission from Julien Palard: I was reading `howto/clinic.html` and though I'll fix syntax highlighting. -- assignee: docs@python components: Argument Clinic, Documentation messages: 281304 nosy: docs@python, larry, mdk priority: normal severity: normal status: open title: Rework

[issue28754] Argument Clinic for bisect.bisect_left

2016-11-20 Thread Julien Palard
Julien Palard added the comment: I searched an occurrence of what I'm describing which is already using clinic and there is, at least, one in Modules/binascii.c line 1090: TL;DR: The idea is to use the `modulename.fnname [as c_basename] = modulename.existing_fn_name` clinic syntax, drop

[issue28754] Argument Clinic for bisect.bisect_left

2016-11-20 Thread Julien Palard
Changes by Julien Palard <julien+pyt...@palard.fr>: Added file: http://bugs.python.org/file45571/insort-left.diff ___ Python tracker <rep...@bugs.python.org> <http://bugs.python

[issue28754] Argument Clinic for bisect.bisect_left

2016-11-20 Thread Julien Palard
Changes by Julien Palard <julien+pyt...@palard.fr>: Added file: http://bugs.python.org/file45568/bisect_left.diff ___ Python tracker <rep...@bugs.python.org> <http://bugs.python

[issue28754] Argument Clinic for bisect.bisect_left

2016-11-20 Thread Julien Palard
Changes by Julien Palard <julien+pyt...@palard.fr>: Added file: http://bugs.python.org/file45570/insort.diff ___ Python tracker <rep...@bugs.python.org> <http://bugs.python

[issue28754] Argument Clinic for bisect.bisect_left

2016-11-20 Thread Julien Palard
Julien Palard added the comment: Here it is for the whole bisect module. I separated my work in commits, but I'm not sure how rietveld will eat that as they'll have unknown references, so I'll probably also upload a single patch with a known reference

[issue28754] Argument Clinic for bisect.bisect_left

2016-11-20 Thread Julien Palard
Changes by Julien Palard <julien+pyt...@palard.fr>: Added file: http://bugs.python.org/file45569/bisect.diff ___ Python tracker <rep...@bugs.python.org> <http://bugs.python

[issue28750] Replace string with bytes in doc of unicode-escape an raw-unicode-escape

2016-11-20 Thread Julien Palard
Julien Palard added the comment: So, lgtm. -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue28750> ___ ___ Python-bugs-list

[issue28750] Replace string with bytes in doc of unicode-escape an raw-unicode-escape

2016-11-20 Thread Julien Palard
Julien Palard added the comment: The inconcistencies were introduced in hg changeset 41703:7993f23ad46c, git commit: commit 40ec96630b96f077c8b5746ab0ec038f95aede8b Author: Walter Dörwald <wal...@livinglogic.de> Date: Sat May 12 11:08:06 2007 + Change PyUnicode_EncodeUnicode

[issue28755] Rework syntax highlighing in howto/clinic.rst

2016-11-20 Thread Julien Palard
Changes by Julien Palard <julien+pyt...@palard.fr>: Added file: http://bugs.python.org/file45575/issue28755-2.diff ___ Python tracker <rep...@bugs.python.org> <http://bugs.python

[issue28795] Misleading stating, that SIGINT handler is installed by default

2016-11-29 Thread Julien Palard
Changes by Julien Palard <julien+pyt...@palard.fr>: Added file: http://bugs.python.org/file45696/issue28795-2.7.diff ___ Python tracker <rep...@bugs.python.org> <http://bugs.python

[issue28820] Typo in section 6 of the Python 3.4 documentation

2016-11-29 Thread Julien Palard
Julien Palard added the comment: Hi Martin, Removed the removing of the double new line at end of file. -- Added file: http://bugs.python.org/file45686/issue28820-2.diff ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/i

[issue26483] docs unclear on difference between str.isdigit() and str.isdecimal()

2016-12-07 Thread Julien Palard
Changes by Julien Palard <julien+pyt...@palard.fr>: Added file: http://bugs.python.org/file45793/issue26483.diff ___ Python tracker <rep...@bugs.python.org> <http://bugs.python

[issue28897] Python 3.6.0rc1 breaks NumPy tests.

2016-12-07 Thread Julien Palard
Julien Palard added the comment: Tried to run the test_nanfunctions.py on tip and Python 3.6.0b4+, on numpy 1.11 and 1.12.0b1, can't make it fail. Installed numpy 1.12.0b1 using: ./python -m pip install --user numpy==1.12.0b1 I suspect Charles tested using Python 3.6.0b3 (can you confirm

[issue28755] Rework syntax highlighing in howto/clinic.rst

2016-12-07 Thread Julien Palard
Julien Palard added the comment: Just rebasing my patch on tip as it does no longer cleanly apply. -- Added file: http://bugs.python.org/file45795/issue28755-3.diff ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/i

[issue28754] Argument Clinic for bisect.bisect_left

2016-12-10 Thread Julien Palard
Julien Palard added the comment: I was able to simplify my patch a bit, I think I should also add a test to ensure we keep the hi=-1 and hi=None compatibility in the future. -- Added file: http://bugs.python.org/file45832/issue28754-8.diff

[issue28933] AC: Accept None as a default value for any type

2016-12-10 Thread Julien Palard
New submission from Julien Palard: Today, writing an AC declaration like: something: Py_ssize_t(c_default="-1") = None Leads to the almost obvious "Py_ssize_t_converter: default value None for field something is not of type int". But it actually make sense: - Acce

[issue28933] AC: Accept None as a Py_ssize_t default value

2016-12-10 Thread Julien Palard
Changes by Julien Palard <julien+pyt...@palard.fr>: -- title: AC: Accept None as a default value for any type -> AC: Accept None as a Py_ssize_t default value ___ Python tracker <rep...@bugs.python.org> <http://bugs.pyt

[issue28754] Argument Clinic for bisect.bisect_left

2016-12-10 Thread Julien Palard
Changes by Julien Palard <julien+pyt...@palard.fr>: Added file: http://bugs.python.org/file45836/issue28754-9.diff ___ Python tracker <rep...@bugs.python.org> <http://bugs.python

[issue28754] Argument Clinic for bisect.bisect_left

2016-12-10 Thread Julien Palard
Julien Palard added the comment: Hi Larry, In any cases it looks like supporting hi=-1 and hi=None is mandatory: hi=None is the current implementation in the bisect (Python) module. hi=-1 is the current implementation in the _bisect (C) module. Both are currently living together, the C

[issue28754] Argument Clinic for bisect.bisect_left

2016-12-10 Thread Julien Palard
Julien Palard added the comment: Added a test to ensure compatibility of both hi=None (introduced in original Python version) and hi=-1 (Introduced by the C version). Modified Python version to be compatible with the C-introduced hi=-1, so that the new test pass

[issue28933] AC: Accept None as a Py_ssize_t default value

2016-12-10 Thread Julien Palard
Julien Palard added the comment: Proposed a patch, but I'm not a huge fan of modifying getargs.c. If it's accepted, I'll obviously need to write tests before this is merged. -- keywords: +patch Added file: http://bugs.python.org/file45838/issue28933.diff

[issue28754] Argument Clinic for bisect.bisect_left

2016-12-10 Thread Julien Palard
Julien Palard added the comment: Maybe wait for issue28933. -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue28754> ___ ___ Pyth

[issue28933] AC: Accept None as a Py_ssize_t default value

2016-12-10 Thread Julien Palard
Julien Palard added the comment: > You propose an automatic conversion of "None" into "-1"? That's awful. > Please don't commit that patch to CPython. Not really, I propose a way to do it with AC when needed. And the AC semantics introduced are not "Autom

[issue28754] Argument Clinic for bisect.bisect_left

2016-12-10 Thread Julien Palard
Julien Palard added the comment: Hi Raymond, I don't like having the converters in the C implementation too, that's why I'm working on issue28933 to clean this. > letting the C function handle both -1 and None in the implementation rather > than in AC? It works, yes. But I prefer to c

[issue28933] AC: Accept None as a Py_ssize_t default value

2016-12-10 Thread Julien Palard
Julien Palard added the comment: > It looks like you did it with a converter for 28754. That's okay. But not > in the default implementation. It's not by default, we have to declare "… = None" in the AC declaration, which was an error before my patch (incompatible

[issue28933] AC: Accept None as a Py_ssize_t default value

2016-12-12 Thread Julien Palard
Julien Palard added the comment: Hi Larry, Do you mean a new converter in clinic.py like Nullable_Py_ssizze_t, or a converter that I copy/paste every time I need it like http://bugs.python.org/review/28754/patch/19417/76440 ? -- ___ Python tracker

[issue28933] AC: Accept None as a Py_ssize_t default value

2016-12-13 Thread Julien Palard
Changes by Julien Palard <julien+pyt...@palard.fr>: -- status: open -> closed ___ Python tracker <rep...@bugs.python.org> <http://bugs.pyt

[issue28754] Argument Clinic for bisect.bisect_left

2016-12-13 Thread Julien Palard
Julien Palard added the comment: As the pattern of this converter is not widely used, I'll let it in the code of _bisect for the moment, see: http://bugs.python.org/issue28933. -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.p

[issue26546] Provide translated french translation on docs.python.org

2016-12-13 Thread Julien Palard
Julien Palard added the comment: For the record, I opened a WIP pull request here: https://github.com/python/docsbuild-scripts/pull/8 Feedback is welcome. -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/i

[issue28933] AC: Accept None as a Py_ssize_t default value

2016-12-12 Thread Julien Palard
Julien Palard added the comment: > for just one use case I don't think that using None in a default argument is "one use case", nor a "special case" it's more like a "widly used pattern" that I'd like to make simple to implement (also see http://bugs.pytho

[issue28866] Type cache is not correctly invalidated on a class defining mro()

2016-12-06 Thread Julien Palard
Julien Palard added the comment: > issue28866.diff always invalidates the cache, so it works. But it is > suboptimal, IMO it defeats the whole purpose of a cache. Not sure about defeating the purpose of the cache as I only invalidate in setattr, getattr are still cache hitting. I

[issue28933] AC: Accept None as a Py_ssize_t default value

2016-12-12 Thread Julien Palard
Julien Palard added the comment: Hi Larry, Did you take more time to review this patch and my last comments? I don't think it that awful as it does _not_ apply until explicitly asked for, but I'm open to discuss it. -- ___ Python tracker <

[issue28845] Clean up known issues for AIX

2016-12-12 Thread Julien Palard
Julien Palard added the comment: LGTM but no AIX to test it. -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue28845> ___ ___ Pyth

[issue28753] Clinic: Converting Your First Function is not up to date

2016-12-11 Thread Julien Palard
Changes by Julien Palard <julien+pyt...@palard.fr>: -- status: open -> closed ___ Python tracker <rep...@bugs.python.org> <http://bugs.pyt

[issue28939] Groupby Is Roughly Equivalent To ...

2016-12-11 Thread Julien Palard
Julien Palard added the comment: I renamed your function groupby2 to compare it with itertools.groupby and tested but: >>> print(list(groupby2(['A', 'B']))) does not returns, looks like your implementation have a bug, so I tried: >>> for k in groupby2(['A', 'B']): ...

[issue28853] locals() and free variables

2016-12-03 Thread Julien Palard
Julien Palard added the comment: Should this issue be closed so? -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue28853> ___ ___

[issue10444] A mechanism is needed to override waiting for Python threads to finish

2016-11-30 Thread Julien Palard
Julien Palard added the comment: If nobody has nothing to add on this issue, I think it just should be closed. -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/i

[issue28755] Rework syntax highlighing in howto/clinic.rst

2016-11-30 Thread Julien Palard
Julien Palard added the comment: Bump, 10 days later, hope this diff is still straightforward to merge. -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/i

[issue26363] __builtins__ propagation is misleading described in exec and eval documentation

2016-11-30 Thread Julien Palard
Julien Palard added the comment: Hi Xavier, > It is not the dictionary of builtin module, which is inserted in , but the > current __builtin__ global It looks wrong, I'll even say the exact contrary: It _is_ the dictionary of builtin module which is inserted in, not the current __bui

[issue26363] __builtins__ propagation is misleading described in exec and eval documentation

2016-12-01 Thread Julien Palard
Julien Palard added the comment: So, is there still an inconsistency in the documentation? -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/i

[issue28795] Misleading stating, that SIGINT handler is installed by default

2016-11-29 Thread Julien Palard
Julien Palard added the comment: Proposed as patches but english is not my native language so please review carefully. -- keywords: +patch Added file: http://bugs.python.org/file45695/issue28795-tip.diff ___ Python tracker <rep...@bugs.python.

[issue28724] Add method send_io, recv_io to the socket module.

2016-12-04 Thread Julien Palard
Julien Palard added the comment: Unless somebody don't think so, I think this should go as a pypi module before going to the socket module, so this issue should probably be closed. -- ___ Python tracker <rep...@bugs.python.org>

  1   2   3   4   5   6   7   >