Commit Graph

6 Commits

Author SHA1 Message Date
Gyeongjae Choi b1256c0a22
Rename setup.py in coolprop (#4145)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-09-19 20:33:58 +09:00
Hood Chatham e19621d483
ENH Rework streams handling (#4035)
This fixes a number problems with the old stream handling:

1. Not possible to set a custom errno (necessary for proper interrupt
   handling and possibly for other things)

2. Inefficient: in a lot of cases we have data in one buffer and we need
   it placed into a different buffer, but we have to implement a function
   that gets one byte out of the source buffer and then call it repeatedly
   to move one byte at a time to the target buffer.

3. Ease of implementation: in many cases we already have perfectly good
   buffer manipulation APIs, so if we have direct access to the true source
   or target buffer we can just use these. See: the node IO code, which got
   much simpler.

This is backwards compatible, so you can still use the old input mechanism
or use buffered or raw output. But it adds a new method of directly implementing
read/write. For simplicity, we insure that the source/destination buffers are
always `Uint8Array` views that point to exactly the region that is meant to be
read/written.

The old mechanisms are faster than before and can correctly support keyboard
interrupts. Other than that I think the original behavior is unchanged. I added a
lot more test coverage to ensure backwards compatibility since there was pretty
anemic coverage before.

I think the read/write APIs are mostly pretty simple to use, with the exception
that someone might forget to return the number of bytes read. JavaScript's ordinary
behavior coerces the `undefined` to a 0, which leads to an infinite loop where the
filesystem repeatedly asks to read/write the same data since it sees no progress.
I added a check that writes an error message to the console and sets EIO when undefined
is returned so the infinite loop is prevented and the problem is explained.
2023-08-21 08:41:44 +02:00
Loïc Estève 7193109f4d
Package OpenBLAS and use OpenBLAS in scipy (#3331) 2023-04-11 21:30:07 -07:00
Henry Schreiner 41b6db1bab
style: improve pre-commit (#2177) 2022-02-19 09:06:25 +01:00
Hood Chatham 1f4f3e2b85
MAINT Apply prettier to everything by default (#2095) 2022-01-10 13:47:59 -08:00
Hood Chatham 49b33b5442
Add package config for pyodide package (#1848) 2021-09-21 08:46:44 +02:00