#cpython
Pora na kolejną okresową przypominajkę, że #GitHub Actions, podobnie jak inne systemy CI, o których mi wiadomo, oraz dystrybucje Linuksa (w standardowej konfiguracji) instalują Pythona z wyłączonymi asercjami.
Oznacza to, że ta domyślna konfiguracja *absolutnie nie nadaje się* do testowania, czy twój kod nie łamie konwencji API CPythona. Albo musisz zbudować CPythona z `--with-assertions`, albo skompilować swoje rozszerzenie z `-UNDEBUG`, by obejść to (to drugie rozwiązanie nie wychwyci wszystkich błędów).
A jeśli ktoś włoży wysiłek, by zgłosić złamaną asercję i wyraźnie opisze, w jaki sposób odtworzyć problem, to ten ktoś naprawdę będzie wdzięczny, jeśli nie zamkniesz zgłoszenia, bo "na GHA przeszło".
https://github.com/agronholm/cbor2/issues/171#issuecomment-1703834609
This is yet another periodic reminder that #GitHub Actions, as well as all other CI systems I'm aware of and Linux distributions (at least in default configuration) install #Python with assertions disabled. This means that all your C extensions are also built with assertions disabled.
This means that the default setup is completely useless for testing whether you didn't violate CPython's API. You need to either build your own #CPython with --with-assertions or explicitly built with -UNDEBUG to workaround that (and the latter option doesn't catch all violations).
And if someone goes through the effort of reporting a violated assertion and explicitly tells you how to reproduce it, that someone would certainly appreciate if you didn't close the bug saying that GHA passed.
https://github.com/agronholm/cbor2/issues/171#issuecomment-1703834609
🐍 Understanding Immortal Objects in Python 3.12: A Deep Dive into Python Internals
➥ Abhinav Upadhyay
「 A detailed examination of Python 3.12's internal changes featuring the concept of 'immortal' objects, for performance enhancements 」
https://codeconfessions.substack.com/p/understanding-immortal-objects-in
This year is very intensive in terms of migrations for scientific Python maintainers:
- a new #CPython (3.12) in October
- a major version of #Cython (3.0) announced for this summer
- a major version of #Numpy (2.0) scheduled for the end of the year
All of which will require careful testing and probably take some time to propagate through the giant mess that are dependency trees in scientific #Python 😵💫
Job Alert: @ThePSF is seeking a full-time CPython Developer in Residence. Learn more about the position and apply now on #OSJobHub https://opensourcejobhub.com/job/8533/deputy-cpython-developer-in-residence/ #jobs #career #PSF #Python #CPython #developer #SoftwareDevelopment #OpenSource #remote
Looking at a #CPython feature request from a few years ago (as one does) for iterating over extended grapheme clusters, and suddenly a wild @manishearth appears 😁
Our next #Stockholm #Python meetup will be on 7th, from 5:30pm in the #SUNET office. We will sit down and learn how to build #CPython itself. Hoping to get more people excited about contributing to the language itself.
A cute bit of #CPythonTrivia: there has been some Jython-specific compatibility code in #CPython for decades that was removed only last November:
Good news for #CPython C API users who use subinterpreters, looks like the changes to add per-interpreter GIL functionality (PEP 684) hit the main branch today!
https://github.com/python/cpython/commit/5c9ee498c6f4b75e0e020f17b6860309c3b7e11e
Brett Cannon, developer manager at Microsoft and Python core developer, is giving the talk "Python's syntactic sugar" at PyCon US 2023 in Salt Lake City 🇺🇲🐍
Łukasz Langa, the CPython Developer in Residence, is speaking about "Working Around the GIL with asyncio" at PyCon US 2023 in Salt Lake City 🇺🇲🐍
He's going through two examples of data processing with Python 3.11 and how asyncio with shared memory helps speed things up ⚡
#Python #GIL #SharedMemory #AsyncIO #CPython #PyCon #PyConUS #PyCon2023 #PyConUS2023 #PythonSpeakingTour


This was shared by @David3141593 and said to be a 0day in cpython
-----
# py3.8+
unused=b'\x50K\3\4'+b'\0'*26+b'+(\xca\xcc+\xd1P\xcfHL\xceNMQ\xc8\xc9\xcfQ\xd7\4\0PK\1\2'+b'\0'*6+b'\1'+b'\0'*9+b'\x15'+b'\0'*7+b'\13'+b'\0'*17+b'__\x6da\x69n__.\x70y\x50K\5\6'+b'\0'*8+b'9\0\0\0003\0\0\0'
i=__import__
i("runpy").run_path(i("py_compile").compile(__file__))
----
"I can't think of any real-world impact from it except in contrived scenarios, but it makes a fun tweet-sized puzzle at least" - @David3141593
@aegilops For a while #IronPython appeared to be "stuck" in 2.7 just like #Jython, but in December they released version 3.4 and they've ported f-strings from #CPython 3.6.
I cannot imagine what goes into implementing Python in other programming languages, and for that they deserve my admiration. But it is indeed a shame Jython has not moved past 2.7 in almost eight years.
Maybe Inductive Automation will open their platform to other scripting languages, but until then I'm stuck in 2.7 too.
AI as Render Engine?
🤔 The way is long, but I still wonder why pay for something that is already free or even could be not so expensive?
Below is the first personal attempt to achieve at least one of the abovementioned aims. 😉 my goal, as always, is to extend design possibilities to everyone.
#sneakpeek #AmbrosinusToolkit #DEV #Grasshopper #csharp #CPython #Python #coding #Rhino #api #design #craftsman #tools #ai #stablediffusion #ControlNET #lucianoambrosini
Perf engineering with Python 3.12
https://www.petermcconnell.com/posts/perf_eng_with_py12/
Self-awareness in an article’s narrative is a good thing, especially when it channels Bette Davis: “Yes, this is a very long article. If you just made yourself a fresh cup of tea, coffee or your favorite beverage, it’s going to be cold by the end of Part 1.”
PEP 703 – Making the Global Interpreter Lock Optional in #CPython #Python
https://peps.python.org/pep-0703/
@brianokken This is great, thank you!
In addition to making sure your own code is ready for 3.12, you're also testing #CPython itself and might find bugs there too. If so, please report upstream :)
https://devguide.python.org/triage/issue-tracker/
Here's how I found a release blocker for 3.11 last year: https://twitter.com/hugovk/status/1482367773577822208 #Python #testing
𝗔𝗜 𝗖𝗼𝗺𝗽𝗹𝗲𝘁𝗶𝗼𝗻-𝗔𝗶𝗱𝗲𝗱 𝗗𝗲𝘀𝗶𝗴𝗻 𝘀𝘁𝗮𝗿𝘁𝘀 𝗳𝗿𝗼𝗺 𝗮𝗻𝘀𝘄𝗲𝗿𝘀 - 𝗢𝗽𝗲𝗻𝗔𝗜 𝗖𝗼𝗺𝗽𝗹𝗲𝘁𝗶𝗼𝗻 𝗺𝗼𝗱𝗲
-
𝘞𝘪𝘭𝘭𝘪𝘢𝘮 𝘎𝘪𝘣𝘴𝘰𝘯’𝘴 𝘶𝘤𝘩𝘳𝘰𝘯𝘪𝘢 𝘪𝘯 𝘵𝘩𝘦 𝘧𝘪𝘦𝘭𝘥 𝘰𝘧 𝘥𝘦𝘴𝘪𝘨𝘯 𝘪𝘴 𝘢𝘣𝘰𝘶𝘵 𝘵𝘰 𝘩𝘢𝘱𝘱𝘦𝘯?
-
You can read here some shared reflections over a good coffee or tea --> https://lnkd.in/dDjS7cdg
-
Video demo here --> https://lnkd.in/d2u246QW
-
#cyberpunk #openai #gpt3 #davinci #artificialintelligence
#environmentaldesign #AICompletionAidedDesign #AmbrosinusToolkit #DEV #Grasshopper #CPython #coding #rhino #architects #designers #lucianoambrosini

𝗔𝗱𝘃𝗮𝗻𝗰𝗲𝗱 𝘃𝗲𝗿𝘀𝗶𝗼𝗻 𝗼𝗳 𝗢𝗽𝗲𝗻𝗔𝗜 (𝗗𝗔𝗟𝗟-𝗘) 𝗶𝗻𝘀𝗶𝗱𝗲 𝗚𝗿𝗮𝘀𝘀𝗵𝗼𝗽𝗽𝗲𝗿 𝘄𝗶𝘁𝗵 𝗣𝘆𝘁𝗵𝗼𝗻
📣 There are different ways to install and test the new features, so, if you are curious... 🎶
-
✨Have a look here -->https://lnkd.in/dpBbpTiv
-
🎞️ "Edit mode" video highlights here --> https://lnkd.in/dWG_27_r
🎞️ "Variation mode" video highlights here --> https://lnkd.in/d7nG8Pig
-
Enjoy the exploration! ;)
#openai #dalle2 #img2img #AmbrosinusToolkit #DEV #Grasshopper #CPython #coding #rhino #prompt #ai #lucianoambrosini
𝗦𝘁𝗮𝗯𝗶𝗹𝗶𝘁𝘆𝗔𝗜 (𝗦𝘁𝗮𝗯𝗹𝗲 𝗗𝗶𝗳𝗳𝘂𝘀𝗶𝗼𝗻) 𝗶𝗻𝘀𝗶𝗱𝗲 𝗚𝗿𝗮𝘀𝘀𝗵𝗼𝗽𝗽𝗲𝗿 𝘄𝗶𝘁𝗵 𝗣𝘆𝘁𝗵𝗼𝗻
📣 Thanks to Stability-AI API documentation for Stable Diffusion (v 1.5) by DreamStudio it is possible to integrate into Grasshopper our "prompts to image" process throughout my component "LA_StabilityAI-GH"
-
✨ Have a look here -->https://lnkd.in/dTyXPigP
🎞️ Video demo here -->https://lnkd.in/dhmJ7cpN
-
-
#stabilityai #stablediffusion #DreamStudio #AmbrosinusToolkit #DEV #Grasshopper #CPython #coding #rhino #ai #lucianoambrosini
𝗢𝗽𝗲𝗻𝗔𝗜 (𝗗𝗔𝗟𝗟-𝗘) 𝗶𝗻𝘀𝗶𝗱𝗲 𝗚𝗿𝗮𝘀𝘀𝗵𝗼𝗽𝗽𝗲𝗿 𝘄𝗶𝘁𝗵 𝗣𝘆𝘁𝗵𝗼𝗻
📣Thanks to Open AI API documentation for DALL-E is it possible to integrate into Grasshopper our "prompts to image" process throughout my component "LA_OpenAI-GH" (I am going to update it in my Ambrosinus-Toolkit soon!) - I am still in WIP but... 🎶
-
✨Have a look here -->https://lnkd.in/dFhTxUDR
-
-
#openai #dalle2 #AmbrosinusToolkit #DEV #Grasshopper #CPython Mahmoud M. Abdelrahman #coding #rhino #prompttoimage #ai #architects #lucianoambrosini

This week’s #FOSSSupport is the @ThePSF. I’m proud to say I am already a supporting member of the #psf but right now they are in the middle of their biggest fundraiser. If you are involved at all with Python this is an obvious choice, it will #python #cpython #pypi #pycon and more
https://www.python.org/psf/donations/2022-q4-drive/
I've done a benchmark between Rust, C, Common Lisp and Python on my SBC which has ARM processor and here are the results:
https://far.chickenkiller.com/computer/benchmarking-common-lisp-rust-c-and-python-on-arm/
#benchmark #c #lisp #cl #common_lisp #rustlang #arm #armv7 #pi #python #cpython #pypy #pypy3
@mike Yep, every project you depend on will have their own lifecycle policies that folks should be aware of. In general I think the science part of the Python community is a bit shorter than #CPython itself, probably so people don't get caught all at once with unsupported Python **and** dependencies.
It's time for a re-#introduction!
I'm a #MastersStudent in #ComputerScience. In my spare time, I develop #OpenSourceSoftware such as
- a library to talk to #ManifoldMarkets from native #Python
- a #PredictionMarket manager using the above
- a transpiler from a subset of Python to #OpenStreetMaps's OverpassQL
- bug fixes to many other projects, including #mypy, #base58, #attrs, #cpython, and more
I'm also a hobbyist editor on OpenStreetMap.
It's time for a re-#introduction!
I'm a #MastersStudent in #ComputerScience. In my spare time, I develop #OpenSourceSoftware such as
- a library to talk to #ManifoldMarkets from native #Python
- a #PredictionMarket manager using the above
- a transpiler from a subset of Python to #OpenStreetMaps's OverpassQL
- bug fixes to many other projects, including #mypy, #base58, #attrs, #cpython, and more
I'm also a hobbyist editor on OpenStreetMap.
Python-Compiler Nuitka 1.0 verspricht mehr Tempo
Machine Learning: Meta spendet 300.000 Dollar an die Python Software Foundation
JIT-Compiler: Pyston 2.1 soll Python-Anwendungen schneller machen
Pyston 2.0 will Python Beine machen