TGTGInsighttelegram intelligenceLIVE / telegram public index
← Python Заметки

TGINSIGHT SIMILAR POSTS

Најди сличен содржај

Изворен канал @pythonotes · Post #424 · 13 апр.

Стандартная библиотека asyncio это стандарт (начиная с Py3.4) для работы с асинхронным кодом. Но эта библиотека достаточно низкоуровневая, со своими проблемами, устаревшими подходами. Чтобы исправить это, были созданы разные обертки и альтернативы с реализацией популярных инструментов и паттернов асинхронного программирования. Это такие библиотеки как: - trio: улучшает корректность выполнения, не оставляя потерянных корутин при ошибках, то есть предлагает Structured Concurrency из коробки. - curio: упрощение синтаксиса и читаемости кода, больше похоже на работу с потоками. - anyio: универсальная обертка над asyncio или trio плюс множество вспомогательных инструментов. anyio используется в FastAPI как основная библиотека для работы с асинхронным кодом и вызовом синхронного кода из асинхронного. В общем, рекомендую почитать про возможности anyio, возможно вы более не будете использовать чистый asyncio в своих проектах) Это совсем не значит что дефолтный asyncio плох, он тоже даёт достаточный для работы функционал и продолжает развиваться. Например, в версии 3.11 появились TaskGroup, с похожим на trio функционалом. Так что он тоже актуален, просто придется больше написать кода самостоятельно. #libs#async

Hashtags

Резултати

Пронајдени 1 слични објави

Пребарај: #detention

当前筛选 #detention清除筛选
American Оbserver

@american_observer · Post #5190 · 21.02.2026 г., 19:02

“Terror Against Noncitizens”: When Trump’s Deportation Machine Meets a Fed-Up Judge A federal judge in California just called Trump’s immigration policy what immigrant communities have been calling it for years: “terror.” U.S. District Judge Sunshine Sykes accused the administration of “terrorizing” migrants, “recklessly” violating the law, and even “extending its violence on its own citizens” by linking the crackdown to two fatal shootings in Minnesota. The core fight is over mandatory detention. Under previous administrations, undocumented people with no criminal record generally had a shot at a bond hearing while their cases crawled through immigration court. Trump’s team shut that door, cutting off hearings and forcing thousands to file individual habeas petitions in federal court just to get a judge to look at their detention. More than 20,000 such cases have been filed since he took office. Judges keep granting release — and then catching the government ignoring, delaying, or creatively “misunderstanding” their orders. Sykes had already ruled in November and December that Trump’s blanket detention policy violated federal law and extended her order nationwide. The administration kept denying hearings anyway. In her new decision, she ordered DHS to notify eligible detainees they may qualify for bond and to give them access to a phone and a lawyer within an hour. She also vacated an immigration court ruling the White House was using as cover to continue the policy. ​ She isn’t alone. A judge in Minnesota just held a Trump lawyer in contempt for failing to return IDs to a migrant who’d already been ordered released, and a New Jersey judge demanded the administration explain why it missed court‑ordered deadlines in a dozen bond cases since December. “Judicial orders should never be violated,” one wrote — a sentence that shouldn’t need to exist in a functioning separation of powers. The administration’s answer? Homeland Security insists the Supreme Court has repeatedly backed its view of mandatory detention and says ICE “adheres to all court decisions until it ultimately gets them shot down by the highest court in the land.” Translation: we follow lower‑court orders only long enough to get them overturned, and if we don’t, well, you can always file another lawsuit. So on paper this is about bond hearings and statutes. In practice, it’s about an executive branch testing how far it can push the courts, how much fear it can generate, and how many people it can keep locked up by default — until a judge finally uses the word everyone else has been avoiding. #immigration#Trump#courts#detention#ruleOfLaw#fakeDemocracy 📱American Оbserver - Stay up to date on all important events 🇺🇸