Skip to content

Binary mode writes Boolean and Binary attribute values as Python reprs #335

Backlog

Description

@EmiRZx

Expected Behavior

binary mode writes attribute values in the type system's string form, Boolean as true or false and Binary as Base64.

Actual Behavior

the core HTTP, Kafka and RabbitMQ bindings use str(). False is written as False and b"\x01\x02" as b'\x01\x02' instead of AQI=. AMQP keeps native types and isn't affected.

Steps to Reproduce the Problem

  1. create a CloudEvent with extensions flag=False and blob=b"\x01\x02"
  2. call cloudevents.core.bindings.http.to_binary(event, JSONFormat())
  3. the headers contain ce-flag: False and ce-blob: b'\x01\x02'

Specifications

  • Platform: any
  • Python Version: 3.14

fix in #336.

Activity

  1. xSAVIKx commented on Dec 2, 2026

    @xSAVIKx
    Member

    @EmiRZx please use issue templates when creating the issues moving forward. Thanks

  2. added theissue type on Dec 2, 2026
  3. EmiRZx commented on Dec 2, 2026

    @EmiRZx
    Author

    updated the description to the template, will use it from now on.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions