Subject | Hash | Author | Date (UTC) |
---|---|---|---|
bpo-29748: Added the slice index converter in Argument Clinic. (#549) | 80ec8364f15857c405ef0ecb1e758c8fc6b332f7 | Serhiy Storchaka | 2017-03-19 17:37:40 |
bpo-25455: Fixed crashes in repr of recursive buffered file-like objects. (#514) | a5af6e1af77ee0f9294c5776478a9c24d9fbab94 | Serhiy Storchaka | 2017-03-19 17:25:29 |
Drop C++ header compatibility test (#718) | 77ed11552da3e01dd235b7d68988076866b1f604 | Brett Cannon | 2017-03-19 16:49:55 |
bpo-29793: Convert some builtin types constructors to Argument Clinic. (#615) | 18b250f844bf8b2d1a81c2d2dcc74e850364fe35 | Serhiy Storchaka | 2017-03-19 06:51:07 |
bpo-20186: Convert tuple object implementation to Argument Clinic. (#614) | 0b5615926a573c19c887a701a2f7047f4fd06de6 | Serhiy Storchaka | 2017-03-19 06:47:58 |
bpo-20185: Convert typeobject.c to Argument Clinic. (#544) | 5c643a028ee86c613d7168ca5bcb8fc94477a09e | Serhiy Storchaka | 2017-03-19 06:46:44 |
bpo-29776: Use decorator syntax for properties. (#585) | bdf6b910f9ea75609caee498a975af03b6d23f67 | Serhiy Storchaka | 2017-03-19 06:40:32 |
bpo-28749: Fixed the documentation of the mapping codec APIs. (#487) | c85a26628ceb9624c96c3064e8b99033c026d8a3 | Serhiy Storchaka | 2017-03-19 06:15:17 |
bpo-27200: Fix doctests in programming.rst and datetime.rst (#401) | 909a6f626ff343937cd3f06fda996870e7890724 | Marco Buttu | 2017-03-18 16:59:33 |
Combine the C++ header CI build into the main C build (GH-697) | 993d4b3440f2282976901ce66879037c4443868a | Brett Cannon | 2017-03-17 22:29:27 |
bpo-29836: Remove nturl2path from test_sundry and amend the module docstring (GH-694) | cb5297a9e6b51c736ab8564b1a123577ba0dd2ad | Jim Fasarakis-Hilliard | 2017-03-17 18:16:20 |
bpo-29808: SysLogHandler: Do not fail if initial connect to syslog failed (#663) (#663) | 1b038e073807ecb6fd176edaf3386a8e3205416e | Коренберг Марк | 2017-03-17 15:25:05 |
bpo-16355: Clarify when inspect.getcomments() returns None (#428) | 3f2155ffe683080f2a1b28408fa48d43ba92f943 | Marco Buttu | 2017-03-17 08:50:23 |
bpo-29820: othergui.rst: Remove outdated information (GH-685) | 1bb0f3762ec5104014aeed0ae6e9d64598d8fcac | Marco Buttu | 2017-03-17 02:50:40 |
Takes vcruntime140.dll from the correct source. (#679) | 328612353266d86c248950a910efa869c8c9c087 | Steve Dower | 2017-03-16 17:19:18 |
bpo-29581: Make ABCMeta.__new__ pass **kwargs to type.__new__ (#527) | bd583ef9857d99f9145ad0bb2c4424cc0baa63fc | Nate | 2017-03-15 18:39:22 |
Fix stderr bug in json.tool test (#346) | b4e9087e7b77e8f76feac76f9c1ab21b49c0c766 | Daniel Himmelstein | 2017-03-15 14:31:06 |
bpo-29800: Fix crashes in partial.__repr__ if the keys of partial.keywords are not strings (#649) | 6c3d5274687c97f9c13800ad50e73e15b54f629d | Michael Seifert | 2017-03-15 05:26:33 |
Use the default number of reviewers (3) for mention-bot (#667) | 024b4fdc4a981ec9ec17f2e63124ec542eb728ff | Donald Stufft | 2017-03-14 22:20:55 |
bpo-29735: Optimize partial_call(): avoid tuple (#516) | 0f7b0b397e12514ee213bc727c9939b66585cbe2 | Victor Stinner | 2017-03-14 20:37:20 |
File | Lines added | Lines deleted |
---|---|---|
Include/ceval.h | 1 | 0 |
Misc/NEWS | 2 | 0 |
Objects/listobject.c | 3 | 3 |
Python/ceval.c | 7 | 0 |
Tools/clinic/clinic.py | 12 | 0 |
File Include/ceval.h changed (mode: 100644) (index 8760fe50b7..25976bb376) | |||
... | ... | PyAPI_FUNC(Py_ssize_t) _PyEval_RequestCodeExtraIndex(freefunc); | |
223 | 223 | ||
224 | 224 | #ifndef Py_LIMITED_API | #ifndef Py_LIMITED_API |
225 | 225 | PyAPI_FUNC(int) _PyEval_SliceIndex(PyObject *, Py_ssize_t *); | PyAPI_FUNC(int) _PyEval_SliceIndex(PyObject *, Py_ssize_t *); |
226 | PyAPI_FUNC(int) _PyEval_SliceIndexOrNone(PyObject *, Py_ssize_t *); | ||
226 | 227 | PyAPI_FUNC(void) _PyEval_SignalAsyncExc(void); | PyAPI_FUNC(void) _PyEval_SignalAsyncExc(void); |
227 | 228 | #endif | #endif |
228 | 229 |
File Misc/NEWS changed (mode: 100644) (index f317527b93..8509f52692) | |||
... | ... | Build | |
937 | 937 | Tools/Demos | Tools/Demos |
938 | 938 | ----------- | ----------- |
939 | 939 | ||
940 | - bpo-29748: Added the slice index converter in Argument Clinic. | ||
941 | |||
940 | 942 | - bpo-24037: Argument Clinic now uses the converter `bool(accept={int})` rather | - bpo-24037: Argument Clinic now uses the converter `bool(accept={int})` rather |
941 | 943 | than `int` for semantical booleans. This avoids repeating the default | than `int` for semantical booleans. This avoids repeating the default |
942 | 944 | value for Python and C and will help in converting to `bool` in future. | value for Python and C and will help in converting to `bool` in future. |
File Objects/listobject.c changed (mode: 100644) (index 9c1c9d9689..9b42106e30) | |||
... | ... | PyList_AsTuple(PyObject *v) | |
2210 | 2210 | list.index | list.index |
2211 | 2211 | ||
2212 | 2212 | value: object | value: object |
2213 | start: object(converter="_PyEval_SliceIndex", type="Py_ssize_t") = 0 | ||
2214 | stop: object(converter="_PyEval_SliceIndex", type="Py_ssize_t", c_default="PY_SSIZE_T_MAX") = sys.maxsize | ||
2213 | start: slice_index(accept={int}) = 0 | ||
2214 | stop: slice_index(accept={int}, c_default="PY_SSIZE_T_MAX") = sys.maxsize | ||
2215 | 2215 | / | / |
2216 | 2216 | ||
2217 | 2217 | Return first index of value. | Return first index of value. |
... | ... | Raises ValueError if the value is not present. | |
2222 | 2222 | static PyObject * | static PyObject * |
2223 | 2223 | list_index_impl(PyListObject *self, PyObject *value, Py_ssize_t start, | list_index_impl(PyListObject *self, PyObject *value, Py_ssize_t start, |
2224 | 2224 | Py_ssize_t stop) | Py_ssize_t stop) |
2225 | /*[clinic end generated code: output=ec51b88787e4e481 input=70b7247e398a6999]*/ | ||
2225 | /*[clinic end generated code: output=ec51b88787e4e481 input=40ec5826303a0eb1]*/ | ||
2226 | 2226 | { | { |
2227 | 2227 | Py_ssize_t i; | Py_ssize_t i; |
2228 | 2228 |
File Python/ceval.c changed (mode: 100644) (index e682fc1afd..8ee58f5d30) | |||
... | ... | _PyEval_SliceIndex(PyObject *v, Py_ssize_t *pi) | |
4917 | 4917 | return 1; | return 1; |
4918 | 4918 | } | } |
4919 | 4919 | ||
4920 | int | ||
4921 | _PyEval_SliceIndexOrNone(PyObject *v, Py_ssize_t *pi) | ||
4922 | { | ||
4923 | return v == Py_None || _PyEval_SliceIndex(v, pi); | ||
4924 | } | ||
4925 | |||
4926 | |||
4920 | 4927 | #define CANNOT_CATCH_MSG "catching classes that do not inherit from "\ | #define CANNOT_CATCH_MSG "catching classes that do not inherit from "\ |
4921 | 4928 | "BaseException is not allowed" | "BaseException is not allowed" |
4922 | 4929 |
File Tools/clinic/clinic.py changed (mode: 100755) (index 3d51c1dcad..55faf1ea24) | |||
... | ... | class Py_ssize_t_converter(CConverter): | |
2659 | 2659 | c_ignored_default = "0" | c_ignored_default = "0" |
2660 | 2660 | ||
2661 | 2661 | ||
2662 | class slice_index_converter(CConverter): | ||
2663 | type = 'Py_ssize_t' | ||
2664 | |||
2665 | def converter_init(self, *, accept={int, NoneType}): | ||
2666 | if accept == {int}: | ||
2667 | self.converter = '_PyEval_SliceIndex' | ||
2668 | elif accept == {int, NoneType}: | ||
2669 | self.converter = '_PyEval_SliceIndexOrNone' | ||
2670 | else: | ||
2671 | fail("slice_index_converter: illegal 'accept' argument " + repr(accept)) | ||
2672 | |||
2673 | |||
2662 | 2674 | class float_converter(CConverter): | class float_converter(CConverter): |
2663 | 2675 | type = 'float' | type = 'float' |
2664 | 2676 | default_type = float | default_type = float |