##  Improved Modules  Â¶

###  array  Â¶

  * The [ ` array.array  ` ](../library/array.html#array.array "array.array") class now supports subscripting, making it a [ generic type  ](../glossary.html#term-generic-type) . (Contributed by Jelle Zijlstra in [ gh-98658 ](https://github.com/python/cpython/issues/98658) .) 

###  asyncio  Â¶

  * The performance of writing to sockets in [ ` asyncio  ` ](../library/asyncio.html#module-asyncio "asyncio: Asynchronous I/O.") has been significantly improved. ` asyncio  ` now avoids unnecessary copying when writing to sockets and uses [ ` sendmsg()  ` ](../library/socket.html#socket.socket.sendmsg "socket.socket.sendmsg") if the platform supports it. (Contributed by Kumar Aditya in [ gh-91166 ](https://github.com/python/cpython/issues/91166) .) 

  * Add [ ` asyncio.eager_task_factory()  ` ](../library/asyncio-task.html#asyncio.eager_task_factory "asyncio.eager_task_factory") and [ ` asyncio.create_eager_task_factory()  ` ](../library/asyncio-task.html#asyncio.create_eager_task_factory "asyncio.create_eager_task_factory") functions to allow opting an event loop in to eager task execution, making some use-cases 2x to 5x faster. (Contributed by Jacob Bower & Itamar Oren in [ gh-102853 ](https://github.com/python/cpython/issues/102853) , [ gh-104140 ](https://github.com/python/cpython/issues/104140) , and [ gh-104138 ](https://github.com/python/cpython/issues/104138) ) 

  * On Linux, [ ` asyncio  ` ](../library/asyncio.html#module-asyncio "asyncio: Asynchronous I/O.") uses [ ` asyncio.PidfdChildWatcher  ` ](../library/asyncio-policy.html#asyncio.PidfdChildWatcher "asyncio.PidfdChildWatcher") by default if [ ` os.pidfd_open()  ` ](../library/os.html#os.pidfd_open "os.pidfd_open") is available and functional instead of [ ` asyncio.ThreadedChildWatcher  ` ](../library/asyncio-policy.html#asyncio.ThreadedChildWatcher "asyncio.ThreadedChildWatcher") . (Contributed by Kumar Aditya in [ gh-98024 ](https://github.com/python/cpython/issues/98024) .) 

  * The event loop now uses the best available child watcher for each platform ( [ ` asyncio.PidfdChildWatcher  ` ](../library/asyncio-policy.html#asyncio.PidfdChildWatcher "asyncio.PidfdChildWatcher") if supported and [ ` asyncio.ThreadedChildWatcher  ` ](../library/asyncio-policy.html#asyncio.ThreadedChildWatcher "asyncio.ThreadedChildWatcher") otherwise), so manually configuring a child watcher is not recommended. (Contributed by Kumar Aditya in [ gh-94597 ](https://github.com/python/cpython/issues/94597) .) 

  * Add _loop_factory_ parameter to [ ` asyncio.run()  ` ](../library/asyncio-runner.html#asyncio.run "asyncio.run") to allow specifying a custom event loop factory. (Contributed by Kumar Aditya in [ gh-99388 ](https://github.com/python/cpython/issues/99388) .) 

  * Add C implementation of [ ` asyncio.current_task()  ` ](../library/asyncio-task.html#asyncio.current_task "asyncio.current_task") for 4x-6x speedup. (Contributed by Itamar Oren and Pranav Thulasiram Bhat in [ gh-100344 ](https://github.com/python/cpython/issues/100344) .) 

  * [ ` asyncio.iscoroutine()  ` ](../library/asyncio-task.html#asyncio.iscoroutine "asyncio.iscoroutine") now returns ` False  ` for generators as [ ` asyncio  ` ](../library/asyncio.html#module-asyncio "asyncio: Asynchronous I/O.") does not support legacy generator-based coroutines. (Contributed by Kumar Aditya in [ gh-102748 ](https://github.com/python/cpython/issues/102748) .) 

  * [ ` asyncio.wait()  ` ](../library/asyncio-task.html#asyncio.wait "asyncio.wait") and [ ` asyncio.as_completed()  ` ](../library/asyncio-task.html#asyncio.as_completed "asyncio.as_completed") now accepts generators yielding tasks. (Contributed by Kumar Aditya in [ gh-78530 ](https://github.com/python/cpython/issues/78530) .) 

###  calendar  Â¶

  * Add enums [ ` calendar.Month  ` ](../library/calendar.html#calendar.Month "calendar.Month") and [ ` calendar.Day  ` ](../library/calendar.html#calendar.Day "calendar.Day") defining m