Feeds

Python Insider: Python 3.14.0 alpha 1 is now available

Planet Python - Tue, 2024-10-15 15:38

It's now time for a new alpha of a new version of Python!

https://www.python.org/downloads/release/python-3140a1/

This is an early developer preview of Python 3.14

Major new features of the 3.14 series, compared to 3.13

Python 3.14 is still in development. This release, 3.14.0a1 is the first of seven planned alpha releases.

Alpha releases are intended to make it easier to test the current state of new features and bug fixes and to test the release process.

During the alpha phase, features may be added up until the start of the beta phase (2025-05-06) and, if necessary, may be modified or deleted up until the release candidate phase (2025-07-22). Please keep in mind that this is a preview release and its use is not recommended for production environments.

Many new features for Python 3.14 are still being planned and written. Among the new major new features and changes so far:

The next pre-release of Python 3.14 will be 3.14.0a2, currently scheduled for 2024-11-19.

More resources Enjoy the new release

Thanks to all of the many volunteers who help make Python Development and these releases possible! Please consider supporting our efforts by volunteering yourself or through organization contributions to the Python Software Foundation.

Regards from a grey yet colourful Helsinki,

Your release team,
Hugo van Kemenade
Ned Deily
Steve Dower
Łukasz Langa

Categories: FLOSS Project Planets

PyCoder’s Weekly: Issue #651 (Oct. 15, 2024)

Planet Python - Tue, 2024-10-15 15:30

#651 – OCTOBER 15, 2024
View in Browser »

Exploring the New Features of Python 3.13

Python 3.13 is here! Our regular guests, Geir Arne Hjelle and Christopher Trudeau, return to discuss the new version. This year, Geir Arne coordinated a series of preview articles with members of the Real Python team and a showcase tutorial, “Python 3.13: Cool New Features for You to Try.” Christopher’s video course “What’s New in Python 3.13” covers the topics from the article and shows the new features in action.
REAL PYTHON podcast

HPy: A Better C API for Python

The HPy project is a wrapper to the Python C-API meant to make it easier to integrate with Python code. It allows for universal binaries and has a debug mode. Associated HN Discussion
HPYPROJECT.ORG

Posit Connect: Share the Work You Make With Streamlit, FastAPI, & Other FOSS Frameworks

People use Posit Connect to publish, host, & manage interactive apps, dashboards, Python models, APIs, & much more. It provides a centralized, self-service place to share the products of data science teams. Increase the impact of your work by making it easier for others to integrate with your work →
POSIT sponsor

PyCon Africa 2024: A Summary

This was Vuyisile’s first visit to PyCon Africa and so he posted a summary of the event.
VUYISILE NDLOVU

PEP 760: No More Bare Excepts (Withdrawn)

PYTHON.ORG

PEP 735: Dependency Groups in pyproject.toml (Accepted)

PYTHON.ORG

Django Bugfix Release Issued: 5.1.2

DJANGO SOFTWARE FOUNDATION

Python Developers Survey 2024

PSF

Quiz: When to Use a List Comprehension in Python

REAL PYTHON

Quiz: Modern Python String Formatting Tools

REAL PYTHON

Articles & Tutorials __init__.py Files Are Optional. You Should Still Use Them

If you’ve ever googled the question “Why do Python packages have empty __init__.py files?”, you could get the idea that Python packages wouldn’t work without them. This is a common misconception—they’ve been optional since Python 3.3! Why then, do most Python projects still have them?
BOVENBERG.NET • Shared by Arie Bovenberg

Build a Contact Book App With Python, Textual, and SQLite

In this tutorial, you’ll be guided step by step through the process of building a basic contact book application. You’ll use Python and Textual to build the application’s text-based user interface (TUI), and then use SQLite to manage the database.
REAL PYTHON

Save 100+ Engineering Hours With the Highest Performing GPU Clusters on the Market

FluidStack provides GPU clusters for LLM training & inference for the top AI labs including Poolside and CharacterAI. Clusters are built on the latest Nvidia GPUs (A100s, H100s, H200s, GB200s) and are deployed on fully managed Kubernetes/Slurm with 24/7 support, 15 min response time and 99% uptime →
FLUIDSTACK sponsor

PEP 777: How to Re-Invent the Wheel

“The current wheel 1.0 specification was written over a decade ago, and has been extremely robust to changes in the Python packaging ecosystem… this PEP prescribes compatibility requirements on future wheel revisions.”
PYTHON.ORG

PEP 758: Allow except and except* Expressions Without Parentheses

“This PEP proposes to allow unparenthesized except and except* blocks in Python’s exception handling syntax. Currently, when catching multiple exceptions, parentheses are required around the exception types.”
PYTHON.ORG

PEP 761: Deprecating PGP Signatures for CPython Artifacts

Since Python 3.11.0, CPython has provided two verifiable digital signatures for all CPython artifacts: PGP and Sigstore. This PEP proposes moving to Sigstore as the only way of signing artifacts.
PYTHON.ORG

In the Making of Python Fitter and Faster

This post details how Python’s recent performance improvements work under the hood. It covers changes to the interpreter, better memory management, and the newly experimental JIT compiler.
SUMER CIP

The Ultimate Guide to Error Handling in Python

This detailed post covers the variety of ways to deal with errors in your code, why you might choose between the approaches, and what all this theory actually means in the real world.
MIGUEL GRINBERG

TypedDicts Are Better Than You Think

TypedDict was introduced in PEP-589 which landed in Python 3.8. The primary use case was to create type annotations for dictionaries. This post explains why you should use them.
CHANGS.CO.UK

Narrow State of a Django Model Using Python TypeGuard

Bruno came across a problem with type checking for a Django project which led him to use TypeGuard for the first time. This post explains why.
BRUNO ALLA

If We Had $1,000,000…

Jacob ponders what the Django Software Foundation would look like if they had 4x their current budget.
JACOB KAPLAN-MOSS

Projects & Code srgn: Grep-Like Tool That Understands Code

GITHUB.COM/ALEXPOVEL

streamable: Stream-Like Manipulation of Iterables

GITHUB.COM/EBONNAL

httpdbg: Debug HTTP(S) Requests in a Python Program

GITHUB.COM/CLE-B

Secure.py: HTTP Security Headers Made Easy

GITHUB.COM/TYPEERROR • Shared by Caleb Kinney

django-admin-tui: Django Admin in the Terminal!

GITHUB.COM/VALBERG

Events Weekly Real Python Office Hours Q&A (Virtual)

October 16, 2024
REALPYTHON.COM

Python Brasil 2024

October 16 to October 21, 2024
PYTHONBRASIL.ORG.BR

PyCon Panamá 2024

October 16 to October 19, 2024
PYCON.PA

Swiss Python Summit 2024

October 17 to October 19, 2024
PYTHON-SUMMIT.CH

PyData Bristol Meetup

October 17, 2024
MEETUP.COM

PyLadies Dublin

October 17, 2024
PYLADIES.COM

PyCon APAC 2024

October 25 to October 27, 2024
PYCON.ID

PyCon Korea 2024

October 25 to October 28, 2024
PYCON.KR

PythonHo Conference 2024

October 26 to October 28, 2024
PYTHONHO.COM

Happy Pythoning!
This was PyCoder’s Weekly Issue #651.
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 ]

Categories: FLOSS Project Planets

Bounteous.com: Empower Your Marketing Team with These Exciting Drupal CMS Features

Planet Drupal - Tue, 2024-10-15 12:19
Discover how a comprehensive Measurement Strategy can optimize B2B performance by aligning metrics, improving data quality, and driving business outcomes.
Categories: FLOSS Project Planets

Ramsalt Lab: Top 10 presentations from DrupalCon Barcelona 2024

Planet Drupal - Tue, 2024-10-15 11:09
Top 10 presentations from DrupalCon Barcelona 2024 Hansa Pandit Drupal frontend developer 15.10.2024

20 employees from Ramsalt Lab had the opportunity to attend one of the most awaited Drupal events of the year, DrupalCon 2024 in the beautiful city of Barcelona.

It was a great event with inspiring sessions and hands-on workshops. Our team have made this list of the top 10 session from Barcelona:

  1. Driesnote: DrupalCon Barcelona 2024
    Our top recommendation is Driesnote, where Dries Buytaert, the founder of Drupal, presents the revolutionary Drupal CMS (being built under the Starshot Initiative). This will be a new era in Drupal with AI-enabled website building for non-developers.
  2. Drupal Recipes Initiative Update
    This session gives an update on Drupal’s Recipes initiative, and how you can contribute to it. You'll also learn about recipes that you can start using right away!
  3. Building Safer Digital Communities - The Mission of "Defend Iceland"
    In this keynote, Theódór Gislason shares his journey, ignited by a life-altering accident thirty years ago, and discusses the vision for the "Defend Iceland" hacker platform. He addresses the challenges of democratizing cybersecurity and highlights how a united community of responsible companies and ethical hackers could enhance our collective cyber resilience.
  4. Running a fleet of websites with ease via LocalGov Drupal Microsites Platform
    Learn how to create and manage a fleet of websites, all hosted within a single Drupal installation, the "LocalGov Drupal Microsites" module.
  5. Implementing AI solutions for the French government
    This session gives you an insight into how an Artificial Intelligence system can be integrated into a Drupal website and, more broadly, into any digital experience platform.
  6. Drupal LMS: A new, modern, easy-to-use Learning Management System
    Explore the structure of a Learning Management System (LMS), the ongoing work on the project, key structural differences from Opigno and ANU, and opportunities for contributing to its development.
  7. Drupal AI: Once again leading the way with the new golden era of the web - The AI Module and Starshot
    Watch this session to discover how AI is transforming Drupal site building in Starshot and how to utilize the Drupal AI module to create advanced web applications.
  8. Everything you need to know about cookies but are afraid to ask!
    This beginner-level session will help you learn about cookies, their purpose, and emerging alternatives. You will also explore how to optimize user experience, insights, and marketing strategies while maintaining privacy and compliance.
  9. Practical exploitation of Drupal security vulnerabilities
    This session aims to understand the importance of addressing web application vulnerabilities, moving beyond the typical "alert" XSS pop-up scenario. It also covers various approaches for detecting, mitigating, and preventing these vulnerabilities to ensure stronger overall security.
  10. Supply Chain Security in Drupal and Composer
    This session provides a foundational understanding of supply chain security, with a deeper focus on Composer's features and their impact on it. Learn best practices for securing Drupal sites from supply chain attacks and explore how the Drupal Association is developing solutions to safeguard the entire community.

The Ramsalt team at our favorite tapas restaurant.

We hope you enjoy these sessions as much as we did! You can find all of the sessions from DrupalCon Barcelona 2024 on the official YouTube channel of the Drupal Association.

Categories: FLOSS Project Planets

Four Kitchens: From custom to contrib: Rebuilding our Localist module to import event data into Drupal

Planet Drupal - Tue, 2024-10-15 10:38

Marc Berger

Senior Backend Engineer

Always looking for a challenge, Marc tries to add something new to his toolbox for every project and build — be it a new CSS technology, creating custom APIs, or testing out new processes for development.

January 1, 1970

For higher ed institutions and nonprofits, Localist is a powerful resource that provides a valuable means of centralizing your organization’s events into a single branded calendar. However, integrating that event data into a Drupal website in a seamless way can pose a significant challenge.

At Four Kitchens, we recently completed a custom module for a client that can regularly import events from Localist into their higher ed site. After finishing the project, it dawned on us that the Drupal community could benefit from our work. In keeping with our commitment to sharing knowledge with our community, we rebuilt it as a contrib module, so it’s available for your organization, too.

During this rebuild, there were several lessons that we thought were valuable to share to aid other developers who also build custom modules.

Setting functional goals

Before we get into the challenges and lessons we learned, let’s talk about what this module does and how it can help your organization import event data from Localist.

The Localist platform offers an API, but it requires time and development resources to create a custom Drupal module that satisfies your organization’s data requirements. This module simplifies the work needed to import event data from Localist into Drupal by using Drupal’s plugin architecture. Fundamentally, this module uses Drupal’s migration APIs to handle all of the heavy lifting. However, we needed to add custom plugins and functions to handle the Localist API specifically.

Additionally, migrations in Drupal are usually a one-time import — for example, migrating data from an older Drupal 7 site to a newer Drupal 11 site. With event data, importing needs to happen regularly, so this module is designed to import data roughly every hour.

Finally, we decided to build a UI, include optional installable examples (using Drupal’s new Recipes initiative!), and include a code generator that guides a developer to quickly get started building their own event migrations required to import the data.

The information imported from Localist is then stored in fields on a Drupal content type to display however you’d like. If your organization already uses Localist to manage events, you can now display that information in a consistent way on your own website.

Shifting a custom solution to a community contribution

Transforming a client-specific module into a contrib module for the wider Drupal community required extra work, but those efforts are true to our values of sharing knowledge and enabling others to benefit from our research.

Remember the last time you went searching for a module to perform a specific functionality, found it, and installed it? Not only did that experience save you development time, but it also showed the power of the open source community.

Shared modules provide ready-made solutions to common challenges, allowing developers to focus on innovation rather than reinventing the wheel.

Challenges and lessons in developing a community-ready module

When building a custom module, you develop with many assumptions in place because the config and code are already in place for a known environment. When building for the community, you have to consider a multitude of scenarios and edge cases. You have to factor in how the module may be used, how it may interact with other modules, and other unknowns.

Additionally, sometimes there can be some very client-specific requirements that don’t make sense for a contributed module. For the client we originally built this for, we built in special functions to handle the formatting and styling of the event dates. To translate this module into a contrib module, that functionality had to be removed, as we can’t make those same assumptions for everyone. We just want to ensure the baseline functionality is in place so your team can then build off that foundation — ultimately saving you time.

Of course, these modifications work both ways. Your organization may need this type of contrib module, but perhaps its functionality doesn’t align with your website’s requirements. Four Kitchens can work with your organization to tailor the module to your needs. Just let us know how we can help.

Localist contrib module Translating a custom module for broader use

Rebuilding this custom module to a contrib version required extra time, planning, and testing to suit the broader Drupal community’s needs. It ultimately helped us learn that in the future, we may want to flip the script and try to develop a contrib module first, and then override in our own code to customize per client. In this way, the base functionality is available to all.

If you are a developer who creates custom modules, think about the goals of your module and ask yourself if your idea would also benefit the community as a whole. Building a contrib module from the get-go may be far more efficient than taking a custom module and turning it into a contrib module later.

Below, we’ll share some examples of a few changes we made as part of the rebuild of the Localist module and the reasoning behind the change. We hope this helps other developers think outside the box and determine if a contrib module may be a better idea as a starting place.

FunctionalityClient projectContrib modulePreflight and prerequisite checksDid not exist. We assumed all of the config, fields, and taxonomies were in place.We incorporated additional functions to verify that the right connections are in place and that config was correctly set up and working. A green check displays before the user proceeds with any data imports from the Localist database. This is important to make the module future-proof.User interface changesThe settings form only had one field for the API URL and one field for the group. All of the other settings were hard-coded in the codebase, which made things simple to configure for the client, but inflexible for the community.The module now features a visual status area displaying preflight checks. Below, additional fields allow the user to supply custom migrations. The settings page also includes the ability to create an example migration.Structural changesThe location of the settings form was in a custom area, and permissions were integrated with client-specific permissions.The settings form was moved to a standard Drupal location with module-specific permissions added. Additionally, a more robust Drupal service was created to allow some methods to be used outside of this module if needed.Migration examplesNoneSince Drupal migrations can be difficult to understand, we provide an optional installable example to show how the module works to help a developer get started.DocumentationMinimal. The original custom module included just enough to learn about the custom plugins and how to extend the existing built-in migrations.Extensive. Documentation describes in detail how to override and create new migrations, usage of the custom plugins, installation, and troubleshooting.Default configurationAlready in place as part of a client project, so the module assumes the config was there.This module not only gives the default settings when it is installed for some needed processes, but also lets you add more settings for the examples. All of these settings must be different and not conflict with an existing environment.Custom client-only functionalityA lot of custom code was written to support specific use cases for the client’s website.Some of this custom code was removed for the contrib version of this module. Some details, such as formatting dates, satisfy very specific use cases, and generally it is best not to make any assumptions when developing for the community. The value of contributing to the Drupal community

Contributing to the Drupal ecosystem through contributed modules benefits the entire Drupal community. By making our work available to others, we collectively elevate the capabilities of the platform and empower developers worldwide.

While this specific rebuild required a bit of extra time, it fosters a culture of knowledge exchange and mutual support. Each contribution, no matter how small, adds to the platform’s versatility and appeal.\We hope that by sharing our experience of moving a module from custom to contrib, we empower other developers to consider building contrib first to give back to the community, collaborate with others on additional features, build more robust and better documented modules, and hopefully save a little time in the end.

The post From custom to contrib: Rebuilding our Localist module to import event data into Drupal appeared first on Four Kitchens.

Categories: FLOSS Project Planets

Real Python: Using Type Hints for Multiple Return Types in Python

Planet Python - Tue, 2024-10-15 10:00

In Python, type hinting is an optional yet useful feature for making your code easier to read, reason about, and debug. With type hints, you let other developers know the expected data types for variables, function arguments, and return values. As you write code for applications that require greater flexibility, you may need to specify multiple return types to make your code more robust and adaptable to different situations.

You’ll encounter different use cases where you may want to annotate multiple return types within a single function in Python. In other words, the data returned can vary in type. In this video course, you’ll walk through examples of how to specify multiple return types for a function that parses a string from an email address to grab the domain name.

In addition, you’ll see examples of how to specify type hints for callback functions or functions that take another function as input. With these examples, you’ll be ready to express type hints in functional programming.

[ 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 ]

Categories: FLOSS Project Planets

Real Python: Quiz: Getting Started With Async Features in Python

Planet Python - Tue, 2024-10-15 08:00

In this quiz, you’ll test your understanding of Asynchronous Programming in Python.

By working through this quiz, you’ll revisit the concepts of synchronous and asynchronous programs, why you might want to write an asynchronous program, and how to use Python async features.

[ 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 ]

Categories: FLOSS Project Planets

Jonathan Dowland: Arturia Microfreak

Planet Debian - Tue, 2024-10-15 06:49

Arturia Microfreak. © CC-BY-SA 4

I nearly did, but ultimately I didn't buy an Arturia Microfreak.

The Microfreak is a small form factor hybrid synth with a distinctive style. It's priced at the low end of the market and it is overflowing with features. It has a weird 2-octave keyboard which is a stylophone-style capacitive strip rather than weighted keys. It seems to have plenty of controls, but given the amount of features it has, much of that functionality is inevitably buried in menus. The important stuff is front and centre, though. The digital oscillators are routed through an analog filter. The Microfreak gained sampler functionality in a firmware update that surprised and delighted its owners.

I watched a load of videos about the Microfreak, but the above review from musician Stimming stuck in my mind because it made a comparison between the Microfreak and Teenage Engineering's OP-1.

The Teenage Engineering OP-1.

I'd been lusting after the OP-1 since it appeared in 2011: a pocket-sized1 music making machine with eleven synthesis engines, a sampler, and less conventional features such as an FM radio, a large colour OLED display, and a four track recorder. That last feature in particular was really appealing to me: I loved the idea of having an all-in-one machine to try and compose music. Even then, I was not keen on involving conventional computers in music making.

Of course in many ways it is a very compromised machine. I never did buy a OP-1, and by now they've replaced it with a new model (the OP-1 field) that costs 50% more (but doesn't seem to do 50% more) I'm still not buying one.

Framing the Microfreak in terms of the OP-1 made the penny drop for me. The Microfreak doesn't have the four-track functionality, but almost no synth has: I'm going to have to look at something external to provide that. But it might capture a similar sense of fun; it's something I could use on the sofa, in the spare room, on the train, during lunchbreaks at work, etc.

On the other hand, I don't want to make the same mistake as with the Micron: too much functionality requiring some experience to understand what you want so you can go and find it in the menus. I also didn't get a chance to audition the unusual keyboard: there's only one music store carrying synths left in Newcastle and they didn't have one.

So I didn't buy the Microfreak. Maybe one day in the future once I'm further down the road. Instead, I started to concentrate my search on more fundamental, back-to-basics instruments…

  1. Big pockets, mind
Categories: FLOSS Project Planets

Droptica: How to Create Charts in Drupal with the Charts and Charts Twig Modules?

Planet Drupal - Tue, 2024-10-15 06:43

In this blog post, I'll share how you can easily and quickly create charts in Drupal using Twig's Charts and Charts modules. This guide will be especially useful for publishers, but also for anyone who would like to have a similar feature in their CMS. I invite you to read the article or watch an episode of the Nowoczesny Drupal series (the video is in Polish), where each activity is shown step-by-step. 

Categories: FLOSS Project Planets

Nicola Iarocci: Eve 2.2.0

Planet Python - Tue, 2024-10-15 03:37

Today I released Eve 2.2. It is a maintenance release that drops old Pythons and adds support for the latest versions of the language. Long overdue, it also gets rid of some annoying deprecation warnings. As always, see the changelog for details. Many thanks to Bret Curtis and Guillaume Le Pape for their contributions to this release.

Categories: FLOSS Project Planets

Lukas Märdian: Waiting for a Linux system to be online

Planet Debian - Tue, 2024-10-15 03:33
Designed by Freepik What is an “online” system?

Networking is a complex topic, and there is lots of confusion around the definition of an “online” system. Sometimes the boot process gets delayed up to two minutes, because the system still waits for one or more network interfaces to be ready. Systemd provides the network-online.target that other service units can rely on, if they are deemed to require network connectivity. But what does “online” actually mean in this context, is a link-local IP address enough, do we need a routable gateway and how about DNS name resolution?

The requirements for an “online” network interface depend very much on the services using an interface. For some services it might be good enough to reach their local network segment (e.g. to announce Zeroconf services), while others need to reach domain names (e.g. to mount a NFS share) or reach the global internet to run a web server. On the other hand, the implementation of network-online.target varies, depending on which networking daemon is in use, e.g. systemd-networkd-wait-online.service or NetworkManager-wait-online.service. For Ubuntu, we created a specification that describes what we as a distro expect an “online” system to be. Having a definition in place, we are able to tackle the network-online-ordering issues that got reported over the years and can work out solutions to avoid delayed boot times on Ubuntu systems.

In essence, we want systems to reach the following networking state to be considered online:

  1. Do not wait for “optional” interfaces to receive network configuration
  2. Have IPv6 and/or IPv4 “link-local” addresses on every network interface
  3. Have at least one interface with a globally routable connection
  4. Have functional domain name resolution on any routable interface
A common implementation

NetworkManager and systemd-networkd are two very common networking daemons used on modern Linux systems. But they originate from different contexts and therefore show different behaviours in certain scenarios, such as wait-online. Luckily, on Ubuntu we already have Netplan as a unification layer on top of those networking daemons, that allows for common network configuration, and can also be used to tweak the wait-online logic.

With the recent release of Netplan v1.1 we introduced initial functionality to tweak the behaviour of the systemd-networkd-wait-online.service, as used on Ubuntu Server systems. When Netplan is used to drive the systemd-networkd backend, it will emit an override configuration file in /run/systemd/system/systemd-networkd-wait-online.service.d/10-netplan.conf, listing the specific non-optional interfaces that should receive link-local IP configuration. In parallel to that, it defines a list of network interfaces that Netplan detected to be potential global connections, and waits for any of those interfaces to reach a globally routable state.

Such override config file might look like this:

[Unit]
ConditionPathIsSymbolicLink=/run/systemd/generator/network-online.target.wants/systemd-networkd-wait-online.service

[Service]
ExecStart=
ExecStart=/lib/systemd/systemd-networkd-wait-online -i eth99.43:carrier -i lo:carrier -i eth99.42:carrier -i eth99.44:degraded -i bond0:degraded
ExecStart=/lib/systemd/systemd-networkd-wait-online --any -o routable -i eth99.43 -i eth99.45 -i bond0

In addition to the new features implemented in Netplan, we reached out to upstream systemd, proposing an enhancement to the systemd-networkd-wait-online service, integrating it with systemd-resolved to check for the availability of DNS name resolution. Once this is implemented upstream, we’re able to fully control the systemd-networkd backend on Ubuntu Server systems, to behave consistently and according to the definition of an “online” system that was lined out above.

Future work

The story doesn’t end there, because Ubuntu Desktop systems are using NetworkManager as their networking backend. This daemon provides its very own nm-online utility, utilized by the NetworkManager-wait-online systemd service. It implements a much higher-level approach, looking at the networking daemon in general instead of the individual network interfaces. By default, it considers a system to be online once every “autoconnect” profile got activated (or failed to activate), meaning that either a IPv4 or IPv6 address got assigned.

There are considerable enhancements to be implemented to this tool, for it to be controllable in a fine-granular way similar to systemd-networkd-wait-online, so that it can be instructed to wait for specific networking states on selected interfaces.

A note of caution

Making a service depend on network-online.target is considered an antipattern in most cases. This is because networking on Linux systems is very dynamic and the systemd target can only ever reflect the networking state at a single point in time. It cannot guarantee this state to be remained over the uptime of your system and has the potentially to delay the boot process considerably. Cables can be unplugged, wireless connectivity can drop, or remote routers can go down at any time, affecting the connectivity state of your local system. Therefore, “instead of wondering what to do about network.target, please just fix your program to be friendly to dynamically changing network configuration.” [source].

Categories: FLOSS Project Planets

Iustin Pop: Optical media lifetime - one data point

Planet Debian - Tue, 2024-10-15 01:00

Way back (more than 10 years ago) when I was doing DVD-based backups, I knew that normal DVDs/Blu-Rays are no long-term archival solutions, and that if I was real about doing optical media backups, I need to switch to M-Disc. I actually bought a (small stack) of M-Disc Blu-Rays, but never used them.

I then switched to other backups solutions, and forgot about the whole topic. Until, this week, while sorting stuff, I happened upon a set of DVD backups from a range of years, and was very curious whether they are still readable after many years.

And, to my surprise, there were no surprises! Went backward in time, and:

  • 2014, TDK DVD+R, fully readable
  • 2012, JVC DVD+R and TDK DVD+R, fully readable
  • 2010, Verbatim DVD+R, fully readable
  • 2009/2008/2007, Verbatim DVD+R, 4 DVDs, fully readable

I also found stack of dual-layer DVD+R from 2012-2014, some for sure Verbatim, and some unmarked (they were intended to be printed on), but likely Verbatim as well. All worked just fine. Just that, even at ~8GiB per disk, backing up raw photo files took way too many disks, even in 2014 😅.

At this point I was happy that all 12+ DVDs I found, ranging from 10 to 14 years, are all good. Then I found a batch of 3 CDs! Here the results were mixed:

  • 2003: two TDK “CD-R80”, “Mettalic”, 700MB: fully readable, after 21 years!
  • unknown year, likely around 1999-2003, but no later, “Creation” CD-R, 700MB: read errors to the extent I can’t even read the disk signature (isoinfo -d).

I think the takeaway is that for all explicitly selected media - TDK, JVC and Verbatim - they hold for 10-20 years. Valid reads from summer 2003 is mind boggling for me, for (IIRC) organic media - not sure about the “TDK metallic” substrate. And when you just pick whatever (“Creation”), well, the results are mixed.

Note that in all this, it was about CDs and DVDs. I have no idea how Blu-Rays behave, since I don’t think I ever wrote a Blu-Ray. In any case, surprising to me, and makes me rethink a bit my backup options. Sizes from 25 to 100GB Blu-Rays are reasonable for most critical data. And they’re WORM, as opposed to most LTO media, which is re-writable (and to some small extent, prone to accidental wiping).

Now, I should check those M-Disks to see if they can still be written to, after 10 years 😀

Categories: FLOSS Project Planets

KDE Plasma 6.2.1, Bugfix Release for October

Planet KDE - Mon, 2024-10-14 20:00

Tuesday, 15 October 2024. Today KDE releases a bugfix update to KDE Plasma 6, versioned 6.2.1.

Plasma 6.2 was released in October 2024 with many feature refinements and new modules to complete the desktop experience.

This release adds a week's worth of new translations and fixes from KDE's contributors. The bugfixes are typically small but important and include:

  • Discover Snap: Don't crash when a null channel is returned. Commit. Fixes bug #492657
  • Kcms/wallpaper: fix crash when wallpaper config has invalid values. Commit.
  • Spacebar: Fixup SMS sending. Commit.
View full changelog
Categories: FLOSS Project Planets

Python⇒Speed: Should you use uv's managed Python in production?

Planet Python - Mon, 2024-10-14 20:00

The uv Python packaging tool provides fast replacements for tools like pip, and a variety of developer experience improvements. Unlike most Python packaging tools, uv doesn’t require Python to be installed to use it. Building on that ease of installation, one of its interesting and useful features is the ability to install Python for you.

As a developer, this is great: if you need a version of Python you don’t have installed, uv can install it for you (transparently, by default!). Imagine for some reason you need the long-defunct Python 3.7. You can easily install it like so:

$ python3.7 python3.7: command not found $ uv run --python=3.7 python ... uv downloaded 3.7 for me ... Python 3.7.9 (default, Aug 23 2020, 00:57:53) [Clang 10.0.1 ] on linux Type "help", "copyright", "credits" or "license" for more information. >>>

The next time you use uv to run Python 3.7 it will use the cached download.

The ability to install Python with uv adds interesting possibilities for production packaging. For example, you can use an Ubuntu 24.04 base Docker image, download uv, and rely on uv to trivially install any Python version. Which is to say, you won’t be limited to the versions Ubuntu packages for you.

But do you want to use this particular version of Python in production? In this article we’ll look into the implications of using uv’s Python, and in particular:

  • Where this version of Python comes from.
  • Portability and compatibility: Can you use this Python on various versions of Linux? Will it run your software correctly?
  • Performance: Are you losing speed by using this version?
  • Security: Will you get security updates if you use this approach?
Read more...
Categories: FLOSS Project Planets

Dirk Eddelbuettel: RcppDate 0.0.4: New Upstream Minor

Planet Debian - Mon, 2024-10-14 17:44

RcppDate wraps the featureful date library written by Howard Hinnant for use with R. This header-only modern C++ library has been in pretty wide-spread use for a while now, and adds to C++11/C++14/C++17 what will be (with minor modifications) the ‘date’ library in C++20.

This release, the first in 3 1/2 years, syncs the code with the recent date 3.0.2 release from a few days ago. It also updates a few packaging details such as URLs, badges or continuous integration.

Changes in version 0.0.4 (2024-10-14)
  • Updated to upstream version 3.0.2 (and adjusting one pragma)

  • Several small updates to overall packaging and testing

Courtesy of my CRANberries, there is also a diffstat report for the most recent release. More information is available at the repository or the package page.

If you like this or other open-source work I do, you can sponsor me at GitHub.

This post by Dirk Eddelbuettel originated on his Thinking inside the box blog. Please report excessive re-aggregation in third-party for-profit settings.

Categories: FLOSS Project Planets

Scarlett Gately Moore: Kubuntu 24.10 Released, KDE Snaps at 24.08.2, and I lived to tell you about it!

Planet Debian - Mon, 2024-10-14 16:58
Happy 28th Birthday KDE!

Sorry my blog updates have been MIA. Let me tell you a story…

As some of you know, 3 months ago I was in a no fault car accident. Thankfully, the only injury was I ended up with a broken arm. ER sends me home in a sling and tells me it was a clean break and it will mend itself in no time. After a week of excruciating pain I went to my follow up doctor appointment, and with my x-rays in hand, the doc tells me it was far from a clean break and needs surgery. So after a week of my shattered bone scraping my nerves and causing pain I have never felt before, I finally go in for surgery! They put in a metal plate with screws to hold the bone in place so it can properly heal. The nerve pain was gone, so I thought I was on the mend. Some time goes by and the swelling still has not subsided, the doctors are not as concerned about this as I am, so I carry on until it becomes really inflamed and developed fever blisters. After no success in reaching the doctors office my husband borrows the neighbors car and rushes me to the ER. Good thing too, I had an infection. So after a 5 day stay in the hospital, they sent us home loaded with antibiotics and trained my husband in wound packing. We did everything right, kept the place immaculate, followed orders with the wound care, took my antibiotics, yet when they ran out there was still no sign of relief, or healing. Went to doctors and they gave me another month supply of antibiotics. Two days after my final dose my arm becomes inflamed again and with extra spectacular levels of pain to go with it. I call the doctor office… They said to come in on my appointment day ( 4 days away ). I asked, “You aren’t concerned with this inflammation?”, to which they replied, “No.”. Ok, maybe I am over reacting and it’s all in my head, I can power through 4 more days. The following morning my husband observed fever blisters and the wound site was clearly not right, so once again off we go to the ER. Well… thankfully we did. I was in Sepsis and could have died… After deliberating with the doctor on the course of action for treatment, the doctor accepted our plea to remove the plate, rather than tighten screws and have me drive 100 miles to hospital everyday for iv antibiotics (Umm I don’t have a car!?) So after another 4 day stay I am released into the world, alive and well. I am happy to report, the swelling is almost gone, the pain is minimal, and I am finally healing nicely. I am still in a sling and I have to be super careful and my arm was not fully knitted. So with that I am bummed to say, no traveling for me, no Ubuntu Summit

I still need help with that car, if it weren’t for our neighbor, this story would have ended much differently.

https://gofund.me/00942f47

Despite my tragic few months for my right arm, my left arm has been quite busy. Thankfully I am a lefty! On to my work progress report.

Kubuntu:

Kubuntu 24.10 Oracular Oriole Released With Plasma 6! A big thank you to the Debian KDE/QT team and Rik Mills, could not have done it without you!

KDE Snaps:

All release service snaps are done! Save a few problematic ones still WIP.. I have released 24.08.2 which you can find here:

https://snapcraft.io/publisher/kde

I completed the qt6 and KDE frameworks 6 content packs for core24

Snapcraft:

I have a PR in for kde-neon-6 extension core24 support.

That’s all for now. Thanks for stopping by!

Categories: FLOSS Project Planets

Kubuntu 24.10 Released, KDE Snaps at 24.08.2, and I lived to tell you about it!

Planet KDE - Mon, 2024-10-14 16:58
Happy 28th Birthday KDE!

Sorry my blog updates have been MIA. Let me tell you a story…

As some of you know, 3 months ago I was in a no fault car accident. Thankfully, the only injury was I ended up with a broken arm. ER sends me home in a sling and tells me it was a clean break and it will mend itself in no time. After a week of excruciating pain I went to my follow up doctor appointment, and with my x-rays in hand, the doc tells me it was far from a clean break and needs surgery. So after a week of my shattered bone scraping my nerves and causing pain I have never felt before, I finally go in for surgery! They put in a metal plate with screws to hold the bone in place so it can properly heal. The nerve pain was gone, so I thought I was on the mend. Some time goes by and the swelling still has not subsided, the doctors are not as concerned about this as I am, so I carry on until it becomes really inflamed and developed fever blisters. After no success in reaching the doctors office my husband borrows the neighbors car and rushes me to the ER. Good thing too, I had an infection. So after a 5 day stay in the hospital, they sent us home loaded with antibiotics and trained my husband in wound packing. We did everything right, kept the place immaculate, followed orders with the wound care, took my antibiotics, yet when they ran out there was still no sign of relief, or healing. Went to doctors and they gave me another month supply of antibiotics. Two days after my final dose my arm becomes inflamed again and with extra spectacular levels of pain to go with it. I call the doctor office… They said to come in on my appointment day ( 4 days away ). I asked, “You aren’t concerned with this inflammation?”, to which they replied, “No.”. Ok, maybe I am over reacting and it’s all in my head, I can power through 4 more days. The following morning my husband observed fever blisters and the wound site was clearly not right, so once again off we go to the ER. Well… thankfully we did. I was in Sepsis and could have died… After deliberating with the doctor on the course of action for treatment, the doctor accepted our plea to remove the plate, rather than tighten screws and have me drive 100 miles to hospital everyday for iv antibiotics (Umm I don’t have a car!?) So after another 4 day stay I am released into the world, alive and well. I am happy to report, the swelling is almost gone, the pain is minimal, and I am finally healing nicely. I am still in a sling and I have to be super careful and my arm was not fully knitted. So with that I am bummed to say, no traveling for me, no Ubuntu Summit

I still need help with that car, if it weren’t for our neighbor, this story would have ended much differently.

https://gofund.me/00942f47

Despite my tragic few months for my right arm, my left arm has been quite busy. Thankfully I am a lefty! On to my work progress report.

Kubuntu:

Kubuntu 24.10 Oracular Oriole Released With Plasma 6! A big thank you to the Debian KDE/QT team and Rik Mills, could not have done it without you!

KDE Snaps:

All release service snaps are done! Save a few problematic ones still WIP.. I have released 24.08.2 which you can find here:

https://snapcraft.io/publisher/kde

I completed the qt6 and KDE frameworks 6 content packs for core24

Snapcraft:

I have a PR in for kde-neon-6 extension core24 support.

That’s all for now. Thanks for stopping by!

Categories: FLOSS Project Planets

Talking Drupal: Talking Drupal #471 - Off The Cuff #9

Planet Drupal - Mon, 2024-10-14 14:00

Today we are talking about Freemium Drupal Modules, The WordPress hub-bub, and Drupal, Now with AI with our hosts. We’ll also cover FullCalendar as our module of the week.

For show notes visit: https://www.talkingDrupal.com/471

Topics
  • Freemium Drupal
  • Wordpress controversy
  • Drupal CMS and AI
Resources Guests Hosts

Nic Laflin - nLighteneddevelopment.com nicxvan John Picozzi - epam.com johnpicozzi Aubrey Sambor - star-shaped.org starshaped Martin Anderson-Clutz - mandclu.com mandclu

MOTW Correspondent

Martin Anderson-Clutz - mandclu.com mandclu

  • Brief description:
    • Have you ever wanted an interactive calendar to display your Drupal events with drag-and-drop rescheduling, and without using jQuery? There’s a module for that.
  • Module name/project name:
  • Brief history
    • How old: created in Sep 2010 by ablondeau, though I’ve been behind the most recent releases
    • Versions available: 7.x-2.0 and 3.0.0-beta2 versions available, the latter of which supports Drupal 10 and 11
  • Maintainership
    • Actively maintained, latest release was this morning
    • Security coverage, though technically the 3.0.x branch will have it once it’s stable
    • Test coverage, minimal but on the roadmap
    • Documentation - does have a user guide, but created for the D7 version, so newer documentation is needed
    • Number of open issues: 337 open issues, none of which are bugs against the 3.0.x branch
  • Usage stats:
    • 3,388 sites, though the vast majority of those are for the D7 version, since the 3.0.x branch is very new
  • Module features and usage
    • No jQuery!
    • Lots of configurability plus some extras specifically for Drupal
      • Drag-and-drop to alter events
      • Option to require confirmation
      • Can display toast-style notifications when updates are save
      • Double-click on a day or time to create an event at that time
      • Can display events from different content types, even if they use different fields to store dates, and yes, even different kinds of fields, so a mixture of core and Smart Date fields will work
      • You can set default colors and output type (block or the newer, list-item display), and the ability to override color based on content type or a taxonomy reference
    • This module had been essentially dormant for over 4 years, but I decided to work with Jürgen Haas on reviving it after a similar and popular project called Fullcalendar View was not only marked as “Minimally maintained” and “Maintenance fixes only”, but the project page directed users to contact the maintainer to pay for a premium version, in order to use the current version of the Fullcalendar JS library, or to load events via AJAX, which as been an often-requested feature because Fullcalendar View has had common reports of performance problems on sites with lots of event data.
    • Worse, the maintainer has closed as “won’t fix” issues that had community-provided patches, because he only wanted to provide said improvements in the paid, premium version
    • In my work on the Events recipe for Drupal CMS, I knew that having a solid calendar would be important, and I didn’t feel good about relying on a module that seemed to be pushing users more and more towards a paid model. I’m grateful to Jurgen and everyone who worked on FullCalendar before us for creating such a robust and extensible code base
Categories: FLOSS Project Planets

Drupal Association blog: Navigating Unsupported Drupal 7 Modules: How HeroDevs is Supporting Extended Maintenance

Planet Drupal - Mon, 2024-10-14 11:26

The Drupal Association has published this guest blog on behalf of HeroDevs.

The official end-of-life (EOL) date for Drupal 7 is January 5, 2025. However, as outlined in the PSA issued on June 7, 2023, the Drupal Security Team announced a change in their support strategy that would take effect before the official EOL date. Starting August 1, 2023, they implemented a reduced support structure for moderately critical Drupal 7 issues.

Why the Reduced Support Structure Matters

When a Drupal 7 module is marked as unsupported, it means that no further updates or security patches will be provided. This situation can leave your site vulnerable to potential security risks and negatively impact performance. As highlighted in the PSA, the Drupal Security Team follows a structured process: they first notify maintainers and provide them with a two-week window to respond and address the issue. If maintainers do not act within this timeframe, the module may be marked as unsupported, and support will cease altogether. This can create significant challenges, particularly for sites reliant on these modules. 

HeroDevs’ Proactive and Comprehensive Approach  

At HeroDevs, we understand the urgency of this issue. We’ve proactively stepped in to bridge the gap by forking and maintaining modules that are no longer supported by their original maintainers, with Drupal 7 Never-Ending Support. Our approach means that even as official support dwindles, your modules continue to receive the necessary updates and fixes. By taking over security maintenance, we help keep your site secure and operational, allowing you to focus on what matters most without worrying about vulnerabilities or disruptions.

Forking and Maintaining Unsupported Modules: HeroDevs has already begun forking and maintaining modules that have been dropped by their original maintainers in the last year. This approach makes sure that essential functionality remains intact and that any emerging security vulnerabilities are promptly addressed. By doing so, we help maintain the security and integrity of your site even as support from the Drupal community wanes.

Guidance for Custom and Legacy Modules: While custom modules and unique code are not covered under the standard SLA, HeroDevs provides guidance and support to help you integrate and maintain these solutions. We collaborate with you to ensure that your custom developments are compatible and functional with our Drupal 7 NES offering.

Maintaining Compatibility and Functionality: Beyond just security patches, HeroDevs works to test the compatibility of your modules with the evolving web landscape. We address compatibility issues and provide a seamless experience for developers working with legacy systems. This comprehensive support approach helps you avoid disruptions and maintain smooth operations.

Conclusion

As the Drupal 7 ecosystem transitions into its extended support phase, HeroDevs is committed to delivering robust and proactive support for unsupported modules. Our dedication to maintaining security, functionality, and compatibility means you can rely on us to safeguard your Drupal 7 site and navigate the end-of-life transition with confidence. With HeroDevs by your side, you can focus on planning your migration or upgrades while we handle the challenges of unsupported modules. Contact us to learn more about Drupal 7 NES.

Categories: FLOSS Project Planets

Real Python: Syntactic Sugar: Why Python Is Sweet and Pythonic

Planet Python - Mon, 2024-10-14 10:00

Python has several pieces of syntax that are syntactic sugar. This sugar is syntax that isn’t strictly necessary but gives Python some of its flavor as a readable, beginner-friendly, and powerful language. In this tutorial, you’ll explore some of Python’s most used pieces of syntactic sugar.

In practice, you already use most of these pieces of syntax, as they include many well-known Pythonic constructs. As you read on, you’ll see how Python works under the hood and learn how to use the language efficiently and securely.

In this tutorial, you’ll learn:

  • What syntactic sugar is
  • How syntactic sugar applies to operators
  • How assignment expressions are syntactic sugar
  • How for loops and comprehensions are syntactic sugar
  • How other Python constructs are also syntactic sugar

To get the most out of this tutorial, you should be familiar with the basics of Python, including operators, expressions, loops, decorators, classes, context managers, and more.

Get Your Code: Click here to download the free sample code that shows you how to use syntactic sugar in Python.

Take the Quiz: Test your knowledge with our interactive “Syntactic Sugar: Why Python Is Sweet and Pythonic” quiz. You’ll receive a score upon completion to help you track your learning progress:

Interactive Quiz

Syntactic Sugar: Why Python Is Sweet and Pythonic

You can take this quiz to test your understanding of Python's most common pieces of syntactic sugar and how they make your code more Pythonic and readable.

Syntactic Sugar

In programming, syntactic sugar refers to pieces of syntax that simplify the code and make it more readable or concise. Syntactic sugar lets you express things in a clearer and more readable way.

It makes the language sweeter for human use: things can be expressed more clearly, more concisely, or in an alternative style that some may prefer. (Source)

However, syntactic sugar is something that you may not need in practice because you can get the same result using a different, and often more involved, construct.

Note: This tutorial is slightly inspired by Brett Cannon’s series of posts about unraveling syntactic sugar in Python. In that series, Brett goes deep into each piece of syntactic sugar. You can check out the series if you’d like a detailed discussion of the syntax constructs covered in this tutorial and others.

Python has many pieces of syntactic sugar that you’ll regularly use in your code. These syntax constructs make Python more readable, quicker to write, and user-friendly. Understanding these syntactic sugar pieces and their significance will help you better understand the inner workings of Python.

In rare situations, you’ll find that desugared versions of a given piece of syntactic sugar can better fulfill your needs. So, knowing about the alternative code to a given sugar can be a good skill to have.

Operators in Python

As with most programming languages, Python makes extensive use of operators. You’ll find several categories of operators, including arithmetic, assignment, augmented assignment, comparison, Boolean, and membership operators. All these operators are part of Python’s syntactic sugar constructs because they let you write expressions in a quick and readable way.

Note: To dive deeper into Python operators, check out the Operators and Expressions in Python tutorial.

For example, arithmetic operators allow you to create math expressions that are quick to write and read because they look pretty similar to what you learned in math class:

Python >>> 5 + 7 12 >>> 10 - 4 6 >>> 2 * 4 8 >>> 20 / 2 10 Copied!

In the first example, you use the plus operator (+) to add two numbers. In the second example, you use the subtraction operator (-) to subtract two numbers. The final two examples perform multiplication and division.

Python supports its arithmetic operators through special methods. Here’s a quick summary:

Operator Operation Method + Addition .__add__() - Subtraction .__sub__() * Multiplication .__mul__() / Division .__truediv__() // Integer division .__floordiv__() ** Exponentiation .__pow__()

What does it mean to say Python supports its operators through special methods? It means that every time you use an operator, Python calls the corresponding special method under the hood.

Note: To learn more about special methods, also known as magic or dunder methods, check out Python’s Magic Methods: Leverage Their Power in Your Classes.

To illustrate, here’s how you can express the arithmetic operations you wrote earlier using the appropriate special methods:

Read the full article at https://realpython.com/syntactic-sugar-python/ »

[ 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 ]

Categories: FLOSS Project Planets

Pages