picop 1.44.16__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- picop-1.44.16/COVERAGE.md +167 -0
- picop-1.44.16/LICENSE +21 -0
- picop-1.44.16/LICENSES/Apache-2.0.txt +201 -0
- picop-1.44.16/MANIFEST.in +13 -0
- picop-1.44.16/NOTICE +13 -0
- picop-1.44.16/PKG-INFO +169 -0
- picop-1.44.16/README.md +135 -0
- picop-1.44.16/docs/AGENT_LOOPS.md +178 -0
- picop-1.44.16/docs/EQ_INVENTORY.md +37 -0
- picop-1.44.16/docs/EQ_INVENTORY_TIERB.md +171 -0
- picop-1.44.16/docs/EQ_RUNTIME.md +58 -0
- picop-1.44.16/docs/NAMING.md +41 -0
- picop-1.44.16/docs/OPS_INVENTORY.md +471 -0
- picop-1.44.16/docs/OPS_INVENTORY_TIERB.md +34 -0
- picop-1.44.16/docs/PIPELINE.md +168 -0
- picop-1.44.16/docs/README.md +81 -0
- picop-1.44.16/docs/RELEASE.md +114 -0
- picop-1.44.16/docs/SAFETY.md +40 -0
- picop-1.44.16/docs/TEMPLATE.md +77 -0
- picop-1.44.16/docs/future/MONKEY.md +10 -0
- picop-1.44.16/docs/modules/001_cytuple.md +188 -0
- picop-1.44.16/docs/modules/002_cybytes.md +215 -0
- picop-1.44.16/docs/modules/003_cydict.md +223 -0
- picop-1.44.16/docs/modules/004_cylist.md +182 -0
- picop-1.44.16/docs/modules/005_cyset.md +188 -0
- picop-1.44.16/docs/modules/006_cystr.md +185 -0
- picop-1.44.16/docs/modules/007_cyunicode.md +134 -0
- picop-1.44.16/docs/modules/008_cyansi.md +99 -0
- picop-1.44.16/docs/modules/009_cygc.md +90 -0
- picop-1.44.16/docs/modules/010_cyerr.md +84 -0
- picop-1.44.16/docs/modules/011_cymem.md +78 -0
- picop-1.44.16/docs/modules/012_cythread.md +81 -0
- picop-1.44.16/docs/modules/013_cyatomic.md +80 -0
- picop-1.44.16/docs/modules/014_cybytearray.md +170 -0
- picop-1.44.16/docs/modules/015_cyarray.md +150 -0
- picop-1.44.16/docs/modules/016_cymemoryview.md +141 -0
- picop-1.44.16/docs/modules/017_cybuffer.md +136 -0
- picop-1.44.16/docs/modules/018_cysequence.md +132 -0
- picop-1.44.16/docs/modules/019_cyslice.md +123 -0
- picop-1.44.16/docs/modules/020_cybool.md +121 -0
- picop-1.44.16/docs/modules/021_cylong.md +138 -0
- picop-1.44.16/docs/modules/022_cylongintrepr.md +85 -0
- picop-1.44.16/docs/modules/023_cyfloat.md +127 -0
- picop-1.44.16/docs/modules/024_cycomplex.md +124 -0
- picop-1.44.16/docs/modules/025_cynumber.md +128 -0
- picop-1.44.16/docs/modules/026_cyobject.md +133 -0
- picop-1.44.16/docs/modules/027_cytype.md +126 -0
- picop-1.44.16/docs/modules/028_cyref.md +83 -0
- picop-1.44.16/docs/modules/029_cyfunction.md +114 -0
- picop-1.44.16/docs/modules/030_cymethod.md +130 -0
- picop-1.44.16/docs/modules/031_cymodule.md +124 -0
- picop-1.44.16/docs/modules/032_cyiterator.md +121 -0
- picop-1.44.16/docs/modules/033_cyiterobject.md +91 -0
- picop-1.44.16/docs/modules/034_cygenobject.md +115 -0
- picop-1.44.16/docs/modules/035_cycellobject.md +118 -0
- picop-1.44.16/docs/modules/036_cydescr.md +85 -0
- picop-1.44.16/docs/modules/037_cyinstance.md +79 -0
- picop-1.44.16/docs/modules/038_cygetargs.md +80 -0
- picop-1.44.16/docs/modules/039_cycodecs.md +95 -0
- picop-1.44.16/docs/modules/040_cydatetime.md +147 -0
- picop-1.44.16/docs/modules/041_cycontextvars.md +116 -0
- picop-1.44.16/docs/modules/042_cymapping.md +116 -0
- picop-1.44.16/docs/modules/043_cymarshal.md +79 -0
- picop-1.44.16/docs/modules/044_cyfileobject.md +74 -0
- picop-1.44.16/docs/modules/045_cypycapsule.md +114 -0
- picop-1.44.16/docs/modules/046_cyweakref.md +117 -0
- picop-1.44.16/docs/modules/047_cyceval.md +71 -0
- picop-1.44.16/docs/modules/048_cypystate.md +73 -0
- picop-1.44.16/docs/modules/049_cypylifecycle.md +79 -0
- picop-1.44.16/docs/modules/050_cypyport.md +72 -0
- picop-1.44.16/docs/modules/051_cyconversion.md +82 -0
- picop-1.44.16/docs/modules/052_cyversion.md +71 -0
- picop-1.44.16/docs/modules/053_cytime.md +86 -0
- picop-1.44.16/docs/modules/054_cydeque.md +95 -0
- picop-1.44.16/docs/modules/055_cyrange.md +94 -0
- picop-1.44.16/docs/modules/README.md +28 -0
- picop-1.44.16/examples/README.md +104 -0
- picop-1.44.16/examples/STARTER.md +45 -0
- picop-1.44.16/examples/cimport_ext/README.md +28 -0
- picop-1.44.16/examples/cimport_ext/demo.pyx +23 -0
- picop-1.44.16/examples/cimport_ext/setup.py +30 -0
- picop-1.44.16/examples/cython/README.md +18 -0
- picop-1.44.16/examples/cython/borrow_vs_owned.md +31 -0
- picop-1.44.16/examples/py_cstr_bytes.py +32 -0
- picop-1.44.16/examples/py_overlap_mapping_vs_dict.py +30 -0
- picop-1.44.16/examples/py_overlap_sequence_vs_list.py +31 -0
- picop-1.44.16/examples/py_overlap_str_vs_unicode.py +41 -0
- picop-1.44.16/examples/pyarray.py +33 -0
- picop-1.44.16/examples/pybool.py +20 -0
- picop-1.44.16/examples/pybuffer.py +26 -0
- picop-1.44.16/examples/pybytearray.py +29 -0
- picop-1.44.16/examples/pybytes.py +121 -0
- picop-1.44.16/examples/pycellobject.py +26 -0
- picop-1.44.16/examples/pycodecs.py +16 -0
- picop-1.44.16/examples/pycomplex.py +29 -0
- picop-1.44.16/examples/pycontextvars.py +38 -0
- picop-1.44.16/examples/pyconversion.py +13 -0
- picop-1.44.16/examples/pydatetime.py +55 -0
- picop-1.44.16/examples/pydeque.py +22 -0
- picop-1.44.16/examples/pydescr.py +15 -0
- picop-1.44.16/examples/pydict.py +91 -0
- picop-1.44.16/examples/pyfileobject.py +21 -0
- picop-1.44.16/examples/pyfloat.py +20 -0
- picop-1.44.16/examples/pyfunction.py +24 -0
- picop-1.44.16/examples/pygc.py +14 -0
- picop-1.44.16/examples/pygenobject.py +22 -0
- picop-1.44.16/examples/pyhot.py +56 -0
- picop-1.44.16/examples/pyiterator.py +20 -0
- picop-1.44.16/examples/pyiterobject.py +15 -0
- picop-1.44.16/examples/pylist.py +72 -0
- picop-1.44.16/examples/pylong.py +18 -0
- picop-1.44.16/examples/pymapping.py +17 -0
- picop-1.44.16/examples/pymarshal.py +13 -0
- picop-1.44.16/examples/pymemoryview.py +18 -0
- picop-1.44.16/examples/pymethod.py +35 -0
- picop-1.44.16/examples/pymodule.py +20 -0
- picop-1.44.16/examples/pynumber.py +23 -0
- picop-1.44.16/examples/pyobject.py +22 -0
- picop-1.44.16/examples/pypycapsule.py +29 -0
- picop-1.44.16/examples/pyrange.py +22 -0
- picop-1.44.16/examples/pysequence.py +20 -0
- picop-1.44.16/examples/pyset.py +88 -0
- picop-1.44.16/examples/pyslice.py +23 -0
- picop-1.44.16/examples/pystr.py +134 -0
- picop-1.44.16/examples/pytime.py +16 -0
- picop-1.44.16/examples/pytuple.py +35 -0
- picop-1.44.16/examples/pytype.py +17 -0
- picop-1.44.16/examples/pyunicode.py +18 -0
- picop-1.44.16/examples/pyuuid.py +14 -0
- picop-1.44.16/examples/pyweakref.py +26 -0
- picop-1.44.16/examples/wrap_ansi.py +17 -0
- picop-1.44.16/pyproject.toml +63 -0
- picop-1.44.16/setup.cfg +4 -0
- picop-1.44.16/setup.py +46 -0
- picop-1.44.16/src/cypy/__about__.py +3 -0
- picop-1.44.16/src/cypy/__init__.pxd +1439 -0
- picop-1.44.16/src/cypy/__init__.py +662 -0
- picop-1.44.16/src/cypy/buffers.py +69 -0
- picop-1.44.16/src/cypy/compat.py +284 -0
- picop-1.44.16/src/cypy/containers.py +125 -0
- picop-1.44.16/src/cypy/cyansi.pxd +126 -0
- picop-1.44.16/src/cypy/cyansi.pxi +32 -0
- picop-1.44.16/src/cypy/cyansi.pyi +74 -0
- picop-1.44.16/src/cypy/cyansi.pyx +121 -0
- picop-1.44.16/src/cypy/cyarray.pxd +117 -0
- picop-1.44.16/src/cypy/cyarray.pyi +50 -0
- picop-1.44.16/src/cypy/cyarray.pyx +4 -0
- picop-1.44.16/src/cypy/cyatomic.pxd +113 -0
- picop-1.44.16/src/cypy/cyatomic_shim.h +37 -0
- picop-1.44.16/src/cypy/cybool.pxd +37 -0
- picop-1.44.16/src/cypy/cybool.pyi +21 -0
- picop-1.44.16/src/cypy/cybool.pyx +4 -0
- picop-1.44.16/src/cypy/cybuffer.pxd +125 -0
- picop-1.44.16/src/cypy/cybuffer.pyi +13 -0
- picop-1.44.16/src/cypy/cybuffer.pyx +4 -0
- picop-1.44.16/src/cypy/cybytearray.pxd +150 -0
- picop-1.44.16/src/cypy/cybytearray.pyi +44 -0
- picop-1.44.16/src/cypy/cybytearray.pyx +4 -0
- picop-1.44.16/src/cypy/cybytes.pxd +240 -0
- picop-1.44.16/src/cypy/cybytes.pyi +48 -0
- picop-1.44.16/src/cypy/cybytes.pyx +4 -0
- picop-1.44.16/src/cypy/cycellobject.pxd +53 -0
- picop-1.44.16/src/cypy/cycellobject.pyi +21 -0
- picop-1.44.16/src/cypy/cycellobject.pyx +4 -0
- picop-1.44.16/src/cypy/cyceval.pxd +15 -0
- picop-1.44.16/src/cypy/cycodecs.pxd +94 -0
- picop-1.44.16/src/cypy/cycodecs.pyi +69 -0
- picop-1.44.16/src/cypy/cycodecs.pyx +4 -0
- picop-1.44.16/src/cypy/cycomplex.pxd +70 -0
- picop-1.44.16/src/cypy/cycomplex.pyi +25 -0
- picop-1.44.16/src/cypy/cycomplex.pyx +4 -0
- picop-1.44.16/src/cypy/cycontextvars.pxd +74 -0
- picop-1.44.16/src/cypy/cycontextvars.pyi +37 -0
- picop-1.44.16/src/cypy/cycontextvars.pyx +2 -0
- picop-1.44.16/src/cypy/cyconversion.pxd +34 -0
- picop-1.44.16/src/cypy/cyconversion.pyi +13 -0
- picop-1.44.16/src/cypy/cyconversion.pyx +2 -0
- picop-1.44.16/src/cypy/cydatetime.pxd +256 -0
- picop-1.44.16/src/cypy/cydatetime.pyi +134 -0
- picop-1.44.16/src/cypy/cydatetime.pyx +8 -0
- picop-1.44.16/src/cypy/cydeque.pxd +15 -0
- picop-1.44.16/src/cypy/cydeque.pyi +5 -0
- picop-1.44.16/src/cypy/cydeque.pyx +2 -0
- picop-1.44.16/src/cypy/cydescr.pxd +13 -0
- picop-1.44.16/src/cypy/cydescr.pyi +5 -0
- picop-1.44.16/src/cypy/cydescr.pyx +4 -0
- picop-1.44.16/src/cypy/cydict.pxd +322 -0
- picop-1.44.16/src/cypy/cydict.pyi +88 -0
- picop-1.44.16/src/cypy/cydict.pyx +4 -0
- picop-1.44.16/src/cypy/cyerr.pxd +55 -0
- picop-1.44.16/src/cypy/cyfileobject.pxd +29 -0
- picop-1.44.16/src/cypy/cyfileobject.pyi +15 -0
- picop-1.44.16/src/cypy/cyfileobject.pyx +2 -0
- picop-1.44.16/src/cypy/cyfloat.pxd +59 -0
- picop-1.44.16/src/cypy/cyfloat.pyi +18 -0
- picop-1.44.16/src/cypy/cyfloat.pyx +4 -0
- picop-1.44.16/src/cypy/cyfunction.pxd +72 -0
- picop-1.44.16/src/cypy/cyfunction.pyi +41 -0
- picop-1.44.16/src/cypy/cyfunction.pyx +4 -0
- picop-1.44.16/src/cypy/cygc.pxd +43 -0
- picop-1.44.16/src/cypy/cygc.pyi +17 -0
- picop-1.44.16/src/cypy/cygc.pyx +4 -0
- picop-1.44.16/src/cypy/cygenobject.pxd +40 -0
- picop-1.44.16/src/cypy/cygenobject.pyi +13 -0
- picop-1.44.16/src/cypy/cygenobject.pyx +4 -0
- picop-1.44.16/src/cypy/cygetargs.pxd +9 -0
- picop-1.44.16/src/cypy/cyiterator.pxd +26 -0
- picop-1.44.16/src/cypy/cyiterator.pyi +14 -0
- picop-1.44.16/src/cypy/cyiterator.pyx +4 -0
- picop-1.44.16/src/cypy/cyiterobject.pxd +24 -0
- picop-1.44.16/src/cypy/cyiterobject.pyi +14 -0
- picop-1.44.16/src/cypy/cyiterobject.pyx +4 -0
- picop-1.44.16/src/cypy/cylist.pxd +204 -0
- picop-1.44.16/src/cypy/cylist.pyi +85 -0
- picop-1.44.16/src/cypy/cylist.pyx +4 -0
- picop-1.44.16/src/cypy/cylong.pxd +140 -0
- picop-1.44.16/src/cypy/cylong.pyi +62 -0
- picop-1.44.16/src/cypy/cylong.pyx +4 -0
- picop-1.44.16/src/cypy/cylongintrepr.pxd +32 -0
- picop-1.44.16/src/cypy/cymapping.pxd +78 -0
- picop-1.44.16/src/cypy/cymapping.pyi +43 -0
- picop-1.44.16/src/cypy/cymapping.pyx +2 -0
- picop-1.44.16/src/cypy/cymarshal.pxd +22 -0
- picop-1.44.16/src/cypy/cymarshal.pyi +7 -0
- picop-1.44.16/src/cypy/cymarshal.pyx +2 -0
- picop-1.44.16/src/cypy/cymem.pxd +62 -0
- picop-1.44.16/src/cypy/cymemoryview.pxd +110 -0
- picop-1.44.16/src/cypy/cymemoryview.pyi +24 -0
- picop-1.44.16/src/cypy/cymemoryview.pyx +4 -0
- picop-1.44.16/src/cypy/cymethod.pxd +71 -0
- picop-1.44.16/src/cypy/cymethod.pyi +21 -0
- picop-1.44.16/src/cypy/cymethod.pyx +4 -0
- picop-1.44.16/src/cypy/cymodule.pxd +132 -0
- picop-1.44.16/src/cypy/cymodule.pyi +59 -0
- picop-1.44.16/src/cypy/cymodule.pyx +4 -0
- picop-1.44.16/src/cypy/cynumber.pxd +210 -0
- picop-1.44.16/src/cypy/cynumber.pyi +114 -0
- picop-1.44.16/src/cypy/cynumber.pyx +4 -0
- picop-1.44.16/src/cypy/cyobject.pxd +237 -0
- picop-1.44.16/src/cypy/cyobject.pyi +86 -0
- picop-1.44.16/src/cypy/cyobject.pyx +4 -0
- picop-1.44.16/src/cypy/cypycapsule.pxd +65 -0
- picop-1.44.16/src/cypy/cypycapsule.pyi +10 -0
- picop-1.44.16/src/cypy/cypycapsule.pyx +2 -0
- picop-1.44.16/src/cypy/cypylifecycle.pxd +40 -0
- picop-1.44.16/src/cypy/cypyport.pxd +11 -0
- picop-1.44.16/src/cypy/cypystate.pxd +35 -0
- picop-1.44.16/src/cypy/cyrange.pxd +15 -0
- picop-1.44.16/src/cypy/cyrange.pyi +5 -0
- picop-1.44.16/src/cypy/cyrange.pyx +2 -0
- picop-1.44.16/src/cypy/cyref.pxd +68 -0
- picop-1.44.16/src/cypy/cysequence.pxd +209 -0
- picop-1.44.16/src/cypy/cysequence.pyi +70 -0
- picop-1.44.16/src/cypy/cysequence.pyx +4 -0
- picop-1.44.16/src/cypy/cyset.pxd +198 -0
- picop-1.44.16/src/cypy/cyset.pyi +88 -0
- picop-1.44.16/src/cypy/cyset.pyx +4 -0
- picop-1.44.16/src/cypy/cyslice.pxd +112 -0
- picop-1.44.16/src/cypy/cyslice.pyi +24 -0
- picop-1.44.16/src/cypy/cyslice.pyx +4 -0
- picop-1.44.16/src/cypy/cystr.pxd +418 -0
- picop-1.44.16/src/cypy/cystr.pyi +129 -0
- picop-1.44.16/src/cypy/cystr.pyx +8 -0
- picop-1.44.16/src/cypy/cythread.pxd +52 -0
- picop-1.44.16/src/cypy/cytime.pxd +48 -0
- picop-1.44.16/src/cypy/cytime.pyi +12 -0
- picop-1.44.16/src/cypy/cytime.pyx +2 -0
- picop-1.44.16/src/cypy/cytuple.pxd +137 -0
- picop-1.44.16/src/cypy/cytuple.pyi +49 -0
- picop-1.44.16/src/cypy/cytuple.pyx +4 -0
- picop-1.44.16/src/cypy/cytype.pxd +65 -0
- picop-1.44.16/src/cypy/cytype.pyi +17 -0
- picop-1.44.16/src/cypy/cytype.pyx +4 -0
- picop-1.44.16/src/cypy/cyunicode.pxd +80 -0
- picop-1.44.16/src/cypy/cyunicode.pyi +14 -0
- picop-1.44.16/src/cypy/cyunicode.pyx +4 -0
- picop-1.44.16/src/cypy/cyversion.pxd +12 -0
- picop-1.44.16/src/cypy/cyweakref.pxd +67 -0
- picop-1.44.16/src/cypy/cyweakref.pyi +22 -0
- picop-1.44.16/src/cypy/cyweakref.pyx +2 -0
- picop-1.44.16/src/cypy/hot.py +66 -0
- picop-1.44.16/src/cypy/protocols.py +26 -0
- picop-1.44.16/src/cypy/py.typed +0 -0
- picop-1.44.16/src/cypy/uuid/__init__.pxd +1 -0
- picop-1.44.16/src/cypy/uuid/__init__.py +7 -0
- picop-1.44.16/src/cypy/uuid/_uuid.pxd +33 -0
- picop-1.44.16/src/cypy/uuid/_uuid.pyi +64 -0
- picop-1.44.16/src/cypy/uuid/_uuid.pyx +346 -0
- picop-1.44.16/src/cypy/uuid/hex.h +52 -0
- picop-1.44.16/src/cypy/uuid/uuid.c +57 -0
- picop-1.44.16/src/cypy/uuid/uuid.h +26 -0
- picop-1.44.16/src/picop.egg-info/PKG-INFO +169 -0
- picop-1.44.16/src/picop.egg-info/SOURCES.txt +300 -0
- picop-1.44.16/src/picop.egg-info/dependency_links.txt +1 -0
- picop-1.44.16/src/picop.egg-info/requires.txt +8 -0
- picop-1.44.16/src/picop.egg-info/top_level.txt +1 -0
- picop-1.44.16/tests/test_core_containers.py +143 -0
- picop-1.44.16/tests/test_examples.py +31 -0
- picop-1.44.16/tests/test_exports.py +14 -0
- picop-1.44.16/tests/test_hot.py +183 -0
- picop-1.44.16/tests/test_protocols.py +84 -0
- picop-1.44.16/tests/test_uuid.py +394 -0
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
# cypy Coverage
|
|
2
|
+
|
|
3
|
+
Product contract for what `cypy` is, what it ships, and how to choose helpers.
|
|
4
|
+
|
|
5
|
+
`cypy` is **not** a reimplementation of the Python standard library, and it is **not** a full 1:1 port of Cython’s `Includes/cpython`. It is a curated **CPython C-API accelerator** for Cython on **Python ≥ 3.14**.
|
|
6
|
+
|
|
7
|
+
Authoritative symbol lists: `src/cypy/__init__.py` / `__init__.pxd` `__all__`, plus `cypy.hot` for micro-opt starters. Per-module decisions: [`docs/modules/`](docs/modules/).
|
|
8
|
+
Timed public-ops checklist: [`docs/OPS_INVENTORY.md`](docs/OPS_INVENTORY.md) (gate: `scripts/ops_inventory_coverage.py --strict`).
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## Product tiers
|
|
13
|
+
|
|
14
|
+
| Tier | Who | Import | Contents |
|
|
15
|
+
|------|-----|--------|----------|
|
|
16
|
+
| **Core** | Micro-opts / typed hot paths | `cypy.hot` (preferred) or `from cypy import …` | Typed containers, bytes/str, ANSI, GC toggles, string value ops |
|
|
17
|
+
| **Protocols** | Unknown concrete type | `cypy` / `cypy.cy*` | Abstract mapping/sequence/number/object bridges |
|
|
18
|
+
| **Runtime** | Extension / embedding authors | `cypy` public + **cimport** SDK | datetime, codecs, marshal, file, weakref, capsule, contextvars, thin clocks, process plumbing |
|
|
19
|
+
|
|
20
|
+
**Rule of thumb:** prefer **Core** when the type is known; use **Protocols** only when it is not; use **Runtime** for non-hot-path / embedding needs.
|
|
21
|
+
|
|
22
|
+
### Core (prefer for micro-opts)
|
|
23
|
+
|
|
24
|
+
| Module | Maps to | Surface | Notes |
|
|
25
|
+
|--------|---------|---------|--------|
|
|
26
|
+
| `cydict` | `dict` | public + cimport | `dict_get`, `dict_pop`, `dict_set`, `dict_len`, `dict_eq`, … |
|
|
27
|
+
| `cydeque` | `collections.deque` | public | `deque_eq` |
|
|
28
|
+
| `cyrange` | `range` | public | `range_eq` |
|
|
29
|
+
| `cylist` | `list` | public + cimport | `list_append`, `list_get` / `list_get_checked`, `list_len`, `list_eq`, … |
|
|
30
|
+
| `cyset` | `set` / `frozenset` | public + cimport | `set_add`, `set_contains`, `set_eq`, `frozenset_eq`, … |
|
|
31
|
+
| `cytuple` | `tuple` | public + cimport | `tuple_get`, `tuple_len`, `tuple_pack*`; builders mostly cimport |
|
|
32
|
+
| `cybytes` | `bytes` | public + cimport | `bytes_len`, `bytes_contains`, `bytes_eq`, `bytes_ne`, `bytes_startswith`, `bytes_endswith`, `bytes_bytearray_eq`; `bytes_as_string` cimport-only |
|
|
33
|
+
| `cybytearray` | `bytearray` | public + cimport | `bytearray_len`, `bytearray_eq`, `bytearray_ne`, `bytearray_contains`, `bytearray_from_object`, … |
|
|
34
|
+
| `cystr` | `str` value ops | public subset + cimport | `str_len`, `str_eq`, `str_cmp`, `str_lt`/`le`/`gt`/`ge`, `str_contains`, coerce helpers, … |
|
|
35
|
+
| `cyunicode` | UTF-8 / intern | public subset + cimport | `uintern`, `uutf8_bytes`; `unicode_from_string` / `uutf8` cimport |
|
|
36
|
+
| `cyansi` | terminal SGR | public | Not CPython; builds on unicode intern |
|
|
37
|
+
| `cygc` | GC | public | `gc_collect`, `gc_is_enabled`, … |
|
|
38
|
+
| `cyarray` / `cymemoryview` / `cybuffer` / `cyslice` | buffers / slice | public | `array_eq` / `array_ne`; `memoryview_eq` / `memoryview_ne`; `buf_eq`; `slice_eq`; sequences/buffers adjacent to Core |
|
|
39
|
+
|
|
40
|
+
**Curated starter export:** [`cypy.hot`](src/cypy/hot.py) — see [`examples/STARTER.md`](examples/STARTER.md).
|
|
41
|
+
|
|
42
|
+
### 1.0 freeze (Core + cimport contracts)
|
|
43
|
+
|
|
44
|
+
As of **`1.0.0`**:
|
|
45
|
+
|
|
46
|
+
| Surface | Frozen? | Contract |
|
|
47
|
+
|---------|---------|----------|
|
|
48
|
+
| `cypy.__all__` | **Yes** | Core star-import / discovery set — additive in minors; drop/rename/semantic change → major |
|
|
49
|
+
| `cypy.hot.__all__` | **Yes** | Micro-opt marketing set — same policy |
|
|
50
|
+
| Full public barrel (`from cypy import name` beyond `__all__`) | Protocols/Runtime **provisional** | Still importable; may evolve under minors (see CHANGELOG) |
|
|
51
|
+
| `cimport cypy` / `from cypy.cy* cimport …` | **Documented SDK** | Wider than Python; per-module **Surface** + inventory in [`docs/modules/`](docs/modules/) are authoritative |
|
|
52
|
+
| Core names that are also `cpdef`/`cdef` | **Yes** | Same symbol, same semantics as public Core |
|
|
53
|
+
| `cdef`-only helpers (builders, unique-ref fill, C-string keys, borrow pointers, …) | **Documented cimport** | Keep for Cython; never promote to pure-Python without a minor; demote/remove → major after advertise |
|
|
54
|
+
| Soft letter/bare/`*_string` (post-0.3) | Implementation only | Not a public or cimport *product* contract; prefer word-prefix / `*_cstr` |
|
|
55
|
+
|
|
56
|
+
**Authoritative lists:** `src/cypy/__init__.py` / `hot.py` `__all__`, `src/cypy/__init__.pxd` + `cy*.pxd`, tracker inventories.
|
|
57
|
+
|
|
58
|
+
### Protocols (typed unknown)
|
|
59
|
+
|
|
60
|
+
| Module | Prefer instead when typed | Notes |
|
|
61
|
+
|--------|---------------------------|--------|
|
|
62
|
+
| `cymapping` | `cydict` | `map_*` / `map_eq` — checks often win; prefer typed `dict_eq` |
|
|
63
|
+
| `cysequence` | `cylist` / `cytuple` | `sq*` / `seq_eq` — prefer typed `list_eq`/`tuple_eq` |
|
|
64
|
+
| `cynumber` | `cylong` / `cyfloat` / `cycomplex` / `cybool` | Binary ops often lose; prefer typed `long_eq` / `float_eq` / `complex_eq` / `bool_eq` when known; `num_eq` for protocol bridges |
|
|
65
|
+
| `cyobject` | typed module above | Last resort attr/item/call bridges; `obj_eq` via RichCompareBool (not `hot`) |
|
|
66
|
+
|
|
67
|
+
### Runtime (public and/or cimport)
|
|
68
|
+
|
|
69
|
+
| Module | Surface | Notes |
|
|
70
|
+
|--------|---------|--------|
|
|
71
|
+
| `cydatetime`, `cycodecs`, `cymarshal`, `cyfileobject`, `cyweakref`, `cypycapsule`, `cycontextvars` | public (+ some cimport) | Higher-level C-API bridges; `dt_*_eq` / `capsule_eq` / `weakref_eq` / `context_eq` on `cypy` (not `hot`); see `docs/EQ_RUNTIME.md` |
|
|
72
|
+
| `cytime` | public | Thin `time_wall` / `time_time` / `time_monotonic` / `time_perf_counter` — **Runtime**, not Core (`cypy.hot` excludes them). Prefer stdlib `time` unless you need these wrappers; prefer `time_wall` over stutter `time_time`. |
|
|
73
|
+
| `cyfunction`, `cymethod`, `cymodule`, `cyiterator`, `cyiterobject`, `cygenobject`, `cycellobject`, `cydescr`, `cytype`, `cylong`, `cyfloat`, … | public | Object-model / scalar helpers; `func_eq` / `method_eq` / `mod_eq` / `gen_eq` / `iter_eq` / `type_eq` identity-or-richcompare / `cell_eq` content (not `hot`) |
|
|
74
|
+
| `cyerr`, `cymem`, `cythread`, `cyatomic`, `cyref`, `cygetargs`, `cyceval`, `cypystate`, `cypylifecycle`, `cypyport`, `cyversion`, `cylongintrepr` | **cimport only** | Embedding / process footguns — not pure-Python |
|
|
75
|
+
| `cyinstance` | **none** | Classic-class ABI gone on 3.14 |
|
|
76
|
+
|
|
77
|
+
---
|
|
78
|
+
|
|
79
|
+
## Import surfaces
|
|
80
|
+
|
|
81
|
+
| Entry | Role |
|
|
82
|
+
|-------|------|
|
|
83
|
+
| `from cypy.hot import …` | **Core marketing surface** — micro-opt starters |
|
|
84
|
+
| `import cypy` / `from cypy import …` | Full public barrel; Core discovery via `__all__` (frozen at 1.0) |
|
|
85
|
+
| `from cypy.cydict import dget` | Module-scoped public |
|
|
86
|
+
| `cimport cypy` / `from cypy.cydict cimport …` | **Full Cython SDK** (wider than Python; includes cimport-only) |
|
|
87
|
+
|
|
88
|
+
Discourage `from cypy import *`.
|
|
89
|
+
|
|
90
|
+
---
|
|
91
|
+
|
|
92
|
+
## Overlap decision tree
|
|
93
|
+
|
|
94
|
+
```
|
|
95
|
+
Known concrete type?
|
|
96
|
+
dict → cydict (dict_get, dict_len, …)
|
|
97
|
+
list → cylist
|
|
98
|
+
tuple → cytuple
|
|
99
|
+
set → cyset
|
|
100
|
+
bytes → cybytes
|
|
101
|
+
str → cystr value ops; encode/intern → cyunicode
|
|
102
|
+
Unknown mapping / sequence / number-like?
|
|
103
|
+
→ cymapping / cysequence / cynumber
|
|
104
|
+
Still too dynamic?
|
|
105
|
+
→ cyobject (last resort)
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
**Do not merge modules** (C-API includes differ). Trackers already say “prefer typed when known.”
|
|
109
|
+
|
|
110
|
+
**Playbook examples:** [`py_overlap_mapping_vs_dict.py`](examples/py_overlap_mapping_vs_dict.py),
|
|
111
|
+
[`py_overlap_sequence_vs_list.py`](examples/py_overlap_sequence_vs_list.py),
|
|
112
|
+
[`py_overlap_str_vs_unicode.py`](examples/py_overlap_str_vs_unicode.py).
|
|
113
|
+
|
|
114
|
+
### String family (two layers, one product)
|
|
115
|
+
|
|
116
|
+
| Layer | Module | Role |
|
|
117
|
+
|-------|--------|------|
|
|
118
|
+
| Value ops on `str` | `cystr` | len/eq/contains/concat/coerce/… |
|
|
119
|
+
| Encode / intern / borrow | `cyunicode` | `uintern`, `uutf8_bytes`, cimport `unicode_from_string` / `uutf8` |
|
|
120
|
+
|
|
121
|
+
### Naming conventions (N3 + N4)
|
|
122
|
+
|
|
123
|
+
| Rule | Prefer | Notes |
|
|
124
|
+
|------|--------|-------|
|
|
125
|
+
| Checks | `{type}_check` / `{type}_check_exact` | Subtype vs exact; `str_is` ≡ `str_check_exact` |
|
|
126
|
+
| Length | `*_len(typed)` vs `*_size(object)` | Macro/unchecked vs checked — **semantic twins**, never identity |
|
|
127
|
+
|
|
128
|
+
Full table: [`docs/NAMING.md`](docs/NAMING.md). Removed soft aliases (0.3+): [`cypy.compat.COMPAT_MAP`](src/cypy/compat.py).
|
|
129
|
+
|
|
130
|
+
### Category facades (optional discovery)
|
|
131
|
+
|
|
132
|
+
| Import | Contents |
|
|
133
|
+
|--------|----------|
|
|
134
|
+
| `cypy.hot` | Micro-opt starters (preferred; **Core frozen**) |
|
|
135
|
+
| `cypy.containers` | dict / list / set / tuple (Core-adjacent) |
|
|
136
|
+
| `cypy.buffers` | bytes / bytearray / array / memoryview / buffer / slice |
|
|
137
|
+
| `cypy.protocols` | mapping / sequence / number / object — **provisional** after 1.0 |
|
|
138
|
+
|
|
139
|
+
---
|
|
140
|
+
|
|
141
|
+
## Layers (implementation)
|
|
142
|
+
|
|
143
|
+
| Layer | Entry | Role |
|
|
144
|
+
|-------|--------|------|
|
|
145
|
+
| Public Python | `__init__.py`, `hot.py` | Callable helpers |
|
|
146
|
+
| Cython cimport | `__init__.pxd`, `cy*.pxd` | Wider SDK |
|
|
147
|
+
| Implementation | `cy*.pxd` (+ `.pyx`) | Inline C-API wrappers |
|
|
148
|
+
|
|
149
|
+
---
|
|
150
|
+
|
|
151
|
+
## Not a goal
|
|
152
|
+
|
|
153
|
+
- Full Cython `cpython.*` parity or full Python stdlib (`json`, `os`, `re`, `asyncio`, …)
|
|
154
|
+
- Restoring builtin monkey-patches ([`docs/future/MONKEY.md`](docs/future/MONKEY.md))
|
|
155
|
+
- Treating Protocol/Runtime losers as Core micro-opt defaults
|
|
156
|
+
|
|
157
|
+
Historical note: an older tree lived as `cycel.core.cpy`. **`cytime` ships in cypy as Runtime** (not deferred to `cycel.time`). Broader clock/RFC utilities may still live in sibling packages.
|
|
158
|
+
|
|
159
|
+
---
|
|
160
|
+
|
|
161
|
+
## Related
|
|
162
|
+
|
|
163
|
+
- Install / smoke: [`README.md`](README.md)
|
|
164
|
+
- Safety / footguns: [`docs/SAFETY.md`](docs/SAFETY.md)
|
|
165
|
+
- Naming: [`docs/NAMING.md`](docs/NAMING.md)
|
|
166
|
+
- Compatibility / release: [`docs/RELEASE.md`](docs/RELEASE.md)
|
|
167
|
+
- Trackers: [`docs/modules/`](docs/modules/) · Status (complete): [`docs/README.md`](docs/README.md#status-complete--not-an-open-backlog)
|
picop-1.44.16/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 ckirua
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
|
13
|
+
all copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
21
|
+
THE SOFTWARE.
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright [yyyy] [name of copyright owner]
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
include README.md
|
|
2
|
+
include COVERAGE.md
|
|
3
|
+
include pyproject.toml
|
|
4
|
+
include setup.py
|
|
5
|
+
graft src
|
|
6
|
+
graft examples
|
|
7
|
+
graft docs
|
|
8
|
+
prune examples/cimport_ext/build
|
|
9
|
+
exclude examples/cimport_ext/demo.c
|
|
10
|
+
global-exclude *.o
|
|
11
|
+
global-exclude *.so *.pyc *.pyo
|
|
12
|
+
global-exclude __pycache__
|
|
13
|
+
global-exclude .git*
|
picop-1.44.16/NOTICE
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
cypy
|
|
2
|
+
|
|
3
|
+
Portions of cypy.uuid are adapted from the asyncpg project by
|
|
4
|
+
MagicStack Inc. and contributors.
|
|
5
|
+
|
|
6
|
+
Copyright (C) 2016-present the asyncpg authors and contributors
|
|
7
|
+
|
|
8
|
+
The original asyncpg portions are licensed under the Apache License,
|
|
9
|
+
Version 2.0. A copy is provided in LICENSES/Apache-2.0.txt.
|
|
10
|
+
|
|
11
|
+
This attribution and the Apache License apply only to those adapted portions;
|
|
12
|
+
they do not license cypy as a whole under Apache-2.0. cypy's primary license
|
|
13
|
+
remains MIT as stated in LICENSE.
|
picop-1.44.16/PKG-INFO
ADDED
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: picop
|
|
3
|
+
Version: 1.44.16
|
|
4
|
+
Summary: Fast CPython C-API helpers and C-backed UUID values for Cython
|
|
5
|
+
Author-email: ckirua <aquipongoalgo.dsz@gmail.com>
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/ckirua/cypy
|
|
8
|
+
Project-URL: Repository, https://github.com/ckirua/cypy
|
|
9
|
+
Project-URL: Issues, https://github.com/ckirua/cypy/issues
|
|
10
|
+
Project-URL: Documentation, https://github.com/ckirua/cypy#readme
|
|
11
|
+
Keywords: cython,cpython,c-api,performance,dict,str,bytes,uuid
|
|
12
|
+
Classifier: Development Status :: 4 - Beta
|
|
13
|
+
Classifier: Intended Audience :: Developers
|
|
14
|
+
Classifier: Operating System :: OS Independent
|
|
15
|
+
Classifier: Programming Language :: Cython
|
|
16
|
+
Classifier: Programming Language :: Python :: 3
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
18
|
+
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
19
|
+
Classifier: Topic :: Software Development :: Libraries
|
|
20
|
+
Classifier: Typing :: Typed
|
|
21
|
+
Requires-Python: >=3.14
|
|
22
|
+
Description-Content-Type: text/markdown
|
|
23
|
+
License-File: LICENSE
|
|
24
|
+
License-File: LICENSES/Apache-2.0.txt
|
|
25
|
+
License-File: NOTICE
|
|
26
|
+
Requires-Dist: Cython
|
|
27
|
+
Requires-Dist: picobuild
|
|
28
|
+
Provides-Extra: dev
|
|
29
|
+
Requires-Dist: pytest>=8.0.0; extra == "dev"
|
|
30
|
+
Requires-Dist: pyperf>=2.10.0; extra == "dev"
|
|
31
|
+
Requires-Dist: build; extra == "dev"
|
|
32
|
+
Requires-Dist: twine; extra == "dev"
|
|
33
|
+
Dynamic: license-file
|
|
34
|
+
|
|
35
|
+
# cypy
|
|
36
|
+
|
|
37
|
+
Fast CPython C-API helpers for Cython — typed hot-path wrappers plus C-backed UUID values.
|
|
38
|
+
|
|
39
|
+
Requires **Python ≥ 3.14**. Map of what is covered: [`COVERAGE.md`](COVERAGE.md). Primary license: [`LICENSE`](LICENSE) (MIT); adapted UUID portions retain their notices in [`NOTICE`](NOTICE) and [`LICENSES/Apache-2.0.txt`](LICENSES/Apache-2.0.txt). Contributing: [`CONTRIBUTING.md`](CONTRIBUTING.md). Security: [`SECURITY.md`](SECURITY.md). Safety / footguns: [`docs/SAFETY.md`](docs/SAFETY.md). Contributor process lives under [`docs/`](docs/) (not required for end users).
|
|
40
|
+
|
|
41
|
+
## Install
|
|
42
|
+
|
|
43
|
+
PyPI distribution name is **`picop`**; the import package remains **`cypy`**.
|
|
44
|
+
|
|
45
|
+
### From PyPI
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
pip install picop
|
|
49
|
+
# pin: pip install "picop==1.44.16"
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
Build deps (`setuptools`, `wheel`, `Cython`, `picobuild`) are pulled via `pyproject.toml` `[build-system]`. Source installs need a C toolchain and OpenSSL headers (`libssl-dev` on Debian/Ubuntu).
|
|
53
|
+
|
|
54
|
+
### From git (users)
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
pip install "picop @ git+https://github.com/ckirua/cypy.git@v1.44.16"
|
|
58
|
+
# or unpinned tip of main:
|
|
59
|
+
# pip install "git+https://github.com/ckirua/cypy.git"
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
### Editable (contributors)
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
python3.14 -m venv .venv
|
|
66
|
+
source .venv/bin/activate
|
|
67
|
+
pip install setuptools wheel Cython picobuild
|
|
68
|
+
pip install -e . --no-build-isolation
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
Release builds are **portable** by default (`-O3` only). For local microbenches that want CPU-tuned code:
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
CPY_NATIVE=1 pip install -e . --no-build-isolation
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
### Build artifacts
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
pip install build
|
|
81
|
+
python -m build # sdist + wheel under dist/
|
|
82
|
+
# package_data ships .pxd / .pyi / py.typed / headers for cimport + typing
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
Optional typecheck smoke (after install):
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
# requires pyright or mypy
|
|
89
|
+
pyright -c 'from cypy.hot import dict_get, list_append' # or:
|
|
90
|
+
python -c "from cypy.hot import dict_get, list_len; reveal_type = print" # stubs via py.typed
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
## Smoke
|
|
94
|
+
|
|
95
|
+
Prefer the curated starters module for micro-opts:
|
|
96
|
+
|
|
97
|
+
```python
|
|
98
|
+
from cypy.hot import bytes_len, dict_get, list_len, str_len
|
|
99
|
+
|
|
100
|
+
assert bytes_len(b"ok") == 2
|
|
101
|
+
assert str_len("hi") == 2
|
|
102
|
+
assert dict_get({"a": 1}, "a") == 1
|
|
103
|
+
assert list_len([1, 2]) == 2
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
Also supported: `from cypy.cydict import dict_get` / `from cypy import dict_get`, and Cython `cimport`. Soft letter/bare aliases were removed in **0.3** — use preferred names. Prefer a release-tag pin. Avoid `from cypy import *`.
|
|
107
|
+
|
|
108
|
+
Cython: both **`from cypy cimport …`** (package barrel) and **`from cypy.cybytes cimport …`** (submodule) work after install. Out-of-tree regression: [`examples/cimport_ext/`](examples/cimport_ext/) / `bash scripts/smoke_barrel_cimport.sh`.
|
|
109
|
+
|
|
110
|
+
Full public surface remains on `from cypy import …` / `cypy.cy*`.
|
|
111
|
+
|
|
112
|
+
**Footgun:** C-string helpers take **`bytes`**, not `str`. Prefer `*_cstr` (`map_getitem_cstr`) — see `examples/py_cstr_bytes.py`. Broader trusted-caller notes (unchecked OOB, borrowed pointers, `marshal_loads`): [`docs/SAFETY.md`](docs/SAFETY.md).
|
|
113
|
+
|
|
114
|
+
## UUID values
|
|
115
|
+
|
|
116
|
+
`cypy.uuid` provides matching Python and Cython entry points:
|
|
117
|
+
|
|
118
|
+
```python
|
|
119
|
+
from cypy.uuid import UUID, uuid4, uuid4_bytes
|
|
120
|
+
|
|
121
|
+
value = uuid4()
|
|
122
|
+
raw = uuid4_bytes()
|
|
123
|
+
assert UUID(raw).version == 4
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
```cython
|
|
127
|
+
from cypy.uuid cimport UUID, uuid4, uuid4_bytes
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
The C-backed `UUID` is final, accepts 32–36 character hexadecimal text or
|
|
131
|
+
exactly 16 bytes, and remains a stdlib-compatible `uuid.UUID` value. Generation
|
|
132
|
+
uses per-thread buffered OpenSSL entropy with fork-child invalidation.
|
|
133
|
+
|
|
134
|
+
## Examples
|
|
135
|
+
|
|
136
|
+
Runnable scripts after install — see [`examples/README.md`](examples/README.md):
|
|
137
|
+
|
|
138
|
+
```bash
|
|
139
|
+
python examples/pyhot.py
|
|
140
|
+
python examples/pybytes.py
|
|
141
|
+
python examples/pydict.py
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
## Compatibility
|
|
145
|
+
|
|
146
|
+
**1.0 policy:** **Core** (`cypy.__all__` + `cypy.hot`) and documented cimport contracts are frozen. Soft aliases were removed in **0.3**. Protocols / Runtime remain provisional under minors. See [`docs/RELEASE.md`](docs/RELEASE.md). Semantic twins like `dict_len`/`dict_size` stay dual (never identity-aliased). Prefer pin: `pip install "picop==1.44.16"`.
|
|
147
|
+
|
|
148
|
+
Product tiers (Core / Protocols / Runtime): [`COVERAGE.md`](COVERAGE.md).
|
|
149
|
+
|
|
150
|
+
## Benchmarks
|
|
151
|
+
|
|
152
|
+
See [`bench/BENCH.md`](bench/BENCH.md). Quick Tier A run:
|
|
153
|
+
|
|
154
|
+
```bash
|
|
155
|
+
./bench/small.sh
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
## Docs
|
|
159
|
+
|
|
160
|
+
| Doc | Audience |
|
|
161
|
+
|-----|----------|
|
|
162
|
+
| This README + [`examples/`](examples/) | External users |
|
|
163
|
+
| [`COVERAGE.md`](COVERAGE.md) | What the library covers / does not (product map) |
|
|
164
|
+
| [`CONTRIBUTING.md`](CONTRIBUTING.md) | Setup, checks, PR / freeze policy |
|
|
165
|
+
| [`SECURITY.md`](SECURITY.md) | Vulnerability reporting |
|
|
166
|
+
| [`docs/SAFETY.md`](docs/SAFETY.md) | Trusted-caller footguns |
|
|
167
|
+
| [`docs/`](docs/) | Contributor pipeline, status, module trackers |
|
|
168
|
+
|
|
169
|
+
Builtin monkey-patch experiments are **archived** under [`docs/future/MONKEY.md`](docs/future/MONKEY.md) and are **not** part of the package.
|