Skip to content

Instantly share code, notes, and snippets.

View FFY00's full-sized avatar
🌈
struggling to live

Filipe Laíns 🇵🇸 FFY00

🌈
struggling to live
View GitHub Profile
@FFY00
FFY00 / 0001-Bug-1935621-Fix-virtual-environment-sysconfig-path-c.patch
Created December 7, 2024 21:18
Fix Firefox's build-system with Python >=3.12.8, >=3.13.1, >=3.14.0a2
From 44479f1f9cb21c0eb517c0fd09e3fdc993b30d8c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Filipe=20La=C3=ADns?= <[email protected]>
Date: Sat, 7 Dec 2024 21:03:31 +0000
Subject: [PATCH] Bug 1935621 - Fix virtual environment sysconfig path
calculation
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Signed-off-by: Filipe Laíns <[email protected]>
@FFY00
FFY00 / symbols.md
Last active December 19, 2024 06:25
class HelloDescriptor:
def __get__(self, obj, objtype=None):
return self.hello
class Foo(HelloDescriptor):
def hello(self):
return 42
class Transform[T, SetterT=None]:
def __init__(self, fn: Callable[[SetterT], T] | None = None, *, default: T = typing.NoDefault) -> None:
self._fn = fn
self._default = default
self._values: dict[object, T] = {}
@functools.cached_property
def _type(self):
if not hasattr(self, '__orig_class__'):
raise TypeError('Use Transform[...](...) instead of Transform(...).')