Git Product home page Git Product logo

zaml's People

Contributors

adamserafini avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

zaml's Issues

Implicit python version dependency from ob_refcnt change?

Replicating build with zig 0.10.0 at commit 9adce96 (e.g., your talk) on Windows, I experience the following issue when running via pip install:

ร— Building wheel for zaml (pyproject.toml) did not run successfully.
  โ”‚ exit code: 1
  โ•ฐโ”€> [15 lines of output]
      running bdist_wheel
      running build
      running build_ext
      zig build-lib -O ReleaseFast -lc -target x86_64-windows-msvc -femit-bin=build\lib.win-amd64-cpython-312\zaml.cp312-win_amd64.pyd -fallow-shlib-undefined -dynamic -I%PYPATH%\Python312\include -I%PYPATH%\Python312\Include -L%PYPATH%\Python312\Libs -lpython3 zamlmodule.zig
      zamlmodule.zig:39:26: error: no field named 'ob_refcnt' in struct '%ZIGPATH%.zig.o.f50a540243561e8d55a8f2208b6843e4.cimport.struct__object'
                  .ob_refcnt = 1,
                               ^
      %ZIGPATH%\o\f50a540243561e8d55a8f2208b6843e4\cimport.zig:2324:35: note: struct declared here
      pub const struct__object = extern struct {
                                 ~~~~~~~^~~~~~
      referenced by:
          PyInit_zaml: zamlmodule.zig:57:29
          remaining reference traces hidden; use '-freference-trace' to see all reference traces

      error: command '%ZIGPATH%\\zig.EXE' failed with exit code 1
      [end of output]

My best guess is, the C API changed some time around 3.10/3.11 (I'm on 3.12): https://docs.python.org/3/c-api/refcounting.html

If you'd be so kind as to let me know what version of Python you were using, I can try to replicate and narrow this down to the point where I can take a stab at a fix and/or update.

Alternative explanations include specific zig cimport implementations (zigup applied v0.10.0 with f50a5402) but the issue seems consistent across zig versions so I suspect this is less likely.

TypeError: load() takes no arguments (1 given)

Hej,

indeed, the default yaml loader is slow!
Before I go ahead and start to parse strings manually, I wanted to give your lib a go!

Thanks for trying to fix this!

I was trying to replace
yaml.load(output, Loader=CLoader)
with
yaml_obj = zaml.load(output)

but got the following error:

Traceback (most recent call last):
  File "./glljobstat_testing.py", line 508, in <module>
    JobStatsParser().RunBEO()
  File "./glljobstat_testing.py", line 498, in RunBEO
    self.run_once_retry(HOSTS, STATSPARAM, SSHUSER, SSHKEY, SSHKEYTYPE, "stats", HOSTPARAM)
  File "./glljobstat_testing.py", line 392, in run_once_retry
    return self.run_once_ser(HOSTS, STATSPARAM, SSHUSER, SSHKEY, SSHKEYTYPE, TYPE, HOSTPARAM)
  File "./glljobstat_testing.py", line 329, in run_once_ser
    obj = self.parse_single_job_stats(data)
  File "./glljobstat_testing.py", line 225, in parse_single_job_stats
    yaml_obj = zaml.load(output)
TypeError: load() takes no arguments (1 given)

I installed zaml into my venv with:
python3 -m pip install zaml

Any suggestions on how to solve this?

Thanks a lot,
Bjoern

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.