Marcel Telka
2023-12-13 0a7fbe6537a62682d0e51e80fe6431b658578c90
python/black: update to 23.12.0

1 files deleted
2 files added
7 files modified
241 ■■■■■ changed files
components/python/black/Makefile 8 ●●●● patch | view | raw | blame | history
components/python/black/black-PYVER.p5m 1 ●●●● patch | view | raw | blame | history
components/python/black/manifests/sample-manifest.p5m 1 ●●●● patch | view | raw | blame | history
components/python/black/patches/01-tox.ini-extras.patch 66 ●●●●● patch | view | raw | blame | history
components/python/black/patches/02-tox.ini-PYTHONPATH.patch 4 ●●●● patch | view | raw | blame | history
components/python/black/patches/03-tox.ini-no-xdist.patch 16 ●●●●● patch | view | raw | blame | history
components/python/black/patches/03-tox.ini-no_jupyter.patch 15 ●●●●● patch | view | raw | blame | history
components/python/black/pkg5 1 ●●●● patch | view | raw | blame | history
components/python/black/python-integrate-project.conf 2 ●●● patch | view | raw | blame | history
components/python/black/test/results-all.master 127 ●●●●● patch | view | raw | blame | history
components/python/black/Makefile
@@ -19,19 +19,20 @@
include ../../../make-rules/shared-macros.mk
COMPONENT_NAME =        black
HUMAN_VERSION =            23.11.0
HUMAN_VERSION =            23.12.0
COMPONENT_SUMMARY =        black - The uncompromising code formatter.
COMPONENT_PROJECT_URL =        https://github.com/psf/black
COMPONENT_ARCHIVE_URL =        \
    https://files.pythonhosted.org/packages/ef/21/c2d38c7c98a089fd0f7e1a8be16c07f141ed57339b3082737de90db0ca59/black-23.11.0.tar.gz
    https://files.pythonhosted.org/packages/5a/73/618bcfd4a4868d52c02ff7136ec60e9d63bc83911d3d8b4998e42acf9557/black-23.12.0.tar.gz
COMPONENT_ARCHIVE_HASH =    \
    sha256:4c68855825ff432d197229846f971bc4d6666ce90492e5b02013bcaca4d9ab05
    sha256:330a327b422aca0634ecd115985c1c7fd7bdb5b5a2ef8aa9888a82e2ebe9437a
COMPONENT_LICENSE =        MIT
COMPONENT_LICENSE_FILE =    LICENSE
include $(WS_MAKE_RULES)/common.mk
# Auto-generated dependencies
PYTHON_REQUIRED_PACKAGES += library/python/aiohttp
PYTHON_REQUIRED_PACKAGES += library/python/click
PYTHON_REQUIRED_PACKAGES += library/python/hatch-fancy-pypi-readme
PYTHON_REQUIRED_PACKAGES += library/python/hatch-vcs
@@ -43,7 +44,6 @@
PYTHON_REQUIRED_PACKAGES += library/python/tomli
PYTHON_REQUIRED_PACKAGES += library/python/typing-extensions
PYTHON_REQUIRED_PACKAGES += runtime/python
TEST_REQUIRED_PACKAGES.python += library/python/aiohttp
TEST_REQUIRED_PACKAGES.python += library/python/coverage
TEST_REQUIRED_PACKAGES.python += library/python/ipython
TEST_REQUIRED_PACKAGES.python += library/python/pre-commit
components/python/black/black-PYVER.p5m
@@ -80,6 +80,7 @@
    pkg.debug.depend.path=usr/bin
# Automatically generated dependencies based on distribution metadata
depend type=require fmri=pkg:/library/python/aiohttp-$(PYV)
depend type=require fmri=pkg:/library/python/click-$(PYV)
depend type=require fmri=pkg:/library/python/mypy-extensions-$(PYV)
depend type=require fmri=pkg:/library/python/packaging-$(PYV)
components/python/black/manifests/sample-manifest.p5m
@@ -80,6 +80,7 @@
    pkg.debug.depend.path=usr/bin
# Automatically generated dependencies based on distribution metadata
depend type=require fmri=pkg:/library/python/aiohttp-$(PYV)
depend type=require fmri=pkg:/library/python/click-$(PYV)
depend type=require fmri=pkg:/library/python/mypy-extensions-$(PYV)
depend type=require fmri=pkg:/library/python/packaging-$(PYV)
components/python/black/patches/01-tox.ini-extras.patch
@@ -1,5 +1,5 @@
--- black-23.11.0/tox.ini.orig
+++ black-23.11.0/tox.ini
--- black-23.12.0/tox.ini.orig
+++ black-23.12.0/tox.ini
@@ -13,15 +13,16 @@
 recreate = True
 deps =
@@ -19,65 +19,3 @@
     pytest tests --run-optional jupyter \
         -m jupyter \
         !ci: --numprocesses auto \
@@ -34,16 +35,17 @@
 recreate = True
 deps =
     -r{toxinidir}/test_requirements.txt
+extras =
+    d
+    jupyter
 ; a separate worker is required in ci due to https://foss.heptapod.net/pypy/pypy/-/issues/3317
 ; this seems to cause tox to wait forever
 ; remove this when pypy releases the bugfix
 commands =
-    pip install -e .[d]
     pytest tests \
         --run-optional no_jupyter \
         !ci: --numprocesses auto \
         ci: --numprocesses 1
-    pip install -e .[jupyter]
     pytest tests --run-optional jupyter \
         -m jupyter \
         !ci: --numprocesses auto \
@@ -59,18 +61,19 @@
 ; We currently need > aiohttp 3.8.1 that is on PyPI for 3.11
     git+https://github.com/aio-libs/aiohttp
     -r{toxinidir}/test_requirements.txt
+extras =
+    d
+    jupyter
 ; a separate worker is required in ci due to https://foss.heptapod.net/pypy/pypy/-/issues/3317
 ; this seems to cause tox to wait forever
 ; remove this when pypy releases the bugfix
 commands =
-    pip install -e .[d]
     coverage erase
     pytest tests \
         --run-optional no_jupyter \
         !ci: --numprocesses auto \
         ci: --numprocesses 1 \
         --cov {posargs}
-    pip install -e .[jupyter]
     pytest tests --run-optional jupyter \
         -m jupyter \
         !ci: --numprocesses auto \
@@ -84,8 +87,9 @@
     -r{toxinidir}/test_requirements.txt
     hypothesmith
     lark-parser
+extras =
+    d
 commands =
-    pip install -e .[d]
     coverage erase
     coverage run {toxinidir}/scripts/fuzz.py
     coverage report
@@ -93,6 +97,7 @@
 [testenv:run_self]
 setenv = PYTHONPATH = {toxinidir}/src
 skip_install = True
+extras =
+    d
 commands =
-    pip install -e .[d]
     black --check {toxinidir}/src {toxinidir}/tests
components/python/black/patches/02-tox.ini-PYTHONPATH.patch
@@ -1,5 +1,5 @@
--- black-23.11.0/tox.ini.orig
+++ black-23.11.0/tox.ini
--- black-23.12.0/tox.ini.orig
+++ black-23.12.0/tox.ini
@@ -4,7 +4,6 @@
 
 [testenv]
components/python/black/patches/03-tox.ini-no-xdist.patch
File was deleted
components/python/black/patches/03-tox.ini-no_jupyter.patch
New file
@@ -0,0 +1,15 @@
We cannot run the no_jupyter tests because we always have the jupyter extras
installed.
--- black-23.12.0/tox.ini.orig
+++ black-23.12.0/tox.ini
@@ -19,9 +19,6 @@
 ; local runs can stay parallelized since they aren't rolling the dice so many times as like on CI
 commands =
     coverage erase
-    pytest tests --run-optional no_jupyter \
-        !ci: --numprocesses auto \
-        --cov {posargs}
     pytest tests --run-optional jupyter \
         -m jupyter \
         !ci: --numprocesses auto \
components/python/black/pkg5
@@ -1,5 +1,6 @@
{
    "dependencies": [
        "library/python/aiohttp-39",
        "library/python/click-39",
        "library/python/hatch-fancy-pypi-readme-39",
        "library/python/hatch-vcs-39",
components/python/black/python-integrate-project.conf
@@ -15,4 +15,4 @@
%patch% 01-tox.ini-extras.patch
%patch% 02-tox.ini-PYTHONPATH.patch
%patch% 03-tox.ini-no-xdist.patch
%patch% 03-tox.ini-no_jupyter.patch
components/python/black/test/results-all.master
New file
@@ -0,0 +1,127 @@
py$(PYV): remove tox env folder $(@D)/.tox/py$(PYV)
py$(PYV): commands[0]> python -m coverage erase
py$(PYV): commands[1]> python -m pytest tests --run-optional jupyter -m jupyter --numprocesses auto --cov --cov-append
============================= test session starts ==============================
platform sunos5 -- Python $(PYTHON_VERSION).X -- $(@D)/.tox/py$(PYV)/bin/python
cachedir: .tox/py$(PYV)/.pytest_cache
rootdir: $(@D)
configfile: pyproject.toml
X workers [59 items]
scheduling tests via LoadScheduling
tests/test_ipynb.py::test_automagic PASSED
tests/test_ipynb.py::test_cache_isnt_written_if_no_jupyter_deps_dir PASSED
tests/test_ipynb.py::test_cache_isnt_written_if_no_jupyter_deps_single PASSED
tests/test_ipynb.py::test_cell_magic[custom cell magics mode] PASSED
tests/test_ipynb.py::test_cell_magic[default mode] PASSED
tests/test_ipynb.py::test_cell_magic_nested PASSED
tests/test_ipynb.py::test_cell_magic_noop PASSED
tests/test_ipynb.py::test_cell_magic_with_custom_python_magic[Correctly change when cell magic registered] PASSED
tests/test_ipynb.py::test_cell_magic_with_custom_python_magic[No change when cell magic not registered] PASSED
tests/test_ipynb.py::test_cell_magic_with_custom_python_magic[No change when other cell magics registered] PASSED
tests/test_ipynb.py::test_cell_magic_with_invalid_body PASSED
tests/test_ipynb.py::test_cell_magic_with_magic PASSED
tests/test_ipynb.py::test_cell_magic_with_magic_noop PASSED
tests/test_ipynb.py::test_empty_cell PASSED
tests/test_ipynb.py::test_empty_string PASSED
tests/test_ipynb.py::test_entire_notebook_empty_metadata PASSED
tests/test_ipynb.py::test_entire_notebook_no_trailing_newline PASSED
tests/test_ipynb.py::test_entire_notebook_trailing_newline PASSED
tests/test_ipynb.py::test_entire_notebook_without_changes PASSED
tests/test_ipynb.py::test_input_already_contains_transformed_magic PASSED
tests/test_ipynb.py::test_ipynb_and_pyi_flags PASSED
tests/test_ipynb.py::test_ipynb_diff_with_change PASSED
tests/test_ipynb.py::test_ipynb_diff_with_no_change PASSED
tests/test_ipynb.py::test_ipynb_flag PASSED
tests/test_ipynb.py::test_magic[Assignment to environment variable-custom cell magics mode] PASSED
tests/test_ipynb.py::test_magic[Assignment to environment variable-default mode] PASSED
tests/test_ipynb.py::test_magic[Assignment to magic-custom cell magics mode] PASSED
tests/test_ipynb.py::test_magic[Assignment to magic-default mode] PASSED
tests/test_ipynb.py::test_magic[Help-custom cell magics mode] PASSED
tests/test_ipynb.py::test_magic[Help-default mode] PASSED
tests/test_ipynb.py::test_magic[Line magic with argument-custom cell magics mode] PASSED
tests/test_ipynb.py::test_magic[Line magic with argument-default mode] PASSED
tests/test_ipynb.py::test_magic[Line magic without argument-custom cell magics mode] PASSED
tests/test_ipynb.py::test_magic[Line magic without argument-default mode] PASSED
tests/test_ipynb.py::test_magic[Other help-custom cell magics mode] PASSED
tests/test_ipynb.py::test_magic[Other help-default mode] PASSED
tests/test_ipynb.py::test_magic[Other system call-custom cell magics mode] PASSED
tests/test_ipynb.py::test_magic[Other system call-default mode] PASSED
tests/test_ipynb.py::test_magic[System assignment-custom cell magics mode] PASSED
tests/test_ipynb.py::test_magic[System assignment-default mode] PASSED
tests/test_ipynb.py::test_magic[System call-custom cell magics mode] PASSED
tests/test_ipynb.py::test_magic[System call-default mode] PASSED
tests/test_ipynb.py::test_magic_noop PASSED
tests/test_ipynb.py::test_multiline_magic PASSED
tests/test_ipynb.py::test_multiline_no_magic PASSED
tests/test_ipynb.py::test_non_python_magics[%%bash\n2+2] PASSED
tests/test_ipynb.py::test_non_python_magics[%%html --isolated\n2+2] PASSED
tests/test_ipynb.py::test_non_python_magics[%%writefile e.txt\n  meh\n meh] PASSED
tests/test_ipynb.py::test_non_python_notebook PASSED
tests/test_ipynb.py::test_noop PASSED
tests/test_ipynb.py::test_set_input PASSED
tests/test_ipynb.py::test_trailing_semicolon[False] PASSED
tests/test_ipynb.py::test_trailing_semicolon[True] PASSED
tests/test_ipynb.py::test_trailing_semicolon_indented PASSED
tests/test_ipynb.py::test_trailing_semicolon_noop PASSED
tests/test_ipynb.py::test_trailing_semicolon_with_comment PASSED
tests/test_ipynb.py::test_trailing_semicolon_with_comment_on_next_line PASSED
tests/test_ipynb.py::test_unable_to_replace_magics PASSED
tests/test_ipynb.py::test_unparseable_notebook PASSED
======== 59 passed ========
py$(PYV): commands[2]> python -m coverage report
Name                                                                                                                                       Stmts   Miss Branch BrPart  Cover
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
$(PROTO_DIR)$(PYTHON_DIR)/vendor-packages/_black_version.py                  1      0      0      0   100%
$(PROTO_DIR)$(PYTHON_DIR)/vendor-packages/black/__init__.py                587    214    321     64    57%
$(PROTO_DIR)$(PYTHON_DIR)/vendor-packages/black/_width_table.py              2      0      0      0   100%
$(PROTO_DIR)$(PYTHON_DIR)/vendor-packages/black/brackets.py                165     70     86     20    52%
$(PROTO_DIR)$(PYTHON_DIR)/vendor-packages/black/cache.py                    83     20     24      2    70%
$(PROTO_DIR)$(PYTHON_DIR)/vendor-packages/black/comments.py                201    109    117      9    39%
$(PROTO_DIR)$(PYTHON_DIR)/vendor-packages/black/concurrency.py              97     75     44      0    16%
$(PROTO_DIR)$(PYTHON_DIR)/vendor-packages/black/const.py                     4      0      0      0   100%
$(PROTO_DIR)$(PYTHON_DIR)/vendor-packages/black/debug.py                    39     21     12      0    39%
$(PROTO_DIR)$(PYTHON_DIR)/vendor-packages/black/files.py                   195     94     96     19    48%
$(PROTO_DIR)$(PYTHON_DIR)/vendor-packages/black/handle_ipynb_magics.py     176      5     66      4    96%
$(PROTO_DIR)$(PYTHON_DIR)/vendor-packages/black/linegen.py                 722    512    418     29    24%
$(PROTO_DIR)$(PYTHON_DIR)/vendor-packages/black/lines.py                   509    286    325     26    35%
$(PROTO_DIR)$(PYTHON_DIR)/vendor-packages/black/mode.py                     95      2     12      3    93%
$(PROTO_DIR)$(PYTHON_DIR)/vendor-packages/black/nodes.py                   449    256    292     38    35%
$(PROTO_DIR)$(PYTHON_DIR)/vendor-packages/black/numerics.py                 35     20     14      5    41%
$(PROTO_DIR)$(PYTHON_DIR)/vendor-packages/black/output.py                   68     20     32      5    61%
$(PROTO_DIR)$(PYTHON_DIR)/vendor-packages/black/parsing.py                 110     46     49      8    57%
$(PROTO_DIR)$(PYTHON_DIR)/vendor-packages/black/ranges.py                  192    164    102      0    10%
$(PROTO_DIR)$(PYTHON_DIR)/vendor-packages/black/report.py                   63     12     24      5    76%
$(PROTO_DIR)$(PYTHON_DIR)/vendor-packages/black/rusty.py                    14      4      0      0    71%
$(PROTO_DIR)$(PYTHON_DIR)/vendor-packages/black/strings.py                 162     87     70     11    39%
$(PROTO_DIR)$(PYTHON_DIR)/vendor-packages/black/trans.py                   892    774    432      1     9%
$(PROTO_DIR)$(PYTHON_DIR)/vendor-packages/blackd/__init__.py               136     98     36      1    23%
$(PROTO_DIR)$(PYTHON_DIR)/vendor-packages/blackd/middlewares.py             30     21     10      1    25%
$(PROTO_DIR)$(PYTHON_DIR)/vendor-packages/blib2to3/__init__.py               0      0      0      0   100%
$(PROTO_DIR)$(PYTHON_DIR)/vendor-packages/blib2to3/pgen2/__init__.py         1      0      0      0   100%
$(PROTO_DIR)$(PYTHON_DIR)/vendor-packages/blib2to3/pgen2/driver.py         207     68     76     16    63%
$(PROTO_DIR)$(PYTHON_DIR)/vendor-packages/blib2to3/pgen2/grammar.py         70     14     10      1    81%
$(PROTO_DIR)$(PYTHON_DIR)/vendor-packages/blib2to3/pgen2/parse.py          185     78     62     10    55%
$(PROTO_DIR)$(PYTHON_DIR)/vendor-packages/blib2to3/pgen2/pgen.py           314     29    132      7    89%
$(PROTO_DIR)$(PYTHON_DIR)/vendor-packages/blib2to3/pgen2/token.py           73      3      4      0    96%
$(PROTO_DIR)$(PYTHON_DIR)/vendor-packages/blib2to3/pgen2/tokenize.py       365    194    162     25    45%
$(PROTO_DIR)$(PYTHON_DIR)/vendor-packages/blib2to3/pygram.py               150      0      2      0   100%
$(PROTO_DIR)$(PYTHON_DIR)/vendor-packages/blib2to3/pytree.py               471    261    212      8    37%
tests/__init__.py                                                                                                                              0      0      0      0   100%
tests/conftest.py                                                                                                                             10      0      0      0   100%
tests/optional.py                                                                                                                             70     10     26      6    83%
tests/test_black.py                                                                                                                         1602   1361    128      7    14%
tests/test_blackd.py                                                                                                                         160    105     12      1    34%
tests/test_format.py                                                                                                                          39     22      4      0    40%
tests/test_ipynb.py                                                                                                                          201      0     10      0   100%
tests/test_no_ipynb.py                                                                                                                        22     13      0      0    41%
tests/test_ranges.py                                                                                                                          27     14      0      0    48%
tests/test_trans.py                                                                                                                           33     30      2      0     9%
tests/util.py                                                                                                                                171    101     40      0    36%
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
TOTAL                                                                                                                                       9198   5213   3464    332    39%
  py$(PYV): OK
  congratulations :)