Issue33967
Created on 2018-06-26 11:57 by doerwalter, last changed 2022-04-11 14:59 by admin. This issue is now closed.
| Pull Requests | |||
|---|---|---|---|
| URL | Status | Linked | Edit |
| PR 8184 | merged | corona10, 2018-07-08 09:51 | |
| PR 8220 | merged | miss-islington, 2018-07-10 07:27 | |
| PR 8221 | merged | miss-islington, 2018-07-10 07:28 | |
| PR 8261 | merged | ZackerySpytz, 2018-07-12 02:09 | |
| PR 8295 | merged | miss-islington, 2018-07-16 09:12 | |
| PR 8296 | merged | miss-islington, 2018-07-16 09:13 | |
| PR 8306 | merged | methane, 2018-07-16 23:59 | |
| PR 8306 | merged | methane, 2018-07-16 23:59 | |
| PR 8308 | merged | miss-islington, 2018-07-17 04:45 | |
| PR 8309 | merged | miss-islington, 2018-07-17 04:45 | |
| Messages (14) | |||
|---|---|---|---|
| msg320485 - (view) | Author: Walter Dörwald (doerwalter) * ![]() |
Date: 2018-06-26 11:57 | |
When I call a function decorated with functools.singledispatch without an argument, I get the following: $ python Python 3.6.5 (default, Jun 17 2018, 12:13:06) [GCC 4.2.1 Compatible Apple LLVM 9.1.0 (clang-902.0.39.2)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import functools >>> @functools.singledispatch ... def f(x): ... pass ... >>> f() Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/local/Cellar/python/3.6.5_1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/functools.py", line 803, in wrapper return dispatch(args[0].__class__)(*args, **kw) IndexError: tuple index out of range I would have expected a TypeError along the lines of TypeError: f() missing 1 required positional argument: 'x' |
|||
| msg321259 - (view) | Author: Dong-hee Na (corona10) * ![]() |
Date: 2018-07-08 06:26 | |
@doerwalter Can I take a look this issue? |
|||
| msg321313 - (view) | Author: Inada Naoki (methane) * ![]() |
Date: 2018-07-09 12:17 | |
Signature mismatch should raise TypeError, not IndexError. I think this should be backported to 3.6 and 3.7. |
|||
| msg321359 - (view) | Author: Inada Naoki (methane) * ![]() |
Date: 2018-07-10 07:26 | |
New changeset 445f1b35ce8461268438c8a6b327ddc764287e05 by INADA Naoki (Dong-hee Na) in branch 'master': bpo-33967: Fix singledispatch raised IndexError when no args (GH-8184) https://github.com/python/cpython/commit/445f1b35ce8461268438c8a6b327ddc764287e05 |
|||
| msg321363 - (view) | Author: miss-islington (miss-islington) | Date: 2018-07-10 07:49 | |
New changeset df9f633f94e97fc43e0235cb2be076491ea7f67f by Miss Islington (bot) in branch '3.7': bpo-33967: Fix singledispatch raised IndexError when no args (GH-8184) https://github.com/python/cpython/commit/df9f633f94e97fc43e0235cb2be076491ea7f67f |
|||
| msg321365 - (view) | Author: miss-islington (miss-islington) | Date: 2018-07-10 08:00 | |
New changeset 6ceab46a602c6653356d67d7479391fba0b35697 by Miss Islington (bot) in branch '3.6': bpo-33967: Fix singledispatch raised IndexError when no args (GH-8184) https://github.com/python/cpython/commit/6ceab46a602c6653356d67d7479391fba0b35697 |
|||
| msg321512 - (view) | Author: Zackery Spytz (ZackerySpytz) * ![]() |
Date: 2018-07-12 02:53 | |
The test added in this change uses the deprecated method assertRaisesRegexp(), so -Werror will cause test_functools to fail. PR 8261 fixes this. |
|||
| msg321514 - (view) | Author: Inada Naoki (methane) * ![]() |
Date: 2018-07-12 03:57 | |
New changeset 9e9b2c32a34594e901b5b9a03c561a2a2bf63ece by INADA Naoki (Zackery Spytz) in branch 'master': bpo-33967: Remove use of deprecated assertRaisesRegexp() (GH-8261) https://github.com/python/cpython/commit/9e9b2c32a34594e901b5b9a03c561a2a2bf63ece |
|||
| msg321725 - (view) | Author: STINNER Victor (vstinner) * ![]() |
Date: 2018-07-16 09:26 | |
New changeset 336c9539a90e0f5df5bcc5b444b8400a58820583 by Victor Stinner (Miss Islington (bot)) in branch '3.6': bpo-33967: Remove use of deprecated assertRaisesRegexp() (GH-8261) (GH-8295) https://github.com/python/cpython/commit/336c9539a90e0f5df5bcc5b444b8400a58820583 |
|||
| msg321727 - (view) | Author: STINNER Victor (vstinner) * ![]() |
Date: 2018-07-16 09:40 | |
New changeset 0a820a203032e3b1b9413afba45acd8f79f27f81 by Victor Stinner (Miss Islington (bot)) in branch '3.7': bpo-33967: Remove use of deprecated assertRaisesRegexp() (GH-8261) (GH-8296) https://github.com/python/cpython/commit/0a820a203032e3b1b9413afba45acd8f79f27f81 |
|||
| msg321743 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * ![]() |
Date: 2018-07-16 17:02 | |
The purpose of using assertRaisesRegexp() was testing the error message. assertRaises() doesn't do this. Needed to restore the appropriate assertion method, but using a non-deprecated alias: assertRaisesRegex(). |
|||
| msg321789 - (view) | Author: Inada Naoki (methane) * ![]() |
Date: 2018-07-17 04:44 | |
New changeset 56d8f57b83a37b05a6f2fbc3e141bbc1ba6cb3a2 by INADA Naoki in branch 'master': bpo-33967: Fix wrong use of assertRaises (GH-8306) https://github.com/python/cpython/commit/56d8f57b83a37b05a6f2fbc3e141bbc1ba6cb3a2 |
|||
| msg321792 - (view) | Author: miss-islington (miss-islington) | Date: 2018-07-17 05:18 | |
New changeset 892df9d15aae08d4033faeb34698e3c550c85854 by Miss Islington (bot) in branch '3.7': bpo-33967: Fix wrong use of assertRaises (GH-8306) https://github.com/python/cpython/commit/892df9d15aae08d4033faeb34698e3c550c85854 |
|||
| msg321794 - (view) | Author: miss-islington (miss-islington) | Date: 2018-07-17 05:38 | |
New changeset 8b5d191386350d28a0f20283dcb366cf50f82b97 by Miss Islington (bot) in branch '3.6': bpo-33967: Fix wrong use of assertRaises (GH-8306) https://github.com/python/cpython/commit/8b5d191386350d28a0f20283dcb366cf50f82b97 |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022-04-11 14:59:02 | admin | set | github: 78148 |
| 2018-07-17 06:20:39 | methane | set | status: open -> closed resolution: fixed stage: patch review -> resolved |
| 2018-07-17 05:38:32 | miss-islington | set | messages: + msg321794 |
| 2018-07-17 05:18:59 | miss-islington | set | messages: + msg321792 |
| 2018-07-17 04:45:59 | miss-islington | set | pull_requests: + pull_request7844 |
| 2018-07-17 04:45:06 | miss-islington | set | pull_requests: + pull_request7843 |
| 2018-07-17 04:44:50 | methane | set | messages: + msg321789 |
| 2018-07-16 23:59:27 | methane | set | stage: needs patch -> patch review pull_requests: + pull_request7841 |
| 2018-07-16 23:59:24 | methane | set | stage: needs patch -> needs patch pull_requests: + pull_request7840 |
| 2018-07-16 17:02:10 | serhiy.storchaka | set | status: closed -> open nosy:
+ serhiy.storchaka resolution: fixed -> (no value) |
| 2018-07-16 09:40:15 | vstinner | set | messages: + msg321727 |
| 2018-07-16 09:26:52 | vstinner | set | nosy:
+ vstinner messages: + msg321725 |
| 2018-07-16 09:13:29 | miss-islington | set | pull_requests: + pull_request7830 |
| 2018-07-16 09:12:18 | miss-islington | set | pull_requests: + pull_request7829 |
| 2018-07-12 03:57:08 | methane | set | messages: + msg321514 |
| 2018-07-12 02:53:43 | ZackerySpytz | set | nosy:
+ ZackerySpytz messages: + msg321512 |
| 2018-07-12 02:09:16 | ZackerySpytz | set | pull_requests: + pull_request7794 |
| 2018-07-10 08:00:43 | miss-islington | set | messages: + msg321365 |
| 2018-07-10 07:50:01 | methane | set | status: open -> closed resolution: fixed stage: patch review -> resolved |
| 2018-07-10 07:49:02 | miss-islington | set | nosy:
+ miss-islington messages: + msg321363 |
| 2018-07-10 07:28:47 | miss-islington | set | pull_requests: + pull_request7759 |
| 2018-07-10 07:27:54 | miss-islington | set | pull_requests: + pull_request7758 |
| 2018-07-10 07:26:40 | methane | set | messages: + msg321359 |
| 2018-07-09 12:17:20 | methane | set | nosy:
+ methane messages:
+ msg321313 |
| 2018-07-08 09:51:59 | corona10 | set | keywords:
+ patch stage: patch review pull_requests: + pull_request7739 |
| 2018-07-08 06:26:36 | corona10 | set | nosy:
+ corona10 messages: + msg321259 |
| 2018-06-26 11:57:10 | doerwalter | create | |

