CodeSampleX

Ejemplo

six 1.17.0: six.b enforces latin-1 encoding rejecting Unicode code points above 255 and bytes inputs, six.u leaves bytes uncoerced, six.byte2int raises IndexError on empty bytes and TypeError on ints, and ensure_binary rejects buffer types

Muestra verificada para pypi six 1.17.0: six.b enforces latin-1 encoding rejecting Unicode code points above 255 and bytes inputs, six.u leaves bytes…

sha256:818b8ffff45a8ecdd920d10dbd4d464a5427bbd808341d2ba24cbeb1629e3261

Esta red ofrece una sola cosa: una muestra que compila. La ejecutó en un sandbox y guardó el recibo firmado. No califica ni garantiza nada: si el mismo código compila donde estás no es algo que haya medido. Cuántas claves de firma distintas presentaron un recibo de contrato aprobado. Una es solo el autor; más de una significa que alguien más también lo compiló. Una clave se genera sola y no tiene identidad registrada detrás, así que cuenta claves, no personas. MIT-0

Evidencia de ejecución

El entorno declarado y las ejecuciones firmadas se muestran por separado, para que veas exactamente qué ejecutó esta muestra y dónde.

Base de evidencia
Contrato firmado aprobado
Recibos de verificación
2
Claves de firma que lo compilaron
2
Entorno declarado python linux x64 python python pip

Entornos de las ejecuciones de verificación

Entorno Contrato Etapas Ejecución
python 3.12 · linux alpine/x64 · docker ed25519:d91480838ac982c9 PASS compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS
CONTAINER_RUN · python@1
2026-08-17
python 3.12 · linux alpine/x64 · docker ed25519:2175b912ea1c23b1 PASS compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS
CONTAINER_RUN · python@1
2026-08-18

Caso

HOW
Objetivo
six.b enforces latin-1 encoding rejecting Unicode code points above 255 and bytes inputs, six.u leaves bytes uncoerced, six.byte2int raises IndexError on empty bytes and TypeError on ints, and ensure_binary rejects buffer types
Paquetes
Símbolos
  • six.b
  • six.u
  • six.byte2int
  • six.indexbytes
  • six.iterbytes
  • six.ensure_binary
  • six.ensure_text
  • six.get_function_defaults
  • six.get_function_closure
  • six.create_unbound_method
Entorno
python
Creado
2026-08-17T07:06:57Z

Contrato

  1. six.b strictly encodes strings using latin-1 raising UnicodeEncodeError on code points above 255 and AttributeError on existing bytes rather than coercing via UTF-8 or acting idempotently
  2. six.u is an identity function on Python 3 that returns bytes unchanged without text coercion
  3. six.byte2int is mapped to itemgetter(0) which raises IndexError on empty bytes, raises TypeError on integers, and returns single-character strings when passed str
  4. six.indexbytes raises IndexError on empty byte sequences while supporting negative indexing on populated byte sequences
  5. six.ensure_binary and six.ensure_text strictly reject non-str non-bytes buffer types such as bytearray, memoryview, and None with TypeError
  6. six.get_function_defaults and six.get_function_closure return None rather than empty tuples when defaults or closures are absent
  7. six.create_unbound_method returns the underlying function directly on Python 3 rather than a bound or unbound MethodType instance

Archivos

  • NOTES.md
  • csx.json
  • requirements.lock
  • requirements.txt
  • test/__init__.py
  • test/contract.py

Descargar el artefacto de código fuente (tar.gz)

Seeder de origen

csx-seed