{"payload":{"feedbackUrl":"https://github.com/orgs/community/discussions/53140","repo":{"id":119430912,"defaultBranch":"main","name":"cpython","ownerLogin":"amyreese","currentUserCanPush":false,"isFork":true,"isEmpty":false,"createdAt":"2018-01-29T19:32:18.000Z","ownerAvatar":"https://avatars.githubusercontent.com/u/6444?v=4","public":true,"private":false,"isOrgOwned":false},"refInfo":{"name":"","listCacheKey":"v0:1709319890.0","currentOid":""},"activityList":{"items":[{"before":"e0a29d02921d6a8834804e1391613f0547ddb56b","after":null,"ref":"refs/heads/argparse-speedup","pushedAt":"2024-03-01T19:04:50.000Z","pushType":"branch_deletion","commitsCount":0,"pusher":{"login":"amyreese","name":"Amethyst Reese","path":"/amyreese","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/6444?s=80&v=4"}},{"before":null,"after":"e0a29d02921d6a8834804e1391613f0547ddb56b","ref":"refs/heads/argparse-speedup","pushedAt":"2024-02-29T22:09:58.000Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"amyreese","name":"Amethyst Reese","path":"/amyreese","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/6444?s=80&v=4"},"commit":{"message":"gh-116159: argparse: performance improvement parsing large number of options\n\nWhen parsing positional vs optional arguments, the use of min with a\nlist comprehension inside of a loop results in quadratic time based\non the number of optional arguments given. When combined with use of\nprefix based argument files and a large number of optional flags, this\ncan result in extremely slow parsing behavior.\n\nThis replaces the min call with a simple loop with a short circuit to\nbreak at the next optional argument.\n\nExample test case that exercises this performance behavior:\nhttps://gist.github.com/amyreese/b825bc092210ea7b64287f033dc995d8\n\nThe test case parses a list of arguments that contains 30,000 copies\nof `--flag=something`. Using latest 3.12 or 3.13 from main, this takes\nroughly 15-16 seconds to parse. With the proposed fix, this only takes\n80 milliseconds.\n\nBefore:\n\n```\n$ ~/opt/cpython/bin/python3.13 -VV\nPython 3.13.0a4+ (heads/main:0656509033, Feb 29 2024, 11:59:43) [Clang 15.0.0 (clang-1500.1.0.2.5)]\n\n$ ~/opt/cpython/bin/python3.13 test_many_flags.py\nparsed args in 15,195,914 µs\n```\n\nWith fix:\n\n```\n$ ~/opt/cpython/bin/python3.13 -VV\nPython 3.13.0a4+ (heads/argparse-options:968aa13a1d, Feb 29 2024, 13:34:49) [Clang 15.0.0 (clang-1500.1.0.2.5)]\n\n$ ~/opt/cpython/bin/python3.13 test_many_flags.py\nparsed args in 79,787 µs\n```\n\nCo-authored-by: Zsolt Dollenstein ","shortMessageHtmlLink":"pythongh-116159: argparse: performance improvement parsing large numb…"}},{"before":"46614910ece79357f247b09c6f86caf782bec751","after":"30207299cffa667cbf4887de1906146058877109","ref":"refs/heads/callable-modules","pushedAt":"2023-04-30T08:12:40.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"amyreese","name":"Amethyst Reese","path":"/amyreese","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/6444?s=80&v=4"},"commit":{"message":"Change how modules are callable\n\nAdds a method wrapper for module objects that makes them callable.\nWhen called, checks for a __call__ object on the module and calls\nthat instead, otherwise raises type error declaring the module\nis not callable.\n\nAdds a check in module_getattro to prevent returning the method\nwrapper when looking for __call__, to prevent circular lookups\nwhen calling the module and checking for __call__ set by module\nauthors.\n\nAdds PyModule_Callable helper function to determine if a module\nis callable, by looking for a __call__ property and calling the\nnormal PyCallable_Check on that object, if it exists.\n\nUpdates PyCallable_Check to use the new PyModule_Callable helper\nwhen checking module objects, to correctly look for a callable\n__call__ property rather than the normal tp_call attribute on the\nmodule's type struct.\n\nTested invariants:\n\n- For modules without __call__ (eg, stdlib):\n - callable(mod) -> False\n - mod.__call__ -> AttributeError\n - mod() -> TypeError\n\n- For module with __call__ or __getattr__ returning __call__ object\n - callable(mod) -> callable(mod.__call__)\n - mod.__call__ -> real object\n - mod() -> mod.__call__()\n\nSetting (or unsetting) __call__ on existing module objects makes\nthem callable (or uncallable) accordingly, without changing the type\nor class of the module object.\n\nCo-authored-by: Hood Chatham ","shortMessageHtmlLink":"Change how modules are callable"}},{"before":"53faa97956d569145554a88362c106c6e3c35a58","after":null,"ref":"refs/heads/name-change","pushedAt":"2023-04-30T03:31:34.000Z","pushType":"branch_deletion","commitsCount":0,"pusher":{"login":"amyreese","name":"Amethyst Reese","path":"/amyreese","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/6444?s=80&v=4"}},{"before":"cf75a21bffb705f5742c095eb18b05e4f4db2c95","after":"53faa97956d569145554a88362c106c6e3c35a58","ref":"refs/heads/name-change","pushedAt":"2023-04-30T02:52:52.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"amyreese","name":"Amethyst Reese","path":"/amyreese","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/6444?s=80&v=4"},"commit":{"message":"Include suggested mailmap comments\n\nCo-authored-by: Jelle Zijlstra ","shortMessageHtmlLink":"Include suggested mailmap comments"}},{"before":"0f727288d38d61533a8534ebb9e4dc042486a2c6","after":"cf75a21bffb705f5742c095eb18b05e4f4db2c95","ref":"refs/heads/name-change","pushedAt":"2023-04-29T05:17:03.000Z","pushType":"push","commitsCount":116,"pusher":{"login":"AlexWaygood","name":"Alex Waygood","path":"/AlexWaygood","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/66076021?s=80&v=4"},"commit":{"message":"Merge branch 'main' into name-change","shortMessageHtmlLink":"Merge branch 'main' into name-change"}},{"before":"ade619ba733f2709707d542d8ae7d8dd82b5ba9f","after":"46614910ece79357f247b09c6f86caf782bec751","ref":"refs/heads/callable-modules","pushedAt":"2023-04-25T00:32:39.000Z","pushType":"push","commitsCount":39,"pusher":{"login":"ambv","name":"Łukasz Langa","path":"/ambv","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/55281?s=80&v=4"},"commit":{"message":"Merge branch 'main' into callable-modules","shortMessageHtmlLink":"Merge branch 'main' into callable-modules"}},{"before":"f876f8870565c043289846a3d76970f41ace5029","after":"ade619ba733f2709707d542d8ae7d8dd82b5ba9f","ref":"refs/heads/callable-modules","pushedAt":"2023-04-24T07:24:23.000Z","pushType":"force_push","commitsCount":0,"pusher":{"login":"amyreese","name":"Amethyst Reese","path":"/amyreese","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/6444?s=80&v=4"},"commit":{"message":"Tests validating callable module implementation","shortMessageHtmlLink":"Tests validating callable module implementation"}},{"before":"f876f8870565c043289846a3d76970f41ace5029","after":null,"ref":"refs/heads/callable-take-two","pushedAt":"2023-04-24T05:09:52.000Z","pushType":"branch_deletion","commitsCount":0,"pusher":{"login":"amyreese","name":"Amethyst Reese","path":"/amyreese","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/6444?s=80&v=4"}},{"before":null,"after":"f876f8870565c043289846a3d76970f41ace5029","ref":"refs/heads/callable-modules","pushedAt":"2023-04-24T05:09:52.000Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"amyreese","name":"Amethyst Reese","path":"/amyreese","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/6444?s=80&v=4"},"commit":{"message":"PEP 713: make modules callable","shortMessageHtmlLink":"PEP 713: make modules callable"}},{"before":"18fb3514de5d4d104bf3f45661d508363cf29be2","after":null,"ref":"refs/heads/callable-modules","pushedAt":"2023-04-24T05:09:23.000Z","pushType":"branch_deletion","commitsCount":0,"pusher":{"login":"amyreese","name":"Amethyst Reese","path":"/amyreese","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/6444?s=80&v=4"}},{"before":null,"after":"18fb3514de5d4d104bf3f45661d508363cf29be2","ref":"refs/heads/callable-take-one","pushedAt":"2023-04-24T05:09:23.000Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"amyreese","name":"Amethyst Reese","path":"/amyreese","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/6444?s=80&v=4"},"commit":{"message":"Implement callable modules","shortMessageHtmlLink":"Implement callable modules"}},{"before":null,"after":"f876f8870565c043289846a3d76970f41ace5029","ref":"refs/heads/callable-take-two","pushedAt":"2023-04-23T09:15:42.000Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"amyreese","name":"Amethyst Reese","path":"/amyreese","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/6444?s=80&v=4"},"commit":{"message":"PEP 713: make modules callable","shortMessageHtmlLink":"PEP 713: make modules callable"}},{"before":null,"after":"0f727288d38d61533a8534ebb9e4dc042486a2c6","ref":"refs/heads/name-change","pushedAt":"2023-04-22T21:50:36.000Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"amyreese","name":"Amethyst Reese","path":"/amyreese","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/6444?s=80&v=4"},"commit":{"message":"Update name in acknowledgements and add mailmap\n\nI changed my name last year, and would like to update my name in the\nacknowledgements and git history accordingly.\n\ngit-mailmap reference: https://git-scm.com/docs/gitmailmap","shortMessageHtmlLink":"Update name in acknowledgements and add mailmap"}},{"before":"18fb3514de5d4d104bf3f45661d508363cf29be2","after":null,"ref":"refs/heads/callable-module","pushedAt":"2023-04-22T21:38:33.000Z","pushType":"branch_deletion","commitsCount":0,"pusher":{"login":"amyreese","name":"Amethyst Reese","path":"/amyreese","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/6444?s=80&v=4"}},{"before":null,"after":"18fb3514de5d4d104bf3f45661d508363cf29be2","ref":"refs/heads/callable-modules","pushedAt":"2023-04-22T21:38:33.000Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"amyreese","name":"Amethyst Reese","path":"/amyreese","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/6444?s=80&v=4"},"commit":{"message":"Implement callable modules","shortMessageHtmlLink":"Implement callable modules"}},{"before":null,"after":"18fb3514de5d4d104bf3f45661d508363cf29be2","ref":"refs/heads/callable-module","pushedAt":"2023-04-22T21:35:00.000Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"amyreese","name":"Amethyst Reese","path":"/amyreese","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/6444?s=80&v=4"},"commit":{"message":"Implement callable modules","shortMessageHtmlLink":"Implement callable modules"}},{"before":"62bf263a775f4444d8b5d5841cc09be3bd53e933","after":"4898415df724380d4c8b0ec08e8cb92f126193c3","ref":"refs/heads/main","pushedAt":"2023-04-20T21:19:55.000Z","pushType":"push","commitsCount":5246,"pusher":{"login":"amyreese","name":"Amethyst Reese","path":"/amyreese","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/6444?s=80&v=4"},"commit":{"message":"gh-98641: Document difference between task group and gather (#103644)\n\nThe purpose of the comments is to rule out the implication that asyncio.TaskGroup is a drop-in replacement / better alternative to asyncio.gather().","shortMessageHtmlLink":"pythongh-98641: Document difference between task group and gather (py…"}}],"hasNextPage":false,"hasPreviousPage":false,"activityType":"all","actor":null,"timePeriod":"all","sort":"DESC","perPage":30,"cursor":"djE6ks8AAAAEChKyOwA","startCursor":null,"endCursor":null}},"title":"Activity · amyreese/cpython"}