mara004

Results 316 comments of mara004

> is this realistic without adding a whole abstraction layer over this? Not sure what you mean -- why isn't it sufficient to just move [the order check](https://github.com/python-attrs/attrs/blob/ae7340966c12b9d6525f0c2fc413b997dc294e66/src/attr/_make.py#L449) after the...

I was under the impression the idea was to merge the licenses folders? For otherwise, you could as well have shipped multiple aggregated license files along with the builds...

That's expected, as one of marker's dependencies (pypdfium2/pdfium) is not thread-compatible: It is the caller's responsibility to use locks or similar to prevent threaded access of pdfium's APIs. https://pypdfium2.readthedocs.io/en/stable/python_api.html#thread-incompatibility

> I have already used a thread lock during parsing, but the core dump occurred during GC Hmm, pypdfium2 auto-closes pdfium objects on garbage collection using [`weakref.finalize()`](https://docs.python.org/3/library/weakref.html#weakref.finalize), if the caller...

@aj8907 Sorry, I'm not much into threading, but I don't logically see how this is supposed to fix the above issue? Why is a plain RLock not sufficient? > The...

> how can i resolve the problem? You could try patching your lock into pypdfium2's `_close_template` function and see if that fixes the crash. Again, a minimal reproducible example would...

Looks like some caller tries to pass a `PdfDocument` instance as input to a new `PdfDocument`, which is nonsense. If you already have a document handle, use it. *Update: see...

Alternatively or complementarily, aggregating a universal license file might work, with comments for the build-specific dependencies (e.g. "V8 only").

I took a stab at this in #357. The directory layout setuptools gives us is a bit nasty, though: ```bash $ cd ~/.local/lib/python3.11/site-packages/pypdfium2-*.dist-info/ $ tree licenses/ licenses/ ├── data │  ...

The V8 builds also support XFA, e.g. [pdfium-v8-win-x64.tgz](https://github.com/bblanchon/pdfium-binaries/releases/latest/download/pdfium-v8-win-x64.tgz). See https://github.com/bblanchon/pdfium-binaries/issues/105#issuecomment-1676016471 for how to initialize XFA.