Commit graph

18 commits

Author SHA1 Message Date
Rohan McGovern
c60b63996c Release 1.2.1 2024-01-15 08:07:02 +10:00
Rohan McGovern
eac74ec1e4 Further reduce memory usage on large yum repos [RHELDST-20453]
The Fetcher type was designed to return a 'str'.
That wasn't a good idea because it implies that every fetched file must
be loaded into memory completely. On certain large yum repos,
decompressed primary XML can be hundreds of MB, and it's not appropriate
to require loading that all into memory at once.

Make it support a file-like object (stream of bytes). Since the SAX
XML parser supports reading from a stream, this makes it possible to
avoid loading everything into memory at once.

A test of repo-autoindex CLI against
/content/dist/rhel/server/7/7Server/x86_64/os showed major
improvement:

- before: ~1200MiB
- after:    ~80MiB

Note that achieving the full improvement requires any downstream users
of the library (e.g. exodus-gw) to update their Fetcher implementation
as well, to stop returning a 'str'.
2023-09-21 11:05:21 +10:00
Rohan McGovern
efb595d624 Add py.typed for PEP 561
This library includes inline type hints, but per PEP 561 this must be
indicated by including a "py.typed" marker file, otherwise tools like
mypy will not make use of the type hints when checking downstream
projects.
2023-09-18 13:28:02 +10:00
Rohan McGovern
ceb2f37ddf Release 1.1.1 2023-04-12 14:08:21 +10:00
Rohan McGovern
bc5b0c3f23 Release 1.1.0 2023-04-04 09:57:52 +10:00
Di Chen
f2ee74dc26 Integrate safety dep scanner to CI [RHELDST-14788] 2022-11-18 20:32:42 +08:00
Di Chen
fd512fa6d6 Integrate bandit SAST tool with CI [RHELDST-14787] 2022-11-16 23:52:28 +08:00
Rohan McGovern
dfd6244e2b Release 1.0.2 2022-10-21 09:00:36 +10:00
Rohan McGovern
6f9abbdeb5 Release 1.0.1 2022-08-15 09:43:43 +10:00
Rohan McGovern
f06b623af4 Release a version 1.0.0 2022-08-15 09:35:06 +10:00
Rohan McGovern
6900caa7a7 Improve README 2022-08-15 09:30:59 +10:00
Rohan McGovern
7f83996e63 0.2.0 2022-08-09 09:00:38 +10:00
Rohan McGovern
254e0f7cd9 Add some documentation 2022-08-08 12:46:07 +10:00
Rohan McGovern
787ba01a0e Rearrange sources to keep API separate, add a real test 2022-07-07 13:20:43 +10:00
Rohan McGovern
119f0ea9b6 Make it all pass mypy 2022-06-29 16:19:05 +10:00
Rohan McGovern
05c6bd14be Add some basic tests & CI setup 2022-06-29 15:52:00 +10:00
Rohan McGovern
975e9f9f9e Declare HTML doctype
This is important due to certain behavior of localstack S3.
2022-06-20 09:33:52 +10:00
Rohan McGovern
5c4e5354b2 Initial implementation
Basically working for yum repos.
2022-06-17 10:31:31 +10:00