aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Reformat w/ black 22.12.0 for consistency.Brian Harring2022-12-2551-1006/+1614
| | | | | Signed-off-by: Brian Harring <ferringb@gmail.com> Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
* compression: prefer gtar over tar if availableSam James2022-12-221-1/+2
| | | | | | | | | | | Prefer 'gtar' over 'tar' if available, as we need GNU tar for --use-compress-program. With libarchive's tar, we get an 'unrecognized archive' error. Signed-off-by: Sam James <sam@gentoo.org> Closes: https://github.com/pkgcore/snakeoil/pull/93 Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
* generate_man_rsts: better formatting for optionsArthur Zamarin2022-12-091-0/+4
| | | | Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
* generate_man_rsts: improve sub sectioning for sub commandsArthur Zamarin2022-12-091-6/+6
| | | | | | Improve tree structure for sub commands. Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
* mark distutils_extensions as deprecatedArthur Zamarin2022-12-091-0/+3
| | | | Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
* Add constraint satisfaction problem solverArthur Zamarin2022-12-091-0/+198
| | | | Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
* start work on 0.10.4Arthur Zamarin2022-11-191-1/+1
| | | | Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
* dist.sphinxext: new sphinx extensionArthur Zamarin2022-11-114-111/+132
| | | | | | | Small sphinx extension to generate docs from argparse scripts. Simplifies all `conf.py` across all pkgcore stack. Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
* start work on 0.10.3Arthur Zamarin2022-11-081-1/+1
| | | | Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
* snakeoil/test/*.py: fix f-stringsArthur Zamarin2022-11-012-6/+6
| | | | | Fixes: 7aed9341485ee53c0784df9e2982338e1ec271f2 Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
* snakeoil.test.eq_hash_inheritance: fix pytest warningArthur Zamarin2022-11-011-1/+1
| | | | | | | | Usage of `setup` function is deprecated by pytest (was added as compatibility layer for nose). Fix the warning by using correct name - `setup_method`. Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
* compression: tidy up bzip2 docsSam James2022-10-101-3/+3
| | | | | | Signed-off-by: Sam James <sam@gentoo.org> Closes: https://github.com/pkgcore/snakeoil/pull/84 Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
* compression: add parallel xz supportSam James2022-10-102-8/+83
| | | | | | Closes: https://github.com/pkgcore/snakeoil/issues/83 Signed-off-by: Sam James <sam@gentoo.org> Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
* compression.__init__: add testsArthur Zamarin2022-10-102-30/+21
| | | | Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
* compression/_bzip2: add testsArthur Zamarin2022-10-103-12/+22
| | | | | | | Add tests for all modes used by compression._bzip2 to compress and decompress data. Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
* start work on v0.10.2Arthur Zamarin2022-09-301-1/+1
| | | | Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
* new release 0.10.1v0.10.1Arthur Zamarin2022-09-301-1/+1
| | | | Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
* refactor to use f-stringsArthur Zamarin2022-09-2610-36/+25
| | | | Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
* move `DemandLoadTargets` to testsArthur Zamarin2022-09-261-30/+0
| | | | | | | Used only in tests, which test `mixins.PythonNamespaceWalker`, meaning I can't just remove it. Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
* descriptors: remove unused `classproperty`Arthur Zamarin2022-09-251-34/+0
| | | | Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
* fileutils: remove unused `UnbufferedWriteHandle`Arthur Zamarin2022-09-241-17/+1
| | | | | | | Not used anywhere, without tests. If needed, use `io.TextIOWrapper` with `write_through=True` argument. Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
* fileutils: remove deprecated `write_file`Arthur Zamarin2022-09-242-17/+2
| | | | | | | | Last usage was removed, so we can remove the function as well. In most cases, like tests, you can use `Path.write_text` or `Path.write_bytes` instead. If not in tests, just use `open` and `write`. Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
* test/mixins: remove `mk_named_tempfile`Arthur Zamarin2022-09-241-9/+1
| | | | | | | Last usage was removed, so we can remove the function as well. For tests just use normal `tmp_path / [filename]` instead. Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
* Revert "dist.distutils_extensions: fix _verinfo.py file"Arthur Zamarin2022-09-192-52/+45
| | | | | Revert: b4658d2ebfe9d929ba9cc93e84a93c0ac2d399c7 Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
* dist.distutils_extensions: fix _verinfo.py fileArthur Zamarin2022-09-191-1/+3
| | | | | Fixes: 40b46fc3cc8200727e9198b7ab179da21d28da67 Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
* version: refactor the codeArthur Zamarin2022-09-182-48/+53
| | | | | | | | - make it to use standard ISO 8601 dates - use namedtuple for easier usage of this type - use datetime objects for better handling of dates Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
* version: fix env for traversalArthur Zamarin2022-09-181-1/+1
|
* version: better locale protection around running gitArthur Zamarin2022-09-181-1/+5
| | | | | Bug: https://bugs.gentoo.org/869878 Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
* docs: cleanup and fix warningsArthur Zamarin2022-08-277-86/+65
| | | | Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
* test: remove TestCaseArthur Zamarin2022-08-272-283/+10
| | | | | | | - final user (pkgcore) has been cleaned - also clean other parts that are unused Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
* remove mk_cpy_loadable_testcaseArthur Zamarin2022-08-241-38/+0
| | | | Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
* remove mentions of _readdir C extensionArthur Zamarin2022-08-241-7/+1
| | | | Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
* remove cython _posix.pyxArthur Zamarin2022-08-244-327/+3
| | | | Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
* remove cython _sequences.pyxArthur Zamarin2022-08-243-86/+3
| | | | Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
* test/mixins.py: remove TempDirMixin & tempdir_decoratorArthur Zamarin2022-08-241-33/+0
| | | | | | | | All last usages of TempDirMixin (in pkgcore) were removed, so finally we can remove it. Same story with tempdir_decorator. If someone needs it, please use ``tmp_path`` pytest fixture. Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
* data_source: modernize testsArthur Zamarin2022-08-241-7/+8
| | | | | | | | - use `with` semantics for file-handlers usage - use Path for `self.dir` - use b'' for bytes-literals Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
* stringio: remove text_writable & bytes_writableArthur Zamarin2022-08-241-15/+14
| | | | | | | | | Was already marked for deprecation, but not yet removed. Use instead io.StringIO and io.BytesIO. Also use metaclass for _make_ro_cls. Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
* test/*.py: various modernization of codeArthur Zamarin2022-08-246-40/+35
| | | | Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
* klass: add typing for jit_attrArthur Zamarin2022-08-241-8/+9
| | | | | | | This makes the life of type inferring tools much easier and precise, as a result it works better in IDEs. Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
* klass: small refactorArthur Zamarin2022-08-241-20/+15
| | | | Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
* set next version as 0.10.0Arthur Zamarin2022-08-241-1/+1
| | | | | | | I'm going to remove various parts, so it would be breaking changes, so time to bump major version Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
* Add type hinting files for cython filesArthur Zamarin2022-08-202-0/+17
| | | | Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
* obj: fix typo in commentSam James2022-08-081-1/+1
| | | | Signed-off-by: Sam James <sam@gentoo.org>
* test_obj.py: (py3.11) add __getstate__ to knowledgeArthur Zamarin2022-08-081-1/+1
| | | | | | | In python 3.11, the function `object.__getstate__()` was added, so we should add it to the ignore list. Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
* test/mixins: (py3.11) fix invalid call to __subclasses__Arthur Zamarin2022-08-081-2/+2
| | | | | | | | | | | | | | | | In python3.11, a new metaclass and some classes were added into ctypes. The metaclass `ctypes._endian._swapped_struct_meta`, while hidden, is inheriting from `type(Structure)`, which result in a lot of magic inside but at the end we get a state that it's `__subclasses__` is the same as `type.__subclasses__` function, meaning that it expects an arg. This metaclass didn't exists before 3.11. In this commit you can see that I changed the `if` line to check the signature of the function, and only if it doesn't expect an arg, continue. Yes, the new `if` is slower, but note that this is only for testing code, so we can live with it. Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
* distutils_extensions: improve pip detectionArthur Zamarin2022-07-301-1/+1
| | | | Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
* start work on v0.9.12Arthur Zamarin2022-07-291-1/+1
| | | | Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
* Another attempt to fix distutils extensionArthur Zamarin2022-07-291-0/+4
| | | | Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
* distutils_extensions: fix import w/ newer setuptoolsArthur Zamarin2022-07-291-1/+3
|
* Revert "distutils_extensions: fix import w/ newer setuptools(?)"Arthur Zamarin2022-07-291-4/+0
| | | | | | | It didn't work sadly :( Reverts: b79d538893e83fc8cbf103849380e77f9e6466d4 Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>