Skip to content

ndb.key.urlsafe() should return a string not bytes #71

@martin-green

Description

@martin-green

Expected Behavior

When calling ndb.key.urlsafe() you should get a string that can be concatenated with other strings.

Actual Behavior

Currently it return bytes so you need to add .decode() on every call to urlsafe()

Steps to Reproduce the Problem

  1. On a ndb.Model derived class do: x.key.urlsafe() + ''
  2. this will generate a runtime error: TypeError: can only concatenate str (not "bytes") to str

Specifications

  • Version: 1.0.0
  • Platform: Ubuntu 20.04 (wsl2)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions