Skip to content

Instantly share code, notes, and snippets.

View ylmrx's full-sized avatar
👾

ylmrx ylmrx

👾
  • @vente-privee
  • Paris
View GitHub Profile
@tiran
tiran / python-on-debian.md
Last active May 21, 2024 08:46
Negative Python user experience on Debian/Ubuntu

Negative Python user experience on Debian/Ubuntu

The user experience of Python on a minimal Debian or Ubuntu installation is bad. Core features like virtual environments, pip bootstrapping, and the ssl module are either missing or do not work like designed and documented. Some Python core developers including me are worried and consider Debian/Ubuntu's packaging harmful for Python's reputation and branding. Users don't get what they expect.

Reproducer

The problems can be easily reproduced with official Debian and Ubuntu containers in Docker or Podman. Debian Stable (Debian 10 Buster) comes with Python 3.7.3. Ubuntu Focal (20.04 LTS) has Python 3.8.5.

Run Debian container

@nerzhul
nerzhul / crc32.py
Created June 19, 2017 21:02
ansible crc32 filter
# plugins/filter/crc32.py
import binascii
def crc32(s):
return binascii.crc32(s) & 0xffffffff
class FilterModule(object):
''' Ansible core jinja2 filters '''