python

Back Open Paginator
03.03.2026 16:44
bbelderbos (@bbelderbos@fosstodon.org)

Ever had this in your #Python code?

def process(items):
for item in items:
if item > 0:
result = item * 2
return result

print(process([1, 2, 3])) # Works
print(process([])) # Raises UnboundLocalError




Show Original Post


03.03.2026 16:29
feed (@feed@feedsin.space)

PEP 827: Type Manipulation

We propose adding powerful type-level introspection and construction facilities to Python’s type system. This design is inspired largely by TypeScript’s conditional and mapped types, but is adapted to the distinct semantics and constraints of Python’s typing model.

python




Show Original Post


03.03.2026 16:20
feed (@feed@feedsin.space)

Python 3.11.15

Release date: 2026-03-03 01:05:56+00:00

python




Show Original Post


03.03.2026 16:20
feed (@feed@feedsin.space)

Python 3.10.20

Release date: 2026-03-03 01:10:39+00:00

python




Show Original Post


03.03.2026 16:18
markpitblado (@markpitblado@mstdn.ca)

If you're looking for an easy way to check data for errors, pointblank is a great tool that allows for report generation and automated checks in CI/CD pipelines.

markpitblado.me/blog/validatin

#python




Show Original Post


03.03.2026 16:07
pypi (@pypi@fosstodon.org)

RE: mastodon.social/@fastlydevs/11

Huge thanks to @fastlydevs for 10+ years of keeping #PyPI up and running! PyPI serves 800K+ users at ~100K requests/sec. With a small team behind the service, that kind of scale is only possible because of infrastructure partners who invest in the sustainability of the #Python ecosystem.




Show Original Post


03.03.2026 16:05
lobsters (@lobsters@mastodon.social)

Guido van Rossum interviews Thomas Wouters (Python Core Dev) lobste.rs/s/8a42ve
gvanrossum.github.io/interview




Show Original Post


03.03.2026 15:46
notes (@notes@mk.absturztau.be)

I might be looking for one or more coding buddies for a modest after work #python #game project.
Especially someone who can support keeping me organized and motivated. Both are hard with ADHD.
No need to be a professional it is meant for fun and learning. Ideally, we can learn from each other while having fun
#codingtogether.
Moderate Python skills needed. German or English speaker. No Vibe coding.

Here is my pitch:
I miss the old browser games of 10-20 years ago without all sorts of fancy frontend nonsense.
Animations, graphics, overbearing JS, Flash or similar. I'd like to do a very toned-down CLI style UX.
Maybe some
#asciiart.

And I'd like to use and improve my
#async programming skills as well as try out/showcase the #textual library.
I have also wanted to build something on top of the Space Traders API for a while.
I have been a developer on the
#OGame Team for a while and have worked on porting old browser games to newer PHP versions before.
I have been an OGame player for about a decade.
I have 20 years of experience in web development in PHP.

Here is my proposed Stack:
* Python 3.10 or above
*
Textual Frontend
*
AioHTTP via OpenApi Generator
* SQLite / SqlAlchemy for local storage
*
Space Traders API
* Bonus points for hosting the app on a server with textual-serve or textual-web.




Show Original Post


03.03.2026 15:42
habr (@habr@zhub.link)

Как обычному разработчику попасть в open source и стоит ли это делать

На дворе 2026 год. Open source больше не про энтузиастов в подвалах или душных стариков, которые часами спорят за Pull Request +1/--1. Современная разработка open source напоминает толкучку: одни срочно переписывают код на Rust, другие так же срочно его оттуда выкидывают, а корпорации скупают проекты за миллиарды. Наблюдая за всей этой вакханалией, я поймал себя на мысли, что open source выглядит, мягко говоря, непритязательным для новичков. Какие-то там роли, правила, коммерциализация, нейрослоп. Но именно здесь и сейчас люди продолжают делать работающие продукты. Зачем и как? Попробуем разобраться. Я сам — разработчик и популяризатор open source, а также организатор сообщества питонистов в Новосибирске. Создаю свои проекты и активно помогаю dishka, faststream, wemake-python-styleguide и другим. Я собрал знакомых контрибьюторов, записи с митапов и последние новости, чтобы рассказать, как устроен open source изнутри и нужно ли оно вам вообще. А если надо — то с чего начать, если кнопка отправки PR до сих пор внушает иррациональный страх.

habr.com/ru/companies/ru_mts/a

#open_source #rust #python #anthropic #нейросети #нейрослоп #опенсорс




Show Original Post


03.03.2026 15:29
ubuntu_touch (@ubuntu_touch@mstdn.social)

Caida Libre sitio web

#python #flask
#Galileo #Fisica





Show Original Post


03.03.2026 15:15
content (@content@socialhome.network)

Django security releases issued: 6.0.3, 5.2.12, and 4.2.29

In accordance with our security release policy, the Django team is issuing releases for Django 6.0.3, Django 5.2.12, and Django 4.2.29. These releases address the security issues detailed below. We encourage all users of Django to upgrade as soon as possible.

CVE-2026-25673: Potential denial-of-service vulnerability in <tt class="docutils literal">URLField</tt> via Unicode normalization on Windows

The <tt class="docutils literal">django.forms.URLField</tt> form field's <tt class="docutils literal">to_python()</tt> method used <tt class="docutils literal">urllib.parse.urlsplit()</tt> to determine whether to prepend a URL scheme to the submitted value. On Windows, <tt class="docutils literal">urlsplit()</tt> performs NFKC normalization (<tt class="docutils literal">unicodedata.normalize</tt>), which can be disproportionately slow for large inputs containing certain characters.

<tt class="docutils literal">URLField.to_python()</tt> now uses a simplified scheme detection, avoiding Unicode normalization entirely and deferring URL validation to the appropriate layers. As a result, while leading and trailing whitespace is still stripped by default, characters such as newlines, tabs, and other control characters within the value are no longer handled by <tt class="docutils literal">URLField.to_python()</tt>. When using the default <tt class="docutils literal">URLValidator</tt>, these values will continue to raise <tt class="docutils literal">ValidationError</tt> during validation, but if you rely on custom validators, ensure they do not depend on the previous behavior of <tt class="docutils literal">URLField.to_python()</tt>.

This issue has severity "moderate" according to the Django Security Policy.

Thanks to Seokchan Yoon for the report.

CVE-2026-25674: Potential incorrect permissions on newly created file system objects

Django's file-system storage and file-based cache backends used the process <tt class="docutils literal">umask</tt> to control permissions when creating directories. In multi-threaded environments, one thread's temporary umask change can affect other threads' file and directory creation, resulting in file system objects being created with unintended permissions.

Django now applies the requested permissions via <tt class="docutils literal">os.chmod()</tt> after <tt class="docutils literal">os.mkdir()</tt>, removing the dependency on the process-wide umask.

This issue has severity "low" according to the Django Security Policy.

Thanks to Tarek Nakkouch for the report.

Affected supported versions

  • Django main
  • Django 6.0
  • Django 5.2
  • Django 4.2

Resolution

Patches to resolve the issue have been applied to Django's main, 6.0, 5.2, and 4.2 branches. The patches may be obtained from the following changesets.

CVE-2026-25673: Potential denial-of-service vulnerability in <tt class="docutils literal">URLField</tt> via Unicode normalization on Windows

CVE-2026-25674: Potential incorrect permissions on newly created file system objects

The following releases have been issued

The PGP key ID used for this release is Natalia Bidart: 2EE82A8D9470983E

General notes regarding security reporting

As always, we ask that potential security issues be reported via private email to <tt class="docutils literal">security@djangoproject.com</tt>, and not via Django's Trac instance, nor via the Django Forum. Please see our security policies for further information.

https://www.djangoproject.com/weblog/2026/mar/03/security-releases/

#django #python #webdev




Show Original Post


03.03.2026 15:04
driscollis (@driscollis@mastodon.social)

101 - How to count the number of characters in a string 🐍🔥





Show Original Post


1 ...390 391 392 393 394 395 396 397 398 399 400 ...1592
UP