hpy icon indicating copy to clipboard operation
hpy copied to clipboard

HPy: a better API for Python

Results 69 hpy issues
Sort by recently updated
recently updated
newest added

The use of CPython internals inside HPy code is problematic. Building in the universal mode should probably define the limited API. Otherwise the universal binaries will not really be universal,...

Currently HPy just copies `HPyType_Spec` flags to `PyType_Spec`: ``` // ctx_type.c: (simplified) spec->flags = hpyspec->flags; ``` and the user is expected to use at least `HPy_TPFLAGS_DEFAULT` in their `HPyType_Spec`, which...

I’m running more and more into the situation where we want to add user-visible API functions (e.g. `HPyCapsule_GetContext` ind PR #308 ) but map them to a more generic context...

Right now, we are adding source files `argparse.c`, `buildvalue.c`, and `helpers.c` to the source file list of the HPy extension to be built and then they are compiled together with...

bug

In CPython, there are usually macros like: ``` #define PySomething_Check(op) PyObject_TypeCheck(op, &PySomething_Type) #define PySomething_CheckExact(op) (Py_TYPE(op) == &PySomething_Type) ``` That translates to following in HPy: ``` // PySomething_Check HPy_TypeCheck(ctx, h_obj, h_type)...

Currently this is the contract in CPython and GraalPython backends. There seems to be no documentation of `HPy_Close` that would say which is correct. We should make a decision and...

Currently, `HPyField_Load()` segfaults when the field is `HPyField_NULL`, which is annoying to handle. I see 2 options: * `HPyField_Load` should return `HPy_NULL` for a null field. * Leave `HPyField_Load` unchanged,...

One of the microbenchmarks described in #263 ([initialize](https://github.com/hpyproject/piconumpy/blob/microbench_loop_sum/bench/microbench_low_level/result_initialize.md)) shows that instantiations/deletions of small HPy/piconumpy array is slow compared to the creating/deleting the equivalent lists with PyPy (more than 10 times...

In https://github.com/hpyproject/hpy/issues/263, @steve-s discovered that the line `HPyErr_SetString(ctx, ctx->h_IndexError, "index out of range");` leads to a performance issue for code looping over a array defined with HPy (in practice a...

At this point, if HPy detects an issue in the debug mode, it prints a generic message and aborts the process(*). It should provide more context to help with debugging...