Skip to content

JSExternalStrings we create from PyUnicodeObjects that pass back to python should become the same PyUnicodeObject #299

@zollqir

Description

@zollqir

Issue type

Bug

How did you install PythonMonkey?

None

OS platform and distribution

No response

Python version (python --version)

No response

PythonMonkey version (pip show pythonmonkey)

No response

Bug Description

While the JSStringProxy does correctly use the underlying char buffer, a JSExternalString proxying a python string should just become that exact string object when it passes back to python, rather than a proxy of a proxy.

Standalone code to reproduce the issue

import pythonmonkey as pm
a = "this is a string"
b = pm.eval("(str) => str")(a)
assert a is b

Relevant log output or backtrace

No response

Additional info if applicable

No response

What branch of PythonMonkey were you developing on? (If applicable)

wes/DCP-4054/make-dcp-client-grok-pythonmonkey

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Status

Done

Relationships

None yet

Development

No branches or pull requests

Issue actions