Feeds

FSF Events: Free Software Directory meeting on IRC: Friday, August 9, starting at 12:00 EDT (16:00 UTC)

GNU Planet! - Tue, 2024-08-06 09:51
Join the FSF and friends on Friday, August 9 from 12:00 to 15:00 EDT (16:00 to 19:00 UTC) to help improve the Free Software Directory.
Categories: FLOSS Project Planets

Django Weblog: Django security releases issued: 5.0.8 and 4.2.15

Planet Python - Tue, 2024-08-06 09:39

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

CVE-2024-41989: Memory exhaustion in django.utils.numberformat.floatformat()

The floatformat template filter is subject to significant memory consumption when given a string representation of a number in scientific notation with a large exponent.

Thanks to Elias Myllymäki for the report.

This issue has severity "moderate" according to the Django security policy.

CVE-2024-41990: Potential denial-of-service in django.utils.html.urlize()

The urlize() and urlizetrunc() template filters are subject to a potential denial-of-service attack via very large inputs with a specific sequence of characters.

Thanks to MProgrammer for the report.

This issue has severity "moderate" according to the Django security policy.

CVE-2024-41991: Potential denial-of-service vulnerability in django.utils.html.urlize() and AdminURLFieldWidget

The urlize and urlizetrunc template filters, and the AdminURLFieldWidget widget, are subject to a potential denial-of-service attack via certain inputs with a very large number of Unicode characters.

Thanks to Seokchan Yoon for the report.

This issue has severity "moderate" according to the Django security policy.

CVE-2024-42005: Potential SQL injection in QuerySet.values() and values_list()

QuerySet.values() and values_list() methods on models with a JSONField are subject to SQL injection in column aliases via a crafted JSON object key as a passed *arg.

Thanks to Eyal Gabay of EyalSec for the report.

This issue has severity "moderate" according to the Django security policy.

Affected supported versions
  • Django main branch
  • Django 5.1 (currently at release candidate status)
  • Django 5.0
  • Django 4.2
Resolution

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

CVE-2024-41989: Memory exhaustion in django.utils.numberformat.floatformat() CVE-2024-41990: Potential denial-of-service in django.utils.html.urlize() CVE-2024-41991: Potential denial-of-service vulnerability in django.utils.html.urlize() and AdminURLFieldWidget CVE-2024-42005: Potential SQL injection in QuerySet.values() and values_list() The following releases have been issued

The PGP key ID used for this release is Sarah Boyce: 3955B19851EA96EF

General notes regarding security reporting

As always, we ask that potential security issues be reported via private email to security@djangoproject.com, and not via Django's Trac instance, nor via the Django Forum, nor via the django-developers list. Please see our security policies for further information.

Categories: FLOSS Project Planets

Stefanie Molin: Common Pre-Commit Errors and How to Solve Them

Planet Python - Tue, 2024-08-06 08:00
Having issues with your `pre-commit` setup? In this troubleshooting guide, I've collected the most common errors `pre-commit` users face and provided explanations and guidance for fixing them.
Categories: FLOSS Project Planets

Daniel Roy Greenfeld: TIL: Parsing messy datetimes strings

Planet Python - Tue, 2024-08-06 06:37

How to convert inconsistent datetime strings into datetime objects.

Recently I've been working on yet another rewrite of my blog, this time to FastHTML. Thanks to the power and ease of that framework, that took about 45 minutes to replicate all the web pages of my blog. Wahoo!

Alas, the atom/rss feeds took quite a bit longer.

For the atom/rss feeds I chose to use the venerable Feedgen library. The challenge there is that Feedgen is rightfully particular about the datetime objects it accepts. And over the years as this site has had 650 posts added the timestamps have become rather inconsistent in their format. On that issue I fully blame the author, who unfortunately is me.

In any case, I wrote a little Python function that handles it in a timezone aware way using the dateutils.parser() functon that I learned.

# Python stdlib from datetime import datetime from dateutils import parser # You'll need to install the pytz dependency import pytz def convert_dtstr_to_dt(date_str: str) -> datetime: """ Convert a naive or non-naive date/datetime string to a datetime object. Naive datetime strings are assumed to be in GMT (UTC) timezone. """ try: dt = parser.parse(date_str) if dt.tzinfo is None: # If the datetime object is naive, set it to GMT (UTC) dt = dt.replace(tzinfo=pytz.UTC) return dt except (ValueError, TypeError) as e: Raise Exception(f"Error parsing date string: {e}")

Original source code here.

Note: As of publishing, this article is still on my old blog. The DNS switchover to the FastHTML version of my blog happens later this week.

Categories: FLOSS Project Planets

Specbee: How to split configurations across different sites in Drupal 10

Planet Drupal - Tue, 2024-08-06 04:59
Configuration management is one of the best features introduced in Drupal. It allows developers to easily push configuration changes from development to staging, and finally to production environments. However, some configurations are environment-specific. For instance, modules like Devel, Kint, Views UI, and Google Tag are only enabled in development environments and not in production. Fortunately, the Configuration Split module offers a solution by storing configurations in a separate directory, allowing for environment-specific imports. In this article, you'll learn how to split configurations across different websites using this powerful Drupal 10 module. Setup and using the Configuration Split module Installing the Drupal Configuration Split module is like installing any other contributed module. Use composer to install it since it automatically installs all the necessary dependencies. Open the terminal, within the project and enter the command. $ composer require drupal/config_splitCreate the split configuration Once installed and enabled, we can create one or more "splits" to keep our configuration file in a separate folder. Go to Admin > Configuration > Development > Configuration Split Settings Click Add Configuration Split Setting Enter a Label In the folder field, enter the folder name relative to the Docroot. The path will specify the folder inside which the split configurations should be stored. ../config/dev_splitMake sure the machine name of your split is the same as the folder name. You can keep the split active or inactive by default. These settings can be overridden by settings.php. Choose the module you want to split. In our case – the Devel Module. Since we are pushing the module to a separate config split folder, We have to partially split core.extension.yml file, which stores information about what modules must be installed on your site. Click Save. The config files of the selected module will also be sent to the same folder once you export the config split. The module also enables users to select any particular config file to be split. Activate a Split Once the split is created, it needs to be activated to carry out a split. The Drupal 10 Configuration Split module does not provide a UI for this purpose, but instead, we can modify our settings.php file to activate the split: $config['config_split.config_split.dev_split']['status'] = TRUE;Where, dev_split is the machine name of the split we created earlier. Now, export your configuration using drush cex. You can see the config_split settings getting updated and the module getting removed from your core.extension file, along with respective settings files. To export the configs selected in the dev_split, you have to run a different command, i.e. drush config-split: export “split_name”In our case it would be, drush config-split:export dev_split. Now you can see the files selected in dev_split getting exported to the dev_split directory.  For our Development split, we need to have it activated in the development environment, but not in production. To do so, we add the following to our settings.php on our development environment. $config['config_split.config_split.development']['status'] = TRUE; For the Production site we won't add this code in the settings file, or we can also disable it explicitly by using below code: config['config_split.config_split.development']['status'] = FALSE;Activate split based on environment You can also specify which split should be active in a certain environment by adding a condition in settings.php as shown below: if (isset($_ENV['AH_SITE_ENVIRONMENT'])) {    switch ($_ENV['AH_SITE_ENVIRONMENT'])    {      case 'develop':     $config['config_split.config_split.dev_split']['status'] = TRUE;     break;      case 'live':     $config['config_split.config_split.prod_split']['status'] = TRUE;     break;    }  }The above code will activate dev_split in the development (‘develop’) environment and prod_split in the production (‘live’) environment. Final Thoughts The Configuration Split Module is a fantastic feature introduced in Drupal’s configuration management. By splitting up configurations based on environments, you can use the module only in certain environments, based on your needs. We hope you found this article helpful. For more interesting articles on Drupal and everything technology, please bookmark our blog and come back for more!
Categories: FLOSS Project Planets

Akansha Tech Journal: Inside the Codebase: A Deep Dive into Drupal Rag Integration

Planet Drupal - Tue, 2024-08-06 04:27
Welcome back to our simple guide on Drupal Rag Integration. Our earlier introduction got you excited, and we couldn't be happier—thank you! Now, let's get into how the code behind the app makes your website smart and user-friendly. We'll explore how everything from adding new info to your site to answering user questions works with just a few clicks. This tool is great for anyone who wants a website that stays up-to-date and talks back.
Categories: FLOSS Project Planets

Python Bytes: #395 pythont compatible packages

Planet Python - Tue, 2024-08-06 04:00
<strong>Topics covered in this episode:</strong><br> <ul> <li><strong><a href="https://py-free-threading.github.io?featured_on=pythonbytes">py-free-threading.github.io</a></strong></li> <li><strong><a href="https://pyfound.blogspot.com/2024/07/pythons-supportive-and-welcoming.html?featured_on=pythonbytes">Python’s Supportive and Welcoming Environment is Tightly Coupled to Its Progress</a></strong></li> <li><strong><a href="https://uptimekuma.talkpython.fm/status/talk-python?featured_on=pythonbytes">Status pages for sites</a>!</strong></li> <li><strong><a href="https://peps.python.org/pep-0751?featured_on=pythonbytes">PEP 751 – A file format to list Python dependencies for installation reproducibility</a></strong></li> <li><strong>Extras</strong></li> <li><strong>Joke</strong></li> </ul><a href='https://www.youtube.com/watch?v=Ay2u2UoTfmE' style='font-weight: bold;'data-umami-event="Livestream-Past" data-umami-event-episode="395">Watch on YouTube</a><br> <p><strong>About the show</strong></p> <p>Sponsored by us! Support our work through:</p> <ul> <li>Our <a href="https://training.talkpython.fm/?featured_on=pythonbytes"><strong>courses at Talk Python Training</strong></a></li> <li><a href="https://courses.pythontest.com/p/the-complete-pytest-course?featured_on=pythonbytes"><strong>The Complete pytest Course</strong></a></li> <li><a href="https://www.patreon.com/pythonbytes"><strong>Patreon Supporters</strong></a></li> </ul> <p><strong>Connect with the hosts</strong></p> <ul> <li>Michael: <a href="https://fosstodon.org/@mkennedy"><strong>@mkennedy@fosstodon.org</strong></a></li> <li>Brian: <a href="https://fosstodon.org/@brianokken"><strong>@brianokken@fosstodon.org</strong></a></li> <li>Show: <a href="https://fosstodon.org/@pythonbytes"><strong>@pythonbytes@fosstodon.org</strong></a></li> </ul> <p>Join us on YouTube at <a href="https://pythonbytes.fm/stream/live"><strong>pythonbytes.fm/live</strong></a> to be part of the audience. Usually Tuesdays at 10am PT. Older video versions available there too.</p> <p>Finally, if you want an artisanal, hand-crafted digest of every week of the show notes in email form? Add your name and email to <a href="https://pythonbytes.fm/friends-of-the-show">our friends of the show list</a>, we'll never share it.</p> <p><strong>Michael #1:</strong> <a href="https://py-free-threading.github.io?featured_on=pythonbytes">py-free-threading.github.io</a></p> <ul> <li>Track the status of compatibility for free-threaded Python </li> <li>See the <a href="https://py-free-threading.github.io/tracking/?featured_on=pythonbytes">Compatibility status tracking page</a> for what you can use</li> <li>Lots of resources for getting your package tested and available for <em>pythont</em></li> </ul> <p><strong>Brian #2:</strong> <a href="https://pyfound.blogspot.com/2024/07/pythons-supportive-and-welcoming.html?featured_on=pythonbytes">Python’s Supportive and Welcoming Environment is Tightly Coupled to Its Progress</a></p> <ul> <li>“Python is as popular as it is today because we have gone above and beyond to make this a welcoming community. Being a friendly and supportive community is part of how we are perceived by the wider world and is integral to the wide popularity of Python. We won a “Wonderfully Welcoming Award” last year at GitHub Universe. Over and over again, the tech press refers to Python as a supportive community.”</li> <li>Some communication recently, with the recent bylaws change, didn’t live up to our promise to be welcoming</li> <li>Please read the article for more details.</li> <li>Another quote: “We have a moral imperative – as one of the very best places to bring new people into tech and into open source – to keep being good at welcoming new people. If we do not rise and continue to rise every day to this task, then we are not fulfilling our own mission, “to support and facilitate the growth of a diverse and international community of Python programmers.” Technical skills are a game-changer for the people who acquire them and joining a vast global network of people with similar interests opens many doors. Behavior that contributes to a hostile environment around Python or throws up barriers and obstacles to those who would join the Python community must be addressed because it endangers what we have built here.”</li> </ul> <p><strong>Michael #3:</strong> <a href="https://uptimekuma.talkpython.fm/status/talk-python?featured_on=pythonbytes">Status pages for sites</a>!</p> <ul> <li>Based on <a href="https://uptime.kuma.pet?featured_on=pythonbytes">Uptime Kuma</a> I covered last week</li> <li><a href="https://uptimekuma.talkpython.fm/status/python-bytes?featured_on=pythonbytes">Python Bytes</a> status</li> <li><a href="https://uptimekuma.talkpython.fm/status/talk-python?featured_on=pythonbytes">Talk Python</a> status</li> </ul> <p><strong>Brian #4:</strong> <a href="https://peps.python.org/pep-0751?featured_on=pythonbytes">PEP 751 – A file format to list Python dependencies for installation reproducibility</a></p> <ul> <li>Brett Cannon</li> <li>Motivation <ul> <li>Currently, no standard exists to: <ul> <li>Specify what top-level dependencies should be installed into a Python environment.</li> <li>Create an immutable record, such as a lock file, of which dependencies were installed.</li> </ul></li> <li>Considering there are at least five well-known solutions to this problem in the community (pip freeze, <a href="https://pypi.org/project/pip-tools/?featured_on=pythonbytes">pip-tools</a>, <a href="https://github.com/astral-sh/uv?featured_on=pythonbytes">uv</a>, <a href="https://python-poetry.org/?featured_on=pythonbytes">Poetry</a>, and <a href="https://pypi.org/project/pdm/?featured_on=pythonbytes">PDM</a>), there seems to be an appetite for lock files in general.</li> </ul></li> <li>Rationale <ul> <li>The format is designed so that a <em>locker</em> which produces the lock file and an <em>installer</em> which consumes the lock file can be separate tools. …</li> <li>The file format is designed to be human-readable. …Finally, the format is designed so that viewing a diff of the file is easy by centralizing relevant details.</li> <li>The file format is also designed to not require a resolver at install time. …</li> </ul></li> </ul> <p><strong>Extras</strong> </p> <p>Brian:</p> <ul> <li><a href="https://courses.pythontest.com?featured_on=pythonbytes">Hello, pytest! </a>course is going well, and is purchasable as in pre-release mode. <ul> <li>Planning on Aug 19 (or before) deadline.</li> <li>Not sure what the final price will be, but I’m starting with $10. <ul> <li>I want people to want to watch it even just so see if they want to recommend to co-workers so the people around them can ramp up on pytest quickly.</li> </ul></li> </ul></li> </ul> <p>Michael:</p> <ul> <li><a href="https://mypy-lang.blogspot.com/2024/07/mypy-111-released.html?featured_on=pythonbytes">Mypy 1.11 Released</a></li> <li><a href="https://fastht.ml?featured_on=pythonbytes">FastHTML</a> (more next week)</li> <li>Coming up on the final chance to be part of <a href="https://codeinacastle.com/python-zero-to-hero-2024?utm_source=pythonbytes">the Code in a Castle event</a>.</li> </ul> <p><strong>Joke:</strong> <a href="https://devhumor.com/media/open-ai?featured_on=pythonbytes">Open source OpenAI?</a></p>
Categories: FLOSS Project Planets

Akademy 2024 T-shirt online orders now open & in-person extended

Planet KDE - Tue, 2024-08-06 02:15

Orders for the Akademy 2024 T-shirt for those attending online are now open till 29th September, these will be shipped after Akademy. For those attending in person the order deadline has been extended till Sunday 11th

Full details are on the Akademy 2024 T-shirt page

  Mockup of Akademy 2024 T-shirt by Jens Reuterberg  
Categories: FLOSS Project Planets

Mike Driscoll: Create Amazing Progress Bars in Python with alive-progress

Planet Python - Mon, 2024-08-05 21:44

Have you ever needed a progress bar in your Python command-line application? One great way of creating a progress bar is to use the alive-progress package created by Rogério Sampaio de Almeida! Alive progress provides multiple different types of progress bars in your terminal or IPython REPL session. The alive progress package will work with any iterable, from lists to querysets, and more.

Let’s spend a little time learning how the alive-progress package works!

Installation

Installing the alive-progress package is easy using the pip installer utility. Here is the command you should use in your terminal:

python -m pip install alive-progress

Pip will install the package and any dependencies it needs. The pip tool shouldn’t take very long to install alive-progress.

Example Usage

The alive-progress package comes with a great demo that you can use to see all the different types of progress bars that the package supports. Open up a Python REPL and run the following code:

from alive_progress.styles import showtime showtime()

When you run this code, you will see something similar to the following:

There is another alive-progress demo that is a little different from the one above. You don’t need to use a Python REPL to run it though. Instead, you can open up your terminal application and run the following command:

python -m alive_progress.tools.demo

When you run this command, you will see something like this:

https://www.blog.pythonlibrary.org/wp-content/uploads/2024/08/alive_demo.mp4

The alive-progress GitHub page also shows several different code examples that demonstrate how to use alive-progress in your code. Here is one of the examples:

from alive_progress import alive_bar import time for x in 1000, 1500, 700, 0: with alive_bar(x) as bar: for i in range(1000): time.sleep(.005) bar()

Here you loop over four different integer values and create a progress bar for each of them. Then you loop over a range of one thousand and the progress bars will run through to completion.

When you run this code in your terminal, you will see this output:

Check out the GitHub repository for more fun examples!

Wrapping Up

The alive-progress package is lots of fun. You can add progress bars to any of your regular Python scripts and see them visually in your applications. This can be especially useful for command-line utilities that you create as they will show the user how far along they are in processing the data.

Download the package and start tinkering today!

The post Create Amazing Progress Bars in Python with alive-progress appeared first on Mouse Vs Python.

Categories: FLOSS Project Planets

KDE Plasma 6.1.4, Bugfix Release for August

Planet KDE - Mon, 2024-08-05 20:00

Tuesday, 6 August 2024. Today KDE releases a bugfix update to KDE Plasma 6, versioned 6.1.4.

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

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

  • DrKonqi: Use frameworks version number from kcrash. Commit.
  • KWin: Fix sticky keys for AltGr. Commit. See bug #444335
  • [kcms/access] Set range for visual bell duration selector. Commit.
View full changelog
Categories: FLOSS Project Planets

Trey Hunner: Quickly find the right datetime format code for your date

Planet Python - Mon, 2024-08-05 14:30

I often find myself with a string representing a date and time and the need to create a format string that will parse this string into a datetime object.

I decided to make a tool that solves this problem for me: https://pym.dev/strptime

Finding the code to parse a date format with strptime

Here’s how I’m now using this new tool.

I find a date string in a random spreadsheet or log file that I need to parse. For example, the string 30-Jun-2024 20:09, which I recently found in a spreadsheet.

I then paste the string into the tool and watch the format appear:

Then I click on the date format to copy-paste it. That’s it!

This tool works by cycling through a number of common formats. It also works for dates without a time, like Jul 1, 2024.

This input field works great when you’re in need of a code for the datetime class’s strptime method (which parses dates). But what if you need a code for strftime (for formatting dates)?

Finding the code to format a date with strftime

If you don’t have a date but instead want to construct a date in a specific common format, scroll down the page a bit.

This page includes a table of common formats.

Click on the format to copy it. That’s it.

Playing with format codes

What if you have a date format already but you’re not sure what it represents?

Paste it in the box!

For example if you’re wondering what the %B in %B %d, %Y means, paste it in to see what that represent with the current date and time:

Other features

There are a few other hidden features in this tool:

  • After a date or date format is pasted, if it corresponds to one of the formats listed in the table of common formats, that row will be highlighted
  • Hitting the Enter key anywhere on the page will select the input field
  • Clicking on a date within the format table will fill that date into the input box
  • The bottom of the page includes links to other useful datetime formatting/parsing tools as well as a link to the relevant Python documentation
Thoughts? Feature requests?

What do you think of this tool?

Is this something you’d bookmark and use often? Is this missing a key feature that you would need for it to be valuable for your use?

Are there date and time formats you’d like to see that don’t seem to be supported yet?

Comment or email me to let me know!

Categories: FLOSS Project Planets

Talking Drupal: Talking Drupal #462 - DrupalCon Singapore

Planet Drupal - Mon, 2024-08-05 14:00

Today we are talking about DrupalCon Singapore, What you can expect, and What’s next for Drupal in Asia with guest Mike Richardson & Surabhi Gokte. We’ll also cover Filefield Paths as our module of the week.

For show notes visit: www.talkingDrupal.com/462

Topics
  • When is Drupalcon Asia
  • The last one was in 2016, what did it take to reprise
  • How do you handle language barriers
  • What are your roles in the organizing committee
  • Steering committee and Drupal South
  • What can attendees expect
  • Any special programming
  • What kind of diversity is expected from attendees
  • Driving from Mumbai to Singapore is 110 hours
  • Will Dries be there
  • Can we expect future Drupalcon Asia's
  • Planning and logistics regarding coffee
  • Starshot
Resources Guests

Mike Richardson - Singapore DrupalCon richo_au Surabhi Gokte - surabhi-gokte

Hosts

Nic Laflin - nLighteneddevelopment.com nicxvan John Picozzi - epam.com johnpicozzi Josh Miller - joshmiller

MOTW Correspondent

Martin Anderson-Clutz - mandclu.com mandclu

  • Brief description:
    • Have you ever wanted to use a variety of tokens to customize the directory and file names of your uploaded files? There’s a module for that.
  • Module name/project name:
  • Brief history
    • How old: created in July 2008 by Stuart Clark (Deciphered), though recent releases are by Oleh Vehera (voleger) of Golems GABB
    • Versions available: 7.x-1.2 and 8.x-1.0-beta7, the latter of which supports Drupal 9.3 or newer, and Drupal 10
  • Maintainership
    • Seeking co-maintainers
    • Security Coverage
      • Opted in, but no coverage in practice for Drupal 9 or 10
    • Test coverage
    • Number of open issues: 131 open issues, 50 of which are bugs against the current branch
  • Usage stats:
    • 34,609 sites almost 35,000 sites
  • Module features and usage
    • This module allows you to customize file names and paths by leveraging a variety of entity-based tokens
    • It also integrates with the Pathauto module, giving you options to clean up the tokens for example by removing slashes, filtering out words or punctuation, and so on
    • It can also work with the Transliteration module to convert unicode characters into US-ASCII
    • Filefield Paths has options to rename and move existing files, and can retroactively rename files, effectively bulk updating and moving all your existing files
    • It can also work with the Redirect module to automatically create redirects from the old path and filename to the new location, when renaming
    • I’d also like to give a tip of the cap to Jim Birch of Kanopi for suggesting this module, when I was talking to a customer who was looking to achieve pretty much exactly what this module does
Categories: FLOSS Project Planets

Drupal Association blog: How did we get to Ripple Makers? The Evolution of the Drupal Membership Program

Planet Drupal - Mon, 2024-08-05 10:00

The Drupal Association’s individual membership program has always played a crucial role in supporting the Drupal community and ensuring the ongoing success of the Drupal project. The program was initially set up as a transactional vehicle: aside from the badge and voting rights, members received access to discounts from Drupal services providers.

The individual membership program stayed on autopilot during the turmoil of the Covid pandemic as we made the difficult decision to cancel DrupalCon North America 2020. During this time, our members and other Drupal community supporters donated unprecedented unrestricted funds using the hashtag #DrupalCares.

I joined the Drupal Association about two years ago as the Development & Membership Manager. My role split my time between Drupal Certified partners and the individual membership program, however it was clear from the beginning that the individual membership program would need a lot more attention.

The membership program underwent significant transformation from 2019 through May 2023, overcoming challenges and celebrating successes along the way. Initially, we faced a decline in numbers, but through consistent effort and unprecedented generosity, we've made remarkable strides. Today, we proudly recognize 1,747 members, with 70% of them providing recurring support.

Ripple Makers: Celebrating Changemakers in our Community 

The individual membership program rebranded as Ripple Makers in 2024. With this new name, the Drupal Association increases focus on communication, transparency, and engagement within the community. The ‘new’ program encourages sustaining donors to make monthly recurring gifts, which provide a reliable source of funding. This financial support allows the Drupal Association to plan for the future, support essential projects, and foster a dynamic and responsive community​.

Membership Programs, Sustainable Giving, and Nonprofits 

Why does a nonprofit organization such as the Drupal Association need a sustaining giving program? This program is vital for the sustainability and growth of the Drupal Association, and the benefit it brings to the community. It provides a stable foundation of support, ensuring that we can continue to innovate and grow. In addition, unrestricted giving in particular allows nonprofits to allocate resources where they are needed most, supporting the overall health of the Drupal project. Importantly. It also opens up direct lines of communication with the community.

Positive Impact on the Drupal Community

The Drupal community thrives because of several factors: open source collaboration, supportive environment, diverse participation, commitment to quality, and others. In my opinion, a supportive environment is the most important one.

By becoming a Ripple Maker, you directly support a vibrant and inclusive community of people who care for the Drupal project. Your contributions empower us to foster a sustainable ecosystem for Drupal by harnessing the collective generosity and commitment to the future of Drupal. Learn more about the program and join the wave on our sign up page.

Thank you for your ongoing support and dedication. Let's make the next chapter of our sustainable giving program the best one yet!

Categories: FLOSS Project Planets

Real Python: Functional Programming in Python: When and How to Use It

Planet Python - Mon, 2024-08-05 10:00

Functional programming is a programming paradigm in which the primary method of computation is the evaluation of functions. But how does Python support functional programming?

In this tutorial, you’ll learn:

  • What the functional programming paradigm entails
  • What it means to say that functions are first-class citizens in Python
  • How to define anonymous functions with the lambda keyword
  • How to implement functional code using map(), filter(), and reduce()

Functional programming typically plays a minor role in Python code, but it’s still good to be familiar with it. You’ll probably encounter it from time to time when reading code written by others. And you may even find situations where it’s advantageous to use Python’s functional programming capabilities in your own code.

Get Your Code: Click here to download the free sample code that shows you when and how to use functional programming in Python.

What Is Functional Programming?

A pure function is a function whose output value follows solely from its input values without any observable side effects. In functional programming, a program consists primarily of the evaluation of pure functions. Computation proceeds by nested or composed function calls without changes to state or mutable data.

The functional paradigm is popular because it offers several advantages over other programming paradigms. Functional code is:

  • High level: You describe the result you want rather than explicitly specifying the steps required to get there. Single statements tend to be concise but pack a lot of punch.
  • Transparent: The behavior of a pure function can be described by its inputs and outputs, without intermediary values. This eliminates the possibility of side effects and facilitates debugging.
  • Parallelizable: Routines that don’t cause side effects can more easily run in parallel with one another.

Many programming languages support some degree of functional programming. In some languages, virtually all code follows the functional paradigm. Haskell is one such example. Python, by contrast, does support functional programming but contains features of other programming models as well.

While it’s true that an in-depth description of functional programming is somewhat complex, the goal here isn’t to present a rigorous definition but to show you what you can do by way of functional programming in Python.

How Well Does Python Support Functional Programming?

To support functional programming, it’s beneficial if a function in a given programming language can do these two things:

  1. Take another function as an argument
  2. Return another function to its caller

Python plays nicely in both respects. Everything in Python is an object, and all objects in Python have more or less equal stature. Functions are no exception.

In Python, functions are first-class citizens. This means that functions have the same characteristics as values like strings and numbers. Anything you would expect to be able to do with a string or number, you can also do with a function.

For example, you can assign a function to a variable. You can then use that variable the same way you would use the function itself:

Python 1>>> def func(): 2... print("I am function func()!") 3... 4 5>>> func() 6I am function func()! 7 8>>> another_name = func 9>>> another_name() 10I am function func()! Copied!

The assignment another_name = func on line 8 creates a new reference to func() named another_name. You can then call the function by either of the two names, func or another_name, as shown on lines 5 and 9.

You can display a function to the console with print(), include it as an element in a composite data object like a list, or even use it as a dictionary key:

Python >>> def func(): ... print("I am function func()!") ... >>> print("cat", func, 42) cat <function func at 0x7f81b4d29bf8> 42 >>> objects = ["cat", func, 42] >>> objects[1] <function func at 0x7f81b4d29bf8> >>> objects[1]() I am function func()! >>> d = {"cat": 1, func: 2, 42: 3} >>> d[func] 2 Copied!

In this example, func() appears in all the same contexts as the values "cat" and 42, and the interpreter handles it just fine.

Note: What you can or can’t do with an object in Python depends to some extent on context. Some operations work for certain object types but not for others.

For example, you can add two integer objects or concatenate two string objects with the plus operator (+), but the plus operator isn’t defined for function objects.

For present purposes, what matters is that functions in Python satisfy the two criteria beneficial for functional programming listed above. You can pass a function to another function as an argument:

Python 1>>> def inner(): 2... print("I am function inner()!") 3... 4 5>>> def outer(function): 6... function() 7... 8 9>>> outer(inner) 10I am function inner()! Copied! Read the full article at https://realpython.com/python-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

Week 10

Planet KDE - Mon, 2024-08-05 09:51
Here's the relevant part of the new code that I have been working on in kis_tool_freehandhelper::paint : if (m_d->smoothingOptions->smoothingType() == KisSmoothingOptions::SIMPLE_SMOOTHING || m_d->smoothingOptions->smoothingType() == KisS...
Categories: FLOSS Project Planets

The Drop Times: Drupal 11 and Beyond

Planet Drupal - Mon, 2024-08-05 09:45

Dear Readers, 

Imagine a bustling workshop filled with developers, designers, and enthusiasts collaborating to build something extraordinary. This is the scene as Drupal 11 emerges, packed with features designed to make web development more intuitive and efficient.

"In recent years, we've seen an uptick in innovation in Drupal. Drupal 11 continues this trend with many new and exciting features."

notes Dries Buytaert, Founder and Lead of Drupal.

He emphasises that Drupal 11 is designed to empower ambitious site builders to create exceptional websites and accelerate Drupal's innovation. With this release, Drupal has become more intuitive, powerful, and flexible, ensuring it remains a leader in web development and digital experience creation.

Key among these innovations are Recipes and Single-Directory Components (SDCs). Recipes act like pre-assembled kits, allowing developers to add features to their websites with ease. Meanwhile, SDCs gather all necessary code for each component into one tidy package, simplifying the workflow.

Drupal 11 boasts superior performance, running up to 50% faster on PHP 8.3 compared to its predecessors. This improvement ensures swift page loading and an overall enhanced user experience. Accessibility remains a key focus, with Drupal continuing to support over 100 languages, ensuring inclusivity and usability for a global audience. This new release is the product of a vibrant community effort, with 1,858 individuals from 590 organizations contributing their expertise and passion. It’s a shining example of what can be achieved when people come together with a common goal: to push the boundaries of what’s possible with Drupal.

But the excitement doesn’t end with Drupal 11. The community is already buzzing about the upcoming Drupal Starshot project. Starshot aims to make Drupal more accessible than ever, especially for newcomers. By integrating user-friendly tools like the Project Browser and automatic updates, Starshot promises a smooth journey from installation to launching a fully functional website. With 148 days left for the year, the community is eagerly anticipating the arrival of the initial version of Starshot.

These developments are more than just updates; they’re part of an ongoing story of innovation and collaboration. With Drupal 11 and the forthcoming Starshot project, the Drupal community is not just keeping pace with the future—they're shaping it.

Moving on to stand-out stories of the past week.

The most important and currently happening update from the Drupal Community is the announcement of candidates for Drupal Association Board Elections. This year's election will fill one at-large board seat, with candidates Albert Hughes, Will Huggins, Alejandro Moreno, Janna Malikova, Kevin Quillen, Matthew Saunders, and Dominique De Cooman vying for the position. Voting will open on 15 August, requiring active Drupal Association memberships by 14 August to participate. The election results will be ratified between 6-13 September, with the new board member announced at DrupalCon Barcelona.

Last week, Daniel Cothran, in a conversation with Kazima Abbas, sub-editor of The DropTimes, shared his journey into web development and the creation of Views CSV Source. He explained how this module not only simplifies the data presentation process but also improves the efficiency and performance of Drupal sites, making it especially valuable for projects requiring reliable and streamlined data handling. Read the full article here.

In an email conversation, I had the pleasure of interviewing Jürgen Haas, Co-Founder of LakeDrops, and the creative mind behind the ECA module. During our discussion, Jürgen delved into the development of the ECA (Event, Condition, Action) module, which he designed to modernize workflow automation within Drupal. He shared the story behind the ECA module's inception, its development path, and its potential integration with future Drupal core updates, emphasizing its value in enhancing the user experience through intuitive tools.

The second part of the Thoughts on Starshot feature revealed widespread excitement within the Drupal community, highlighting the potential of the Starshot initiative to transform the Drupal platform. With contributions from seasoned community members like Kristen Pol, Murray Woodman, Nicolas Loye, Martin Anderson-Clutz, and Tim Hestenes Lehnen, the consensus is clear: Drupal Starshot promises to streamline the user experience, foster greater collaboration, and lower the barriers to entry, making Drupal more accessible to a wider audience.

DrupalCamp Ottawa 2024, held on August 2, brought together web development enthusiasts of all skill levels for a day of learning and networking centered around the Drupal platform. Highlighting key speakers like Martin Anderson-Clutz, the event emphasized community, inclusivity, and the latest advancements in Drupal, ensuring a successful and collaborative experience for all attendees. Read here.

The Pacific Northwest Drupal Summit is set to return for its 10th event, taking place from October 11 to 13, 2024, in Seattle, Washington. Since 2009, this summit has been a key regional event for Drupal professionals in the Pacific Northwest.

The Acquia 2024 Digital Freedom Tour will make its next stop in New York City on October 24, 2024. The event aims to advance a safer, more inclusive, and accessible digital world. It will bring together prominent digital leaders who will share their expertise in creating impactful digital experiences.

Anoop Singh, Tech Lead at Valuebound, announced on LinkedIn the upcoming release of the FlexiStyle Bootstrap SCSS theme on Drupal.org. This follows the success of the original FlexiStyle Bootstrap theme and promises even greater customization and flexibility for Drupal projects.

Additionally, amazee.io has released Lagoon V2.20, a significant update to its open-source application delivery platform. This release includes enhancements in user management, security, and onboarding efficiency designed to better support business needs.

Backdrop CMS 1.28.0 has been released, bringing significant enhancements to the platform, including new options for configuration storage. Laryn Kragt Bakker, Senior Developer at Aten Design Group, detailed the update, which allows users to choose between storing their configuration data in the file system or the database.

We acknowledge that there are more stories to share. However, due to selection constraints, we must pause further exploration for now.

To get timely updates, follow us on LinkedIn, Twitter and Facebook. You can also, join us on Drupal Slack at #thedroptimes.

Thank you,
Sincerely
Alka Elizabeth
Sub-editor, The DropTimes.

Categories: FLOSS Project Planets

Real Python: Quiz: Functional Programming in Python: When and How to Use It

Planet Python - Mon, 2024-08-05 08:00

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

By working through this quiz, you’ll revisit the functional programming paradigm, the concept of functions as first-class citizens in Python, the use of the lambda keyword, and how to implement functional code using map(), filter(), and reduce().

[ 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

LN Webworks: Ready for Drupal 11? Upgrade With LN Webworks Now!

Planet Drupal - Mon, 2024-08-05 06:32

In this digital world, it is absolutely necessary to stay up-to-date with the latest upgrades and trends. Drupal 11 is here, bringing you better security, performance, and user experience. As a pioneer in 360 Drupal services, LN Webworks is excited to help you upgrade 

In this blog, we will navigate more about the intricacies of Drupal 11’s core attributes, the benefits of embracing the latest update, and how LN Webworks stands as your steadfast Drupal Certification Migration Partner for a successful migration.

Categories: FLOSS Project Planets

ADCI Solutions: Fixing catalog data import for a Drupal online store

Planet Drupal - Mon, 2024-08-05 05:30
<p>How we fixed a buggy custom Drupal module for setting up a <a href="https://www.adcisolutions.com/work/product-catalog-import?utm_source=planetdrupal%26utm_medium=rss_feed%26utm_campaign=catalog_import">product catalog</a> and got faulty catalog filters working with Ajax modules.</p><img data-entity-uuid="89483bc1-60e8-4538-8747-32b5bb9d1100" data-entity-type="file" src="https://www.adcisolutions.com/sites/default/files/inline-images/catalog-data-import.png" width="1986" height="1263" alt="catalog import">
Categories: FLOSS Project Planets

1xINTERNET blog: Everything you need to know about The European Accessibility Act (EAA)

Planet Drupal - Mon, 2024-08-05 04:19

The European Accessibility Act (EAA) aims to enhance the accessibility of products and services for people with disabilities and the elderly throughout the EU. With less than a year remaining to meet compliance requirements, both the public and private sectors must act now.

Categories: FLOSS Project Planets

Pages