Feeds
FSF Blogs: Exciting talks, hands-on workshops, and thrilling discussions await you at LibrePlanet 2024
PyCoder’s Weekly: Issue #618 (Feb. 27, 2024)
#618 – FEBRUARY 27, 2024
View in Browser »
How do you avoid the bottlenecks of data processing systems? Is it possible to build tools that decouple storage and computation? This week on the show, creator of the pandas library Wes McKinney is here to discuss Apache Arrow, composable data systems, and community collaboration.
REAL PYTHON podcast
Flask-Muck sits on top of a Flask/SQLAlchemy tech stack and uses a declarative and modular approach to replace huge amounts of boilerplate code by generating a full-featured set of standard CRUD endpoints for a resource. Learn how to use it by reading this post.
DANNY TIESLING • Shared by Danny Tiesling
Join Snyk’s Live Hack Workshop! Get live expert support while learning how to exploit & remediate vulnerabilities. March 6th | 11:00am ET (Worth 1 CPE credit) →
SNYK.IO sponsor
Tom Dyson, a founding member of the Wagtail core team, shares some thoughts about how Wagtail CMS grew from a small, niche open source project into one of the most popular Python CMSs used by NASA, Google, the National Health Service, and many others.
TOM DYSON
In this tutorial, you’ll learn about Backus–Naur form notation (BNF), which is typically used for defining the grammar of programming languages. Python uses a variation of BNF, and here, you’ll learn how to read it to get a better understanding of some language constructs.
REAL PYTHON
The article introduces the threading module’s local() for storing thread-local values. Since threads in Python share the memory space of their parent process, you might need to define thread-specific variables for specific use cases to avoid unintended side effects.
ADARSH DIVAKARAN • Shared by Adarsh Divakaran
Code reviews are great - but they shouldn’t slow down your development. Sourcery can automatically review every one of your PR’s so your team can keep moving fast →
SOURCERY sponsor
Rich is a powerful library for creating text-based user interfaces (TUIs) in Python. It enhances code readability by pretty-printing complex data structures and adds visual appeal with colored text, tables, animations, and more.
REAL PYTHON course
Monorepos can be a bit overwhelming, containing all the code for all your projects. Thankfully, there are ways to visualize a Python monorepo. This blog post introduces you to one repo visualizer: Polylith
DAVID VUJIC • Shared by David Vujic
Did you know it takes about 17,000 CPU instructions1 to print(“Hello”) in Python? And that it takes ~2 billion of them to import seaborn? Learn about the tools Matt used to find this out.
MATT STUCHLIK
Pypi is a real treasure box full of great Python tools. Unfortunately, released versions of most of them can suddenly be broken by a downstream dependency release.
IVO HOUBRECHTS • Shared by Ivo Houbrechts
This article talks about wgpu-py, a GPU portable Python library. Ever want to use the GPU but use something other than NIVIDIA? This library might be for you.
ITAMAR TURNER-TRAURING
Future-proof your AI apps with constantly expanding model compatibility, including YOLOv8, Padim, and more. Speed up development and deploy seamlessly with Intel’s OpenVINO toolkit.
INTEL CORPORATION sponsor
This post attempts to demonstrate a calculus proof by applying floats, but of course the precision of floats get in the way. See what happens.
EXOZY
Learn how the development process varies between working with Django REST Framework and Vue versus Django and HTMX.
ŠPELA GIACOMELLI • Shared by Michael Herman
February 28, 2024
REALPYTHON.COM
February 29, 2024
MEETUP.COM
February 29, 2024
MEETUP.COM
March 4 to March 8, 2024
PYCON.ORG
March 4, 2024
J.MP
March 9 to March 11, 2024
PYCON.PK
Happy Pythoning!
This was PyCoder’s Weekly Issue #618.
View in Browser »
[ Subscribe to 🐍 PyCoder’s Weekly 💌 – Get the best Python news, articles, and tutorials delivered to your inbox once a week >> Click here to learn more ]
New risk assessment framework offers clarity for open AI models
There is a debate within the AI community around the risks of widely releasing foundation models with their weights and the societal impact of that decision. Some are arguing that the wide availability of Llama2 or Stable Diffusion XL are a net negative for society. A position paper released today shows that there is insufficient evidence to effectively characterize the marginal risk of these models relative to other technologies.
The paper was authored by Sayash Kappor of Princeton University and Rishi Bommasani of Stanford University, me and others and is directed at AI developers, researchers investigating the risks of AI, competition regulators, and policymakers who are challenged with how to govern open foundation models.
This paper introduces a risk assessment framework to be used with open models. This resource helps explain why the marginal risk is low in some cases where we already have evidence from past waves of digital technology. It reveals that past work has focused on different subsets of the framework with different assumptions, serving to clarify disagreements about misuse risks. By outlining the necessary components of a complete analysis of the misuse risk of open foundation models, it lays out a path to a more constructive debate moving forward.
I hope this work will support a constructive debate where risks of AI are grounded in science and today’s reality, rather than hypothetical, future scenarios. This paper offers a position that balances the case against open foundation models with substantiated analysis and a useful framework on which to build. Please read the paper and leave your comments on Mastodon or LinkedIn.
Kushal Das: Mullvad VPN repository for Fedora
Mullvad VPN now has proper rpm repository for their desktop client. You can use it in the following way on you Fedora system:
sudo dnf config-manager --add-repo https://repository.mullvad.net/rpm/stable/mullvad.repo sudo dnf install mullvad-vpnRemember to verify the OpenPGP key Fingerprint:
Importing GPG key 0x66DE8DDF: Userid : "Mullvad (code signing) <admin@mullvad.net>" Fingerprint: A119 8702 FC3E 0A09 A9AE 5B75 D5A1 D4F2 66DE 8DDF From : https://repository.mullvad.net/rpm/mullvad-keyring.ascMike Driscoll: uv – Python’s Fastest Package Installer and Resolver
There’s a new Python package installer out now and it’s called uv. The uv package installer and resolver is made by Astral. Uv is written in Rust instead of Python and is super fast! Astral is best known for Python’s fastest formatter, Ruff. The uv package is meant to be a drop-in replacement for pip and pip-tools. According to Astral, “uv is 8-10x faster than pip and pip-tools without caching, and 80-115x faster when running with a warm cache (e.g., recreating a virtual environment or updating a dependency)”.
Astral is also taking over the development of Rye, an experimental Python packaging tool from Armin Ronacher. From the sounds of Astral’s announcement, Rye and uv will become one tool as the two projects have a shared vision for Python packaging.
Installing uvYou can install uv using Curl:
curl -LsSf https://astral.sh/uv/install.sh | shOr you can use pip:
pip install uvNow that you have uv installed, you can start installing packages!
Using uvLet’s try running uv in your terminal:
c:\code> uv Usage: uv.exe [OPTIONS] <COMMAND> Commands: pip Resolve and install Python packages venv Create a virtual environment cache Manage the cache help Print this message or the help of the given subcommand(s) Options: -q, --quiet Do not print any output -v, --verbose Use verbose output --color <COLOR> Control colors in output [default: auto] [possible values: auto, always, never] -n, --no-cache Avoid reading from or writing to the cache [env: UV_NO_CACHE=] --cache-dir <CACHE_DIR> Path to the cache directory [env: UV_CACHE_DIR=] -h, --help Print help (see more with '--help') -V, --version Print versionYou’ll need to create and activate a Python virtual environment to install packages with uv.
Here’s an example:
C:\code> uv venv test Using Python 3.11.5 interpreter at C:\Users\wheifrd\AppData\Local\Programs\Python\Python311\python.exe Creating virtualenv at: test Activate with: test\Scripts\activate C:\code> .\test\Scripts\activate (test) C:\books>Now you’re ready to install a Python package. You can use numpy for a test run:
(test) C:\books> uv pip install numpy Resolved 1 package in 615ms Downloaded 1 package in 2.81s Installed 1 package in 332ms + numpy==1.26.4As you might expect, you can also use uv to install:
- a list of space-delimited packages
- a requirements.txt file
- a pyproject.toml file
If you need to generate a locked requirements.txt file, you can run uv pip compile.
Wrapping UpAstral hopes to create a “Cargo for Python” with the release of uv. While it’s still early, this project is well worth watching as the Rust package itself is amazingly fast and useful even though it’s only been out for about a year. You can read more about uv in Astral’s blog post.
The post uv – Python’s Fastest Package Installer and Resolver appeared first on Mouse Vs Python.
Real Python: Python Basics Exercises: Installing Packages With pip
So far on the Python Basics learning path, you’ve been working within the bounds of the Python standard library. Now it’s time to unlock packages that aren’t included with Python by default. To do that, you’ll need pip.
Many programming languages offer a package manager that automates the process of installing, upgrading, and removing third-party packages. Python is no exception. The de facto package manager for Python is called pip.
In this Python Basics Exercises course, you’ll test and reinforce your knowledge of installing packages and managing virtual environments.
In this video course, you’ll practice:
- Installing and managing third-party packages with pip
- Using virtual environments to separate project dependencies
- Declaring requirements and re-create a development environment
By the end of this course, you’ll have an even stronger grasp of installing packages to suit your programming needs
This video course is part of the Python Basics series, which accompanies Python Basics: A Practical Introduction to Python 3. Note that you’ll be using IDLE to interact with Python throughout this course.
[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short & sweet Python Trick delivered to your inbox every couple of days. >> Click here to learn more and see examples ]
Horizontal Digital Blog: How to Migrate from Video Embed WYSIWYG to Drupal Core Media
Modernized, streamlined, and fediverse-friendly: OpenSource.org is fully migrated and ready to connect!
Two years ago, we started migrating our website from Drupal to WordPress. We knew it wasn’t going to be a quick weekend project, but more of a journey. Today, we celebrate the final leg of this journey – merging our blog back into the main site, creating a unified online experience for our community.
Let’s rewind to 2022. Our Drupal site, while trusty, was starting to show its age. It lacked the modern features and it was self hosted, which was taking a huge toll on our team. We knew a change was necessary, but a complete overhaul would have taken too long. So, we decided to move in steps: blog first, main site later.
We first migrated our blog content to a brand new, WordPress-powered platform in early 2023. This gave us a taste of the agility and flexibility WordPress offered. We loved the intuitive interface, the vast plugin ecosystem, and the worry-free managed WordPress provided by DreamHost.
Emboldened by this success, we set our sights on the bigger challenge: migrating the entire website. This wasn’t just about moving content; it was about restructuring, modernizing, and enhancing. We meticulously migrated web pages, ensuring the least amount of URL broke during the transition.
But migration wasn’t just about moving pixels and text. We took this opportunity to modernize our licenses pages. We added missing metadata and made them easily accessible to our users with a dedicated search engine. We also created a Custom Post Type for directors and forms to improve how we handle the nominations for the board elections.
Closing the loop with the blogNow, here we are, at the final stage of our migration journey: merging the blog back into the main site. This completes the circle, creating a unified online experience where our blog seamlessly integrates with the rest of our content – licenses, events, elections, blog and more.
But the most exciting part? We’ve embraced the power of the fediverse! Comments on our blog posts can now be posted and shared across different platforms, fostering a lively and open discussion space. This integration with ActivityPub opens up our content to a wider audience and encourages a more vibrant online community.
Looking back, our Drupal-to-WordPress migration was an odyssey filled with technical hurdles, strategic decisions, and moments of pure satisfaction. We learned, we created a single-sign-on mechanism for OSI members that works on other sites (OpenSource.net and the forum, to start) and ultimately, we emerged with a website that is modern, functional, and better serves our mission.
Next steps for opensource.orgNext project for us will be a content cleanup and expansion. We will soon start combing through years of content, removing outdated information and streamlining what remained. This decluttering will make space for new content for the website to be more useful, letting visitors learn what Open Source is and how it can help them. We’ll also add more features for OSI members based on the new forum. Explore the new blog, engage with our content, and join the conversation on the fediverse! And if you’re considering a website migration yourself, take heart from our story. With careful planning, the right tools, and the wonderful help of Automattic and the Pressable team, even the most complex migration can be a successful and rewarding journey.
Specbee: How to integrate SSO with Drupal using SAML
Python⇒Speed: Jevons Paradox doesn't always apply to software
When it comes to fighting climate change, I strongly believe that getting involved in politics is one of the most useful things you can do. But given how energy-intensive software is these days, writing more efficient software also seems worth doing, especially if your software is used at scale.
However, whenever efficiency is brought up, Jevons Paradox rears its head. Writing in the 19th century, Jevons pointed out that increased efficiency in the use of coal didn’t decrease the amount of coal used, it actually increased it. As it became more cost-effective and more useful, coal ended up being used in far more places.
So what about software: will faster software result in more usage, completely undoing the energy-consumption benefits of efficiency?
Read more...PyCharm: PyCharm 2023.3.4: AI Assistant’s Efficiency Boosters and a more powerful Django Structure tool window
This year, we are trying out a new approach with our releases, moving away from a quarterly schedule to more regular monthly feature-rich releases. This change is intended to deliver new features more rapidly and streamline the feedback process.
New AI Assistant functionality [PyCharm Professional]Get work done faster with new AI Assistant actions. Generate Python type annotations for functions and get Django views, admins, and serializers for models. Obtain a quick analysis of the data inside your DataFrame and convert Jupyter notebooks to scripts. Do all of this with just a click!
The Django Structure tool window [PyCharm Professional]Navigate through your Django projects faster with the new features of the Django Structure tool window. Access settings.py or identify and register unregistered admins directly in the tool window.
Quick Documentation for type parameter declarations in the new syntaxIf you have already adopted the new syntax for type parameter declarations introduced in PEP 695, this feature will definitely make your life easier. The Quick Documentation popup clearly explains the type parameters and type aliases used in your code.
These are the most notable updates featured in the PyCharm 2023.3.4 release. For a detailed overview of all the changes, we recommend reviewing the release notes.
Learn more about PyCharm 2023.3.4
Your feedback is invaluable to us as we work to improve PyCharm. We encourage you to share your thoughts and suggestions on the latest features and updates. Connect with us on X (formerly Twitter) or drop a comment below to let us know what you think. If you come across any bugs while working with the IDE, please report them to our issue tracker.
FOSDEM 2024: two days on software freedom
FSF Blogs: FOSDEM 2024: two days on software freedom
Adnan Hodzic: App architecture with reliability in mind: From Kubernetes to Serverless with GCP Cloud Build & Cloud Run
The blog post you’re reading is hosted on a private Kubernetes cluster that runs inside my home. Another workload that’s running on same cluster is...
The post App architecture with reliability in mind: From Kubernetes to Serverless with GCP Cloud Build & Cloud Run appeared first on FoolControl: Phear the penguin.
Talking Drupal: Talking Drupal #439 - Drupal 7 Long-Term Support
Today we are talking about Drupal 7 Long Term Support, common security tips, and support services you can use with guests Greg Knaddison, Aaron Frost, and Dave Welch . We’ll also cover Storybook as our module of the week.
For show notes visit: www.talkingDrupal.com/439
Topics- Drupal 7 EoL
- Drupal will not stop working
- Security team perspective
- Security concerns
- Extened Community Support
- Long Term support
- HeroDevs
- Never ending support (NES)
- PHP
- Hosting
- Security
- Contrib
- Product advisor
- Colorado Digital Service
Greg Knaddison - morrisanimalfoundation.org greggles Aaron Frost - herodevs.com aaronfrost Dave Welch - herodevs.com dwelch2344
HostsNic Laflin - nLighteneddevelopment.com nicxvan John Picozzi - epam.com johnpicozzi Ivan Stegic - ten7.com ivanstegic
MOTW CorrespondentMark Casias - markie
- Module name/project name:
- Brief description:
- The storybook module makes it easier to create a connection between Drupal and Storybook. It adds some Twig functionality so you can write Stories in Twig as opposed to YML or JSON or React
- Brief history
- How old: Less than a year
- Versions available: Alpha4 came out earlier this month
- Maintainership
- Actively maintained: Yes
- Number of open issues: 6
- Test coverage: no
- Usage stats:
- N/A: for development only
- Maintainer(s):
- Mateu Aguiló Bosch (e0ipso) from Lullabot.
- Module features and usage
- Twig based stories
- Pulls in Sites theme and base css.
- So needs some updates to the development.services.yml
- Also means it is hard to publish a storybook.
- No need for SDC (but works well with it)
- Great instructions on the module page
- Way easier than previous integrations including cl_server.
- Not as opinionated as previous storybook integrations.
The Drop Times: Which CMS? Global City Website Trends Examined
The Drop Times: Innovation: The Lifeblood of Progress!
Dear Readers,
Innovation is the lifeblood of progress. It represents the pursuit of better solutions, the breaking of traditional boundaries, and products that challenge the status quo and push the boundaries of what is possible. True innovation involves a continuous cycle of exploration, experimentation, and adaptation, driven by a deep desire to solve complex problems and improve human experiences. It's about seeing beyond the current limitations and envisioning what could be, transforming bold visions into tangible solutions that can significantly advance how we live, work, and interact.
As a powerful tool for creating and maintaining dynamic web applications and the most sought-after enterprise-level CMS, Drupal stands as a testament to the power of innovation. As an open-source platform, Drupal thrives on its global community's collective creativity and technical prowess. Through Drupal, innovation is not just an individual pursuit but a shared journey, propelling the platform and its users toward new frontiers of digital possibility.`
Drupal means innovation, and the Drupal Association has introduced an Innovation Hub, a dedicated space to foster collaboration and advance innovation within the Drupal community. Headed by Alex Moreno, the initiative has devised a set of strategic goals for Drupal and its community for 2023-2025. With a focus on inspiration, collaboration, and driving Drupal forward, the Innovation Hub aims to shape the future of digital experiences and strengthen Drupal's vibrant ecosystem.
With that, welcome to the last week's most important content covered by The DropTimes.
Today marks the final day of Florida DrupalCamp 2024, and as media sponsors, The DropTimes came up with two interviews in the last week featuring two of the three featured speakers of FLDC 2024. I had the opportunity to interact with Matthew Ramir, who defied the limits posed by Cerebral Palsy and navigated the realms of Drupal. Read the full interview here.
Aubrey Sambor, the Lead Engineer at Lullabot and the featured speaker at FLDC 2024 in an interview with Kazima Abbas, sub-editor of The DropTimes, shares her experiences and expertise, offering a glimpse into the evolving world of web development and Drupal community contributions.
We have published a selection of essential modules that empower you to build a captivating online brand and turn your product features into compelling narratives with the help of Safallia Joseph, AcroCommerce. If you're crafting an e-commerce experience where storytelling and customer connection come first, Drupal with Drupal Commerce is your solution. If you've created or worked on a successful Drupal Commerce website, share your insights with us at editor@thedroptimes.com. This collaborative exchange will inspire and empower businesses to achieve extraordinary e-commerce results with Drupal and feature you in The DropTimes.
The Pantheon Autopilot Toolbar module addresses navigation deficiencies within Pantheon's Dashboard UI, enabling efficient access to Autopilot. Kevin Reynen, the Principal Web Applications Developer at the University of Colorado, discusses the module's creation and significance in this feature. Also, understand Pantheon's response to the issue.
Mike Gifford shares his first-hand insights from FOSDEM'24, the eminent open-source conference, shedding light on the significant discussions around open-source solutions in government, digital public goods, and the evolving role of open-source in societal advancement. Read the full article here. The Drupal Delhi Meetup, organized by Anushri Kumari, Megha Sharma, and Libbna Mathew, marked great promise for Drupal devotees. Kazima Abbas connected with the organizers to learn more about the event.
In other news, DrupalCamp Rennes revealed its lineup of keynote speakers and conference topics, and early bird registration is now open for DrupalCon Portland 2024. Tickets are also available for Midcamp 2024, and the Drupal MountainCamp schedule is out.
Drupal.org has made a significant announcement revealing that Drupal 11 is now open for development, while Drupal 10.3.x has been branched. A security advisory has been issued for the Node Access Rebuild Progressive module, identifying an access bypass vulnerability in versions prior to 2.0.2. Additionally, Neil Drumm has announced a streamlined process for accepting the Git Terms of Service within the Drupal community by transitioning the acceptance procedure to their GitLab instance.
We acknowledge that there are more stories to share. However, due to constraints in selection, we must pause further exploration for now.
To get timely updates, follow us on LinkedIn, Twitter and Facebook. Also, join us on Drupal Slack at #thedroptimes.
Thank you,
Sincerely
Alka Elizabeth
Sub-editor, TheDropTimes.
FSF Events: Free Software Directory meeting on IRC: Friday, March 01, starting at 12:00 EST (17:00 UTC)
Chapter Three: Next-Drupal 2.0: Making a Good Thing Even Better
ComputerMinds.co.uk: Aegir 3 and Drupal 10: just about working
In my previous article I outlined that I really needed to get Drupal 10 sites running in Aegir 3. I had no time to wait around for other solutions, and I was going to try to decouple Aegir from running Drupal sites, so that it wouldn't be tied to Drupal versions.
Since writing that article and actually sitting down to do this work, I realised that it's quite an undertaking, and the approach outlined by Omega8cc in various github issues was worth a second look.
It works!
But it's wild. It comprises three main things:
- A custom/forked version of Drush 8.
- A custom/forked version of Provision 3.
- A custom/forked version of Drupal 10.
- (A sneaky fourth is that you absolutely do not want to have site-local Drush)
So...yeah...it's not going to be for the faint-hearted, but I'm going to detail out those three things a little, and how you might want to apply them to your situation.
Custom Drush 8So the official Drush 8 doesn't support Drupal 10. But, it's actually not that much work to get this up and running, since Drush has pluggable 'engines' that load code based on the Drupal version that's detected when running commands.
Omega8cc has done a great job of doing the leg-work and providing a forked version of Drush, you can see the changes that have been made to support Drupal 10 here:
https://github.com/omega8cc/drush/compare/8.4.12...8-boa-micro
Although note, that there are some Aegir specific and non Drush 10 supporting changes in there too, so what I did was to make my own (private) fork of Drush and go through and apply the relevant changes to the files. If you don't know what the relevant changes are, then you probably are better off simply replacing your Drush with the Omega8cc fork, and it'll probably be fine.
Essentially this step is needed so that Drush sees the Drupal 10 codebase, and can interact with it correctly. It's likely that in Drupal 10's lifetime something will change, and Drush 8 will need some more work to be compatible with 10.3 and 10.4 etc.
If you were to run Drush 8 commands at this point, they'd start to bootstrap the site, but would fail with fatal errors. You need changes in Drupal 10 core too...
Custom Provision 3Provision also makes use of Drush engines to load the correct code for the correct situation, so that if you ask Aegir to install a new site on a platform it'll load up the correct bit of code for the relevant Drupal version.
Again Omega8cc has done all the hard work here and provided the changes you need, but they are a bit harder to pick out of the repo. Try searching for files that contain '_10':
https://github.com/omega8cc/provision
And that should get you the files you need. I will note that unlike the Drush fork above, this really is a heavy fork. You are getting a lot more besides Drupal 10 support, if you can, I'd go for patching this into your existing Provision codebase.
I could add these to official provision 3 on Drupal.org, but without the other pieces they are useless and won't help you. Aegir 3 is essentially unmaintained, so while I've committed some PHP 8 fixes in the last few weeks, I'm not going to commit huge things like this.
I suppose we could have some code maintained in an issue fork or a patch.
This step is need so that Provision will call the correct bits of code at the right time, as far as I can see, these are largely the same as Drupal 9 versions of the engines.
Custom Drupal 10Now for the big compromise.
The main problem here is that Drupal 10 uses Symfony 6, which has type hints on various interfaces and methods, and Drush 8 uses Symfony 2, which does not.
So, if you load one before the other, then as soon as PHP tries to load the second, it'll die because either the types are there, or they aren't.
This is a bit of a showstopper and there's no decent way to get it to work nicely. Instead, Omega8cc has discovered some band-aids you can slap on and while it'll work, it's brittle!
Omega8cc's fork of Provision automatically tries to apply some of these patches to Drupal 10 platforms, and gives you a nice way to add/remove them. But again, also has a lot of other opinionated changes (to provision), so if you want to know what to do to Drupal 10 core...keep reading:
We need to:
- Remove a bunch of typehints from Drupal core's logging mechanisms.
- Downgrade psr/log
- Patch symfony/console
Removing the typehints
Omega8cc have got a nice patch that does this:
https://raw.githubusercontent.com/omega8cc/boa/5.x-dev/aegir/patches/drupal-ten-aegir-01.patch
And you can apply that using composer patches if you want.
Note that if you have any classes that extend these patched classes, they'll need patching too, so if you have any custom or contrib loggers, you'll need to go sort those out.
Downgrading psr/logComposer makes this one super easy:
composer require 'psr/log:1.1.4 as 3.0.0'
Will do what you want. It's the companion to the first step, those classes implement these interfaces, so they need to get downgraded too. This might need to get adjusted if Drupal 10 core requires psr/log 3.1.0 or something like that, but the principles should still work.
If your Drupal 10 codebase isn't managed by Composer...well...getta out here and get that sorted first.
Patching symfony/consoleDrush 8 only uses part of this package, so we can get away with patching just a tiny bit of it. Essentially you want to remove the 'Input' directory within the package. If you have a build system you could delete the files as part of your build process. Omega8cc's approach is to make the directory essentially unreadable.
Either way the result is that when PHP tries to load some code that uses version 6 of Symfony\console\Input it'll fail to find the code in Drupal core, and instead fallback to the version that came with Drush 8. Luckily this code isn't used by Drupal core, but you'll need to check that your custom and contrib code doesn't use it either, or handles the case when it magically loads code from Symfony 2.
For me and my codebase this was fine. None of our custom or contrib code used the classes or interfaces, so all good.
That's itFor Drupal 10 support in Aegir, that should be it. You can run Aegir 3 in PHP 8.1 and Drupal 7 and Drupal 10 on the same box. Magic.
Make sure you don't have a site-local Drush in your composer require, otherwise, Drush 8 being the great tool that it is will find it, and pass execution over to it, but it's not the same Drush that Aegir has all it's claws/hooks in, so things will go badly quite quickly.
GotchasProbably many, we've not actually rolled this out into our production environment yet, but we're close.
The main thing I can think of is that Drupal 10 contrib modules are very much going to assume that there's a modern version of Drush running commands, and not Drush 8, so it's likely that they aren't going to provide Drush 8 commands. You might need to write your own shims that copy/paste large lumps of code, or call through the new style Drush commandfiles, but that means that Drush command hooks won't be working quite right etc.
So yeah, danger if you're doing anything interesting using Drush commands on your sites.
Oh, and I guess it's possible that this will all break hard in the Drupal 10 lifecycle. I mean, it probably won't because it'll always be a foundation of Symfony 6, but you never know, the Drop is always moving and all that.
Thanks to Omega8ccThis was all shown to be possible, and documented in code by the great team at Omega8cc, so thanks very much for the work they are doing. I have nothing against there heavy forks of Aegir, they just aren't for me, hence why I've tried to pull out just the bits you need into this post.
FutureI still think that Aegir 3 could be decoupled from hosting Drupal sites. So that it was hosting 'sites' and then one could have some well-defined way to interact with those sites via some command line tool depending on what they were. However, that's a big effort, and Aegir 3 is essentially unmaintained now, so that's not going to happen.
A number of others in the #aegir Drupal.org Slack channel have mentioned other alternatives, such as Aegir 5, or getting Drush 12 running Provision commands and running everything with Drush 12 instead of Drush 8, or using some other tool as the outer runner.
I think they are all going to run into the same issues/have to deal with the same thing: abstracting the notion of the 'site'. Provision 3 takes a number of shortcuts to make it really easy to pass data around between itself and the site, and those shortcuts simply aren't possible in Modern Drupal.
However, in case there's someone out there with a big ol' budget, and a desire to keep Aegir 3 going, I think the 'decoupled' Aegir would look something like:
- A provision where the places that it calls through to functions executed in the Drupal context abstracted out into some kind of site specific 'plugin'. Instead of trying to use the nice Drush functions for calling a 'inner' Drush command, instead the usual command line interface would be used and data simply encoded on stdin/stdout/stderr in a format not tightly coupled to Drush 8 or Drush 12/13 etc.
- Provision calls into the Drupal site a lot and because it's never needed to be explicit about doing it, it's sometimes hard to spot where this is happening.
- Some kind of shim package that can be composer required into sites hosted on Aegir that would provide some way for the Provision plugins to call into the Drupal site and get the response it needs. Maybe this would merely provide some Drush commands.
Good luck if anyone ever embarks on such a project! Or contact us if you want a shoulder to cry on to hire us for a project!