summaryrefslogtreecommitdiffstats
path: root/third_party/python/pep487/PKG-INFO
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-28 14:29:10 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-28 14:29:10 +0000
commit2aa4a82499d4becd2284cdb482213d541b8804dd (patch)
treeb80bf8bf13c3766139fbacc530efd0dd9d54394c /third_party/python/pep487/PKG-INFO
parentInitial commit. (diff)
downloadfirefox-upstream.tar.xz
firefox-upstream.zip
Adding upstream version 86.0.1.upstream/86.0.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'third_party/python/pep487/PKG-INFO')
-rw-r--r--third_party/python/pep487/PKG-INFO87
1 files changed, 87 insertions, 0 deletions
diff --git a/third_party/python/pep487/PKG-INFO b/third_party/python/pep487/PKG-INFO
new file mode 100644
index 0000000000..c44d702629
--- /dev/null
+++ b/third_party/python/pep487/PKG-INFO
@@ -0,0 +1,87 @@
+Metadata-Version: 2.1
+Name: pep487
+Version: 1.0.1
+Summary: PEP487 - Simpler customisation of class creation
+Home-page: https://github.com/zaehlwerk/pep487
+Author: Gregor Giesen
+Author-email: giesen@zaehlwerk.net
+License: GPLv3
+Description: ===============================================
+ PEP487: Simpler customisation of class creation
+ ===============================================
+
+ This is a backport of PEP487's simpler customisation of class
+ creation by Martin Teichmann <https://www.python.org/dev/peps/pep-0487/>
+ for Python versions before 3.6.
+
+ PEP487 is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published
+ by the Free Software Foundation, either version 3 of the License,
+ or (at your option) any later version.
+
+
+ Subclass init
+ =============
+
+ >>> from pep487 import PEP487Object
+ >>> class FooBase(PEP487Object):
+ ... foos = set()
+ ...
+ ... def __init_subclass__(cls, **kwargs):
+ ... cls.foos.add(cls.__name__)
+
+ Using `PEP487Object` as base class all subclasses of FooBase
+ will add their name to the common class variable 'foos'.
+
+ >>> class Foo1(FooBase):
+ ... pass
+ >>> class Foo2(FooBase):
+ ... pass
+
+ Hence:
+
+ >>> FooBase.foos
+ {'Foo1', 'Foo2'}
+
+
+
+ Property names and owner
+ ========================
+
+ If a class object has a method `__set_name__` upon declaration
+ of an PEP487Object class, it will be called:
+
+ >>> class NamedProperty:
+ ... def __set_name__(self, owner, name):
+ ... self.context = owner
+ ... self.name = name
+
+ >>> class Bar(PEP487Object):
+ ... foo = NamedProperty()
+ ... bar = NamedProperty()
+
+ Consequently:
+
+ >>> Bar.foo.name is 'foo' and Bar.foo.context is Bar
+ True
+ >>> Bar.bar.name is 'bar' and Bar.bar.context is Bar
+ True
+
+
+ Abstract base classes
+ =====================
+
+ Since `PEP487Object` has a custom metaclass, it is incompatible
+ to `abc.ABC`. Therefore `pep487` contains patched versions of `ABC`
+ and `ABCMeta`.
+
+Keywords: pep487
+Platform: UNKNOWN
+Classifier: Development Status :: 5 - Production/Stable
+Classifier: Intended Audience :: Developers
+Classifier: License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)
+Classifier: Programming Language :: Python
+Classifier: Programming Language :: Python :: 3.4
+Classifier: Programming Language :: Python :: 3.5
+Classifier: Programming Language :: Python :: 3.6
+Provides-Extra: test