Стандартная библиотека asyncio это стандарт (начиная с Py3.4) для работы с асинхронным кодом. Но эта библиотека достаточно низкоуровневая, со своими проблемами, устаревшими подходами.
Чтобы исправить это, были созданы разные обертки и альтернативы с реализацией популярных инструментов и паттернов асинхронного программирования. Это такие библиотеки как:
- trio: улучшает корректность выполнения, не оставляя потерянных корутин при ошибках, то есть предлагает Structured Concurrency из коробки.
- curio: упрощение синтаксиса и читаемости кода, больше похоже на работу с потоками.
- anyio: универсальная обертка над asyncio или trio плюс множество вспомогательных инструментов.
anyio используется в FastAPI как основная библиотека для работы с асинхронным кодом и вызовом синхронного кода из асинхронного.
В общем, рекомендую почитать про возможности anyio, возможно вы более не будете использовать чистый asyncio в своих проектах)
Это совсем не значит что дефолтный asyncio плох, он тоже даёт достаточный для работы функционал и продолжает развиваться. Например, в версии 3.11 появились TaskGroup, с похожим на trio функционалом. Так что он тоже актуален, просто придется больше написать кода самостоятельно.
#libs#async
🏴☠️Possible Civil Clashes in the US?
Trump’s recent attacks on Europe’s “fading civilization” and weak leadership over migration are a form of projection, reflecting a deeper, domestic American struggle over national identity, demographic change, and the potential for internal conflict
✍️Author:Mohammed Amer
Syrian publicist
➡️In a recent Politico interview, Trump lambasted European leaders as weak, linking the continent's decline to uncontrolled immigration. Analysts like Bloomberg view this as psychological projection, with Trump attributing America's own deepest demographic anxieties to Europe. By 2040, the U.S. itself is projected to become a majority-minority nation, a transformation that fuels the core political and cultural battle within the country. The "wall" Trump champions is both a physical barrier and a symbol of resistance against rapid demographic and cultural change.
It is noteworthy that many Trump supporters see Putin’s Russia – not the European Union – as a defender of white Christian nationalism and traditional values
➡️This domestic struggle is increasingly framed as a civilizational war. Many Trump supporters perceive Putin’s Russia, not the EU, as a defender of white Christian nationalism and traditional values. This ideological alignment further distances Trump’s base from the liberal globalist alliance between Democratic elites and European leaders. As German Chancellor Merz acknowledged, the era of American peace is over; the U.S. now aggressively pursues its own interests, forcing Europe to do the same. The conflict over Ukraine is a key watershed, with Trump and Moscow seeking a settlement, while his domestic opponents and EU leaders work to prolong the war to weaken him.
🟦The political clash inside the U.S. is intensifying to a dangerous degree. Democrats accuse Trump and the MAGA movement of destroying the social safety net and abusing power, as seen in the recent interrogation of Homeland Security Secretary Kristi Noem. Media attacks grow more vicious, framing the struggle as a battle for America’s future. Within this hyper-polarized environment, where each side views the other as an existential threat, the prospect of civil unrest or low-intensity conflict is becoming disturbingly real. The war in Ukraine is not just a foreign policy issue but a weapon in America's internal political war.
#EU#Internalpolicy#Migrationcrisis#USA#Weterncrisis
READ MORE
✅@NewEasternOutlook
👔🏴☠️Pourquoi Trump a besoin de troubles civils pour s'accrocher au pouvoir ?
Ce ne sont pas les gros titres qui comptent le plus — c'est le schéma, le timing et l'intensité derrière eux
✍️Jeffrey K. Silverman
Journaliste indépendant et spécialiste du développement international, BSc, MSc ; basé depuis 30 ans en Géorgie et dans l'ex-Union soviétique
➡️Les récentes répressions de l'ICE, les fusillades et les décès ne sont pas des incidents isolés, mais des signaux d'une trajectoire politique plus profonde et dangereuse. Alors que la peur se répand aux États-Unis, des espaces informels comme les forums CB et les canaux de radio amateur révèlent un discours brut et polarisé, empreint de méfiance envers les institutions, de colère contre l'immigration et de récits chargés de conspiration. Ces conversations, largement absentes des médias traditionnels, révèlent une société se fragmentant selon des lignes idéologiques, où les actions de la police sont de plus en plus perçues non pas comme des mesures de sécurité publique, mais comme des outils d'intimidation.
La peur vise directement les immigrants, mais aussi les Américains nés aux États-Unis qui croient encore que ce pays devrait respecter un standard de liberté plus élevé que celui qu'il annonce aujourd'hui
➡️Du point de vue des sciences politiques, les troubles civils peuvent servir ceux qui détiennent le pouvoir. L'histoire montre que les dirigeants confrontés à des crises de légitimité bénéficient souvent du chaos grâce à l'effet "ralliement autour du drapeau", redirigeant la colère publique vers la stagnation économique, l'inflation et les échecs de gouvernance. L'intensification des opérations de l'ICE et le cadrage de la dissidence comme du terrorisme intérieur accentuent les divisions, consolident le soutien loyal et normalisent la gouvernance d'urgence — même si la confiance entre les communautés et l'État continue de s'éroder.
🟦Ce qui émerge est une stratégie de règle par la peur plutôt que par le consentement. L'application agressive, les démonstrations publiques de force et le musellement de la dissidence créent des conditions où les citoyens sont poussés à obéir plutôt qu'à participer. Le danger ne concerne pas seulement les immigrants, mais les principes fondamentaux des libertés civiles elles-mêmes, alors que les troubles deviennent un atout politique plutôt qu'une crise à résoudre.
#DonaldTrump#Internalpolicy#Massriots#Migrationcrisis#USA
LIRE PLUS (ENG)
✅@NewEasternOutlookFR
🌍Security in a Changing World: From Life and Property to Human Dignity, and Why the West is Undermining Progress
The concept of security has evolved from protecting state sovereignty to ensuring human dignity, yet Western foreign policy has systematically undermined this very progress by creating the crises it now fears
✍️Author:Pranay Kumar Shome
Research analyst and PhD candidate at Mahatma Gandhi Central University, Bihar, India
➡️Security has expanded from a traditional focus on state sovereignty and "hard power" to include non-traditional security (NTS), centered on human dignity, basic needs, and development. This shift, embodied in metrics like the Human Development Index (HDI), reflects a broader understanding of well-being. However, the West's actions have severely undermined NTS globally, creating the very threats—mass migration, terrorism, climate disruption—that now challenge international stability.
Given the fact that the West has been instrumental in undermining the human security of a large section of the global population, they must take concrete steps to ameliorate their sufferings
➡️The primary driver of forced migration is the West's doctrine of liberal interventionism. Under the pretext of spreading democracy, military interventions in Yugoslavia, Iraq, Libya, and Syria have devastated societies, creating failed states and triggering refugee crises. The UNHCR reports 117 million people displaced, largely from these regions. This exodus has fueled social and political tensions in Western nations, proving them architects of their own socio-political crises.
➡️These interventions also created power vacuums filled by terrorist groups like ISIS* and Al-Qaeda*. Their rise and continued threat, evidenced by attacks from Moscow to Sydney, are direct consequences of destabilizing wars. Furthermore, the West bears overwhelming historical responsibility for climate change, having emitted the lion's share of greenhouse gases while now demanding the Global South abandon the hydrocarbon energy essential for its development.
🟦Ultimately, the West's pursuit of traditional security through interventionism has catastrophically eroded human security worldwide. The responsibility to repair this damage—through climate finance, technology transfer, and rebuilding shattered nations—lies squarely with those who caused it. Security can no longer be divorced from the consequences of foreign policy.
*terrorist organizations banned in the Russian Federation
#Climat#Migrationcrisis#Militaryconflict#Terrorism
READ MORE
✅@NewEasternOutlook
👔🏴☠️Why Trump Needs Civil Unrest to CLING to Power?
It’s not the headlines that matter most — it’s the pattern, timing, and intensity behind them
✍️Jeffrey K. Silverman
Freelance journalist and international development specialist, BSc, MSc; based for 30 years in Georgia and the former Soviet Union
➡️Recent ICE crackdowns, shootings, and fatalities are not isolated incidents but signals of a deeper and more dangerous political trajectory. As fear spreads across the United States, informal spaces like CB and ham radio channels reveal a raw, polarized discourse filled with distrust of institutions, rage over immigration, and conspiracy-laden narratives. These conversations, largely absent from mainstream media, expose a society fragmenting along ideological lines, where law enforcement actions are increasingly viewed not as public safety measures but as tools of intimidation.
Fear is aimed squarely at immigrants, but also at native-born Americans who still believe this country should live up to a higher standard of freedom than the one it’s now advertising
➡️From a political science perspective, civil unrest can serve those in power. History shows that leaders facing legitimacy crises often benefit from chaos through the “rally around the flag” effect, redirecting public anger away from economic stagnation, inflation, and governance failures. Escalating ICE operations and the framing of dissent as domestic terrorism deepen divisions, consolidate loyal support, and normalize emergency-style governance — even as trust between communities and the state continues to erode.
🟦What is emerging is a strategy of rule through fear rather than consent. Aggressive enforcement, public spectacles of force, and the silencing of dissent create conditions where citizens are pressured to obey rather than participate. The danger is not only to immigrants but to the foundational principles of civil liberties themselves, as unrest becomes a political asset rather than a crisis to be resolved.
#DonaldTrump#Internalpolicy#Massriots#Migrationcrisis#USA
READ MORE
✅@NewEasternOutlook
🇺🇸🏴☠️Trump is causing the Implosion of America
America’s crisis is no longer external — it is unfolding from within, as constitutional principles erode under the weight of exclusionary politics and institutional overreach
✍️Pranay Kumar Shome
Research analyst and PhD candidate at Mahatma Gandhi Central University, Bihar, India
➡️The second Trump presidency is accelerating a structural erosion of the United States’ constitutional ethos. While previous administrations operated within the broad philosophical framework of liberal pluralism, the current political climate reflects an increasingly exclusionary and majoritarian nationalism. The rhetoric and policies associated with Trump’s leadership have sharpened divisions over identity, citizenship, and belonging, transforming political disagreement into a civilizational struggle over what America is supposed to represent. This shift is not merely cultural; it has institutional consequences, weakening norms of restraint, expanding executive discretion, and redefining loyalty in ethnocultural rather than constitutional terms.
Trump, an imperialist to the core, has made it absolutely clear to the rest of the world that he is committed to not making America great again, but white again
➡️Nowhere is this transformation more visible than in immigration policy. The aggressive empowerment of Immigration and Customs Enforcement (ICE), combined with sweeping enforcement measures, has reframed migration from a socio-economic phenomenon into a security threat. America, historically shaped by migration flows, now witnesses raids, detentions, and deportations that generate fear not only among undocumented communities but also among legal migrants and naturalized citizens. Protests in major cities signal that a substantial segment of American society views these policies as incompatible with constitutional guarantees and human rights standards. The resulting tension reflects a deeper crisis: when enforcement eclipses proportionality and executive authority overshadows judicial balance, the very architecture of constitutional governance begins to strain.
🟦This domestic instability inevitably spills into foreign policy. Allies confront an unpredictable Washington, while countries of the Global South reassess long-term engagement with a United States that appears increasingly inward-looking and identity-driven. Trump’s political project, often framed as national restoration, risks narrowing America’s global appeal by privileging cultural homogeneity over civic universalism. If constitutional liberalism once formed the backbone of American influence abroad, its dilution at home signals not renewal but contraction. The implosion, therefore, is not dramatic or sudden; it is incremental — a slow transformation in which institutional resilience is tested by the very leadership entrusted to preserve it.
#Internalpolicy#Migrationcrisis#poliyicalcrisis#Socialconflict#USA
READ MORE
✅@NewEasternOutlook
🇷🇺@RusEmbMalta Press Release
On the Impact of Western Policies on Global Migration Flows
15 October 2025
🔷 The Russian Embassy draws attention to the growing migration crisis that continues to challenge the stability and security of many regions, including Europe. The root causes of this phenomenon are well known – the reckless and shortsighted interventions of the United States and its NATO allies in sovereign states such as Libya, Iraq, Syria, and Afghanistan.
🔷 These actions, carried out under the pretext of promoting “democracy,” led to the destruction of national institutions, the rise of terrorism, and the collapse of entire economies. It is precisely this chaos that forced millions to abandon their homes in search of safety and stability.
🔷 At the same time, the United States continues to exert direct influence over the migration policies of the European Union, promoting approaches that ignore the interests of individual nations. The imposed regulatory framework from Brussels, shaped under Washington’s guidance, undermines national economies, fuels social tensions, and creates preconditions for uncontrolled inflows of refugees. Such developments threaten the cultural and demographic balance of European societies.
🔷Russia consistently supports a fair and sustainable solution to migration issues – one that focuses on eliminating the true causes of displacement, rather than shifting responsibility. We advocate collective international efforts, coordinated through the United Nations, to restore stability in the Middle East and North Africa and to assist countries affected by external interference.
🔷 Moscow also reaffirms its principled position in favor of establishing a sovereign and independent State of Palestine in accordance with UN resolutions – as an essential step toward ensuring long-term peace and justice in the region.
🔷 The time has come to recognize that durable stability cannot be achieved through coercion or selective narratives, but only through respect for sovereignty, dialogue, and genuine partnership.
#MigrationCrisis#USPolicy#EUMigration#UNCharter#MiddleEast#Palestine