Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

0.4.1: pytest flake8 errors and warnings #21

Closed
kloczek opened this issue Apr 27, 2021 · 14 comments
Closed

0.4.1: pytest flake8 errors and warnings #21

kloczek opened this issue Apr 27, 2021 · 14 comments

Comments

@kloczek
Copy link

kloczek commented Apr 27, 2021

+ /usr/bin/python3 -Bm pytest -ra
=========================================================================== test session starts ============================================================================
platform linux -- Python 3.8.9, pytest-6.2.3, py-1.10.0, pluggy-0.13.1
rootdir: /home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1, configfile: pyproject.toml
plugins: forked-1.3.0, shutil-1.7.0, virtualenv-1.7.0, asyncio-0.14.0, expect-1.1.0, cov-2.11.1, mock-3.5.1, httpbin-1.0.0, xdist-2.2.1, flake8-1.0.7, timeout-1.4.2, betamax-0.8.1, pyfakefs-4.4.0, freezegun-0.4.2, flaky-3.7.0, cases-3.4.6, hypothesis-6.10.1, case-1.5.3, isort-1.3.0
collected 255 items

setup.py sF                                                                                                                                                          [  0%]
cssselect2/__init__.py ..                                                                                                                                            [  1%]
cssselect2/compiler.py .F                                                                                                                                            [  2%]
cssselect2/parser.py ..                                                                                                                                              [  3%]
cssselect2/tree.py .F                                                                                                                                                [  3%]
docs/conf.py ..                                                                                                                                                      [  4%]
docs/example.py ..                                                                                                                                                   [  5%]
tests/__init__.py ..                                                                                                                                                 [  6%]
tests/test_cssselect2.py .F...........................xx............................................................................................................ [ 60%]
.......x............................................................................................                                                                 [100%]

================================================================================= FAILURES =================================================================================
_______________________________________________________________________________ FLAKE8-check _______________________________________________________________________________
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/setup.py:7:1: E122 continuation line missing indentation or outdented
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/setup.py:10:1: E122 continuation line missing indentation or outdented
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/setup.py:13:1: E122 continuation line missing indentation or outdented
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/setup.py:16:1: E122 continuation line missing indentation or outdented
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/setup.py:34:6: E124 closing bracket does not match visual indentation

---------------------------------------------------------------------------- Captured log call -----------------------------------------------------------------------------
WARNING  flake8.options.manager:manager.py:207 option --max-complexity: please update from optparse string `type=` to argparse callable `type=` -- this will be an error in the future
_______________________________________________________________________________ FLAKE8-check _______________________________________________________________________________
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/compiler.py:207:42: H101: Use TODO(NAME)

---------------------------------------------------------------------------- Captured log call -----------------------------------------------------------------------------
WARNING  flake8.options.manager:manager.py:207 option --max-complexity: please update from optparse string `type=` to argparse callable `type=` -- this will be an error in the future
_______________________________________________________________________________ FLAKE8-check _______________________________________________________________________________
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:3:44: H301: one import per line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:27:1: H404: multi line docstring should start without a leading new line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:27:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:28:1: H404: multi line docstring should start without a leading new line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:28:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:29:1: H404: multi line docstring should start without a leading new line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:29:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:30:1: H404: multi line docstring should start without a leading new line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:30:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:31:1: H404: multi line docstring should start without a leading new line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:31:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:32:1: H404: multi line docstring should start without a leading new line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:32:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:33:1: H404: multi line docstring should start without a leading new line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:33:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:34:1: H404: multi line docstring should start without a leading new line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:34:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:35:1: H404: multi line docstring should start without a leading new line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:35:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:36:1: H404: multi line docstring should start without a leading new line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:36:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:37:1: H404: multi line docstring should start without a leading new line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:37:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:38:1: H404: multi line docstring should start without a leading new line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:38:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:39:1: H404: multi line docstring should start without a leading new line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:39:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:40:1: H404: multi line docstring should start without a leading new line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:40:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:62:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:63:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:64:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:65:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:66:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:67:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:68:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:69:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:119:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:120:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:121:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:122:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:123:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:124:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:125:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:126:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:133:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:134:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:135:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:136:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:137:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:138:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:139:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:140:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:147:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:148:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:149:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:150:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:151:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:164:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:165:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:166:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:167:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:168:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:169:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:170:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:171:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:172:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:173:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:174:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:175:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:176:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:177:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:211:1: H404: multi line docstring should start without a leading new line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:211:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:212:1: H404: multi line docstring should start without a leading new line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:212:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:213:1: H404: multi line docstring should start without a leading new line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:213:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:214:1: H404: multi line docstring should start without a leading new line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:214:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:215:1: H404: multi line docstring should start without a leading new line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:215:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:216:1: H404: multi line docstring should start without a leading new line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:216:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:217:1: H404: multi line docstring should start without a leading new line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:217:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:218:1: H404: multi line docstring should start without a leading new line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:218:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:219:1: H404: multi line docstring should start without a leading new line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:219:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:220:1: H404: multi line docstring should start without a leading new line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:220:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:221:1: H404: multi line docstring should start without a leading new line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:221:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:222:1: H404: multi line docstring should start without a leading new line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:222:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:223:1: H404: multi line docstring should start without a leading new line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:223:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:224:1: H404: multi line docstring should start without a leading new line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:224:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:238:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:239:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:240:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:241:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:242:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:243:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:244:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:245:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:246:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:247:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:248:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:253:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:254:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:255:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:256:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:257:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:258:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:259:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:260:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:261:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:262:1: H405: multi line docstring summary not separated with an empty line

---------------------------------------------------------------------------- Captured log call -----------------------------------------------------------------------------
WARNING  flake8.options.manager:manager.py:207 option --max-complexity: please update from optparse string `type=` to argparse callable `type=` -- this will be an error in the future
_______________________________________________________________________________ FLAKE8-check _______________________________________________________________________________
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/tests/test_cssselect2.py:12:38: H301: one import per line

---------------------------------------------------------------------------- Captured log call -----------------------------------------------------------------------------
WARNING  flake8.options.manager:manager.py:207 option --max-complexity: please update from optparse string `type=` to argparse callable `type=` -- this will be an error in the future

----------- coverage: platform linux, python 3.8.9-final-0 -----------
Name                       Stmts   Miss Branch BrPart  Cover
------------------------------------------------------------
cssselect2/__init__.py        46     35     20      0    17%
cssselect2/compiler.py       172     12    142     10    92%
cssselect2/parser.py         252      7     98      8    96%
cssselect2/tree.py           143      9     59      7    91%
tests/__init__.py              0      0      0      0   100%
tests/test_cssselect2.py     210      6     24      2    97%
------------------------------------------------------------
TOTAL                        823     69    343     27    90%

========================================================================= short test summary info ==========================================================================
SKIPPED [1] ../../../../../usr/lib/python3.8/site-packages/pytest_isort.py:162: file(s) previously passed isort checks
XFAIL tests/test_cssselect2.py::test_invalid_selectors[test27]
  reason:
XFAIL tests/test_cssselect2.py::test_invalid_selectors[test28]
  reason:
XFAIL tests/test_cssselect2.py::test_valid_selectors[test107]
  reason:
FAILED setup.py::FLAKE8
FAILED cssselect2/compiler.py::FLAKE8
FAILED cssselect2/tree.py::FLAKE8
FAILED tests/test_cssselect2.py::FLAKE8
=========================================================== 4 failed, 247 passed, 1 skipped, 3 xfailed in 5.22s ============================================================
@liZe
Copy link
Member

liZe commented Apr 27, 2021

Hello!

The Exxx errors are reported in setup.py, but we have no setup.py file 😄. It’s probably generated by a build tool in the stack you use.

The other Hxxx are probably reported by hacking, a tool we don’t use.

@kloczek
Copy link
Author

kloczek commented Apr 27, 2021

Ha 😎
So which one methods was used to generate dist tar ball? build module was used? (python build --no-isolation -s ?)

@liZe
Copy link
Member

liZe commented Apr 27, 2021

So which one methods was used to generate dist tar ball? build module was used? (python build --no-isolation -s ?)

We use flit to generate our packages.

@kloczek
Copy link
Author

kloczek commented Sep 3, 2021

So which one methods was used to generate dist tar ball? build module was used? (python build --no-isolation -s ?)

We use flit to generate our packages.

Really bad because flit does not care about documentation :/
I made small patch to migrate to setuptools

--- a/pyproject.toml    2020-10-29 22:06:49.000000000 +0000
+++ b/pyproject.toml    2021-09-03 17:44:33.344833893 +0100
@@ -1,6 +1,5 @@
 [build-system]
-requires = ['flit']
-build-backend = 'flit.buildapi'
+requires = ["setuptools", "wheel"]

 [tool.flit.metadata]
 module = 'cssselect2'
--- a/setup.py  1970-01-01 01:00:00.000000000 +0100
+++ b/setup.py  2021-02-01 09:26:14.000000000 +0000
@@ -0,0 +1,3 @@
+from setuptools import setup
+
+setup()

Wit that patch still is possible to generate documentation using settuptools

+ SPHINXOPTS=-j48
+ /usr/bin/python3 setup.py build_sphinx -b man --build-dir build/sphinx
running build_sphinx
Running Sphinx v4.1.2
making output directory... done
loading intersphinx inventory from https://docs.python.org/3/objects.inv...
loading intersphinx inventory from https://pythonhosted.org/webencodings/objects.inv...
loading intersphinx inventory from https://doc.courtbouillon.org/tinycss2/latest/objects.inv...
building [mo]: targets for 0 po files that are out of date
building [man]: all manpages
updating environment: [new config] 6 added, 0 changed, 0 removed
reading sources... [100%] support
looking for now-outdated files... none found
pickling environment... done
checking consistency... done
writing... python-cssselect2.3 { first_steps api_reference changelog contribute support } done
build succeeded.

The manual pages are in build/sphinx/man.

Please let me know if you want that patch as PR.
flit is only archiver and maintainer does not care about biuil;d and install bts like documentation pypa/flit#429. In other words flit is not even trying to go beond what wheel does.

BTW: using tagged git tar ball pytest still is failing:

+ PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-cssselect2-0.4.1-2.1.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-cssselect2-0.4.1-2.1.fc35.x86_64/usr/lib/python3.8/site-packages
+ /usr/bin/pytest -ra
=========================================================================== test session starts ============================================================================
platform linux -- Python 3.8.12, pytest-6.2.5, py-1.10.0, pluggy-0.13.1
benchmark: 3.4.1 (defaults: timer=time.perf_counter disable_gc=False min_rounds=5 min_time=0.000005 max_time=1.0 calibration_precision=10 warmup=False warmup_iterations=100000)
Using --randomly-seed=4186984689
rootdir: /home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1, configfile: pyproject.toml
plugins: forked-1.3.0, shutil-1.7.0, virtualenv-1.7.0, expect-1.1.0, flake8-1.0.7, timeout-1.4.2, betamax-0.8.1, freezegun-0.4.2, aspectlib-1.5.2, toolbox-0.5, rerunfailures-9.1.1, requests-mock-1.9.3, cov-2.12.1, flaky-3.7.0, benchmark-3.4.1, xdist-2.3.0, pylama-7.7.1, datadir-1.3.1, regressions-2.2.0, cases-3.6.3, xprocess-0.18.1, black-0.3.12, anyio-3.3.0, asyncio-0.15.1, trio-0.7.0, subtests-0.5.0, isort-2.0.0, hypothesis-6.14.6, mock-3.6.1, profiling-1.7.0, randomly-3.8.0, Faker-8.12.1, nose2pytest-1.0.8, pyfakefs-4.5.1, tornado-0.8.1, twisted-1.13.3
collected 255 items

tests/test_cssselect2.py .                                                                                                                                           [  0%]
docs/conf.py .                                                                                                                                                       [  0%]
tests/test_cssselect2.py ..............                                                                                                                              [  6%]
tests/__init__.py .                                                                                                                                                  [  6%]
tests/test_cssselect2.py ..................................................                                                                                          [ 26%]
cssselect2/parser.py F                                                                                                                                               [ 26%]
tests/test_cssselect2.py ..............                                                                                                                              [ 32%]
docs/conf.py .                                                                                                                                                       [ 32%]
tests/test_cssselect2.py ..                                                                                                                                          [ 33%]
cssselect2/tree.py .                                                                                                                                                 [ 33%]
cssselect2/__init__.py .                                                                                                                                             [ 34%]
tests/test_cssselect2.py ....                                                                                                                                        [ 35%]
setup.py .                                                                                                                                                           [ 36%]
tests/test_cssselect2.py .                                                                                                                                           [ 36%]
cssselect2/compiler.py .                                                                                                                                             [ 36%]
docs/example.py .                                                                                                                                                    [ 37%]
tests/test_cssselect2.py ...................................xx.                                                                                                      [ 52%]
cssselect2/__init__.py .                                                                                                                                             [ 52%]
tests/test_cssselect2.py .................                                                                                                                           [ 59%]
tests/__init__.py .                                                                                                                                                  [ 59%]
tests/test_cssselect2.py .................                                                                                                                           [ 66%]
docs/example.py .                                                                                                                                                    [ 66%]
tests/test_cssselect2.py ..F..                                                                                                                                       [ 68%]
cssselect2/tree.py F                                                                                                                                                 [ 69%]
tests/test_cssselect2.py ................                                                                                                                            [ 75%]
cssselect2/compiler.py F                                                                                                                                             [ 75%]
tests/test_cssselect2.py ............x............                                                                                                                   [ 85%]
cssselect2/parser.py .                                                                                                                                               [ 85%]
tests/test_cssselect2.py .........                                                                                                                                   [ 89%]
setup.py .                                                                                                                                                           [ 89%]
tests/test_cssselect2.py ..........................                                                                                                                  [100%]

================================================================================= FAILURES =================================================================================
_______________________________________________________________________________ FLAKE8-check _______________________________________________________________________________
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/parser.py:26:16: B305 `.next()` is not a thing on Python 3. Use the `next()` builtin. For Python 2 compatibility, use `six.next()`.
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/parser.py:48:13: B305 `.next()` is not a thing on Python 3. Use the `next()` builtin. For Python 2 compatibility, use `six.next()`.
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/parser.py:96:9: B305 `.next()` is not a thing on Python 3. Use the `next()` builtin. For Python 2 compatibility, use `six.next()`.
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/parser.py:99:9: B305 `.next()` is not a thing on Python 3. Use the `next()` builtin. For Python 2 compatibility, use `six.next()`.
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/parser.py:100:16: B305 `.next()` is not a thing on Python 3. Use the `next()` builtin. For Python 2 compatibility, use `six.next()`.
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/parser.py:106:9: B305 `.next()` is not a thing on Python 3. Use the `next()` builtin. For Python 2 compatibility, use `six.next()`.
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/parser.py:110:9: B305 `.next()` is not a thing on Python 3. Use the `next()` builtin. For Python 2 compatibility, use `six.next()`.
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/parser.py:111:16: B305 `.next()` is not a thing on Python 3. Use the `next()` builtin. For Python 2 compatibility, use `six.next()`.
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/parser.py:113:20: B305 `.next()` is not a thing on Python 3. Use the `next()` builtin. For Python 2 compatibility, use `six.next()`.
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/parser.py:142:39: B305 `.next()` is not a thing on Python 3. Use the `next()` builtin. For Python 2 compatibility, use `six.next()`.
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/parser.py:149:13: B305 `.next()` is not a thing on Python 3. Use the `next()` builtin. For Python 2 compatibility, use `six.next()`.
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/parser.py:162:16: B305 `.next()` is not a thing on Python 3. Use the `next()` builtin. For Python 2 compatibility, use `six.next()`.
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/parser.py:174:9: B305 `.next()` is not a thing on Python 3. Use the `next()` builtin. For Python 2 compatibility, use `six.next()`.
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/parser.py:176:16: B305 `.next()` is not a thing on Python 3. Use the `next()` builtin. For Python 2 compatibility, use `six.next()`.
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/parser.py:187:12: B305 `.next()` is not a thing on Python 3. Use the `next()` builtin. For Python 2 compatibility, use `six.next()`.
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/parser.py:205:23: B305 `.next()` is not a thing on Python 3. Use the `next()` builtin. For Python 2 compatibility, use `six.next()`.
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/parser.py:210:9: B305 `.next()` is not a thing on Python 3. Use the `next()` builtin. For Python 2 compatibility, use `six.next()`.
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/parser.py:217:16: B305 `.next()` is not a thing on Python 3. Use the `next()` builtin. For Python 2 compatibility, use `six.next()`.
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/parser.py:224:9: B305 `.next()` is not a thing on Python 3. Use the `next()` builtin. For Python 2 compatibility, use `six.next()`.
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/parser.py:227:9: B305 `.next()` is not a thing on Python 3. Use the `next()` builtin. For Python 2 compatibility, use `six.next()`.
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/parser.py:233:12: B305 `.next()` is not a thing on Python 3. Use the `next()` builtin. For Python 2 compatibility, use `six.next()`.
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/parser.py:268:13: B305 `.next()` is not a thing on Python 3. Use the `next()` builtin. For Python 2 compatibility, use `six.next()`.

---------------------------------------------------------------------------- Captured log call -----------------------------------------------------------------------------
WARNING  flake8.options.manager:manager.py:186 option --indent-size: please update `help=` text to use %(default)s instead of %default -- this will be an error in the future
WARNING  flake8.options.manager:manager.py:207 option --max-complexity: please update from optparse string `type=` to argparse callable `type=` -- this will be an error in the future
_______________________________________________________________________________ FLAKE8-check _______________________________________________________________________________
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/tests/test_cssselect2.py:12:38: H301: one import per line

---------------------------------------------------------------------------- Captured log call -----------------------------------------------------------------------------
WARNING  flake8.options.manager:manager.py:186 option --indent-size: please update `help=` text to use %(default)s instead of %default -- this will be an error in the future
WARNING  flake8.options.manager:manager.py:207 option --max-complexity: please update from optparse string `type=` to argparse callable `type=` -- this will be an error in the future
_______________________________________________________________________________ FLAKE8-check _______________________________________________________________________________
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:3:44: H301: one import per line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:16:49: B008 Do not perform function calls in argument defaults.  The call is performed only once at function definition time. All calls to your function will reuse the result of that definition-time function call.  If this is intended, assign the function call to a module-level variable and use that variable as a default value.
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:27:1: H404: multi line docstring should start without a leading new line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:27:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:28:1: H404: multi line docstring should start without a leading new line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:28:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:29:1: H404: multi line docstring should start without a leading new line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:29:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:30:1: H404: multi line docstring should start without a leading new line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:30:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:31:1: H404: multi line docstring should start without a leading new line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:31:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:32:1: H404: multi line docstring should start without a leading new line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:32:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:33:1: H404: multi line docstring should start without a leading new line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:33:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:34:1: H404: multi line docstring should start without a leading new line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:34:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:35:1: H404: multi line docstring should start without a leading new line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:35:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:36:1: H404: multi line docstring should start without a leading new line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:36:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:37:1: H404: multi line docstring should start without a leading new line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:37:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:38:1: H404: multi line docstring should start without a leading new line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:38:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:39:1: H404: multi line docstring should start without a leading new line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:39:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:40:1: H404: multi line docstring should start without a leading new line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:40:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:62:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:63:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:64:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:65:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:66:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:67:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:68:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:69:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:119:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:120:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:121:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:122:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:123:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:124:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:125:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:126:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:133:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:134:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:135:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:136:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:137:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:138:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:139:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:140:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:147:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:148:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:149:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:150:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:151:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:164:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:165:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:166:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:167:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:168:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:169:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:170:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:171:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:172:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:173:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:174:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:175:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:176:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:177:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:211:1: H404: multi line docstring should start without a leading new line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:211:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:212:1: H404: multi line docstring should start without a leading new line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:212:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:213:1: H404: multi line docstring should start without a leading new line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:213:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:214:1: H404: multi line docstring should start without a leading new line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:214:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:215:1: H404: multi line docstring should start without a leading new line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:215:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:216:1: H404: multi line docstring should start without a leading new line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:216:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:217:1: H404: multi line docstring should start without a leading new line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:217:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:218:1: H404: multi line docstring should start without a leading new line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:218:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:219:1: H404: multi line docstring should start without a leading new line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:219:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:220:1: H404: multi line docstring should start without a leading new line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:220:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:221:1: H404: multi line docstring should start without a leading new line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:221:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:222:1: H404: multi line docstring should start without a leading new line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:222:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:223:1: H404: multi line docstring should start without a leading new line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:223:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:224:1: H404: multi line docstring should start without a leading new line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:224:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:238:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:239:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:240:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:241:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:242:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:243:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:244:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:245:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:246:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:247:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:248:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:253:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:254:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:255:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:256:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:257:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:258:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:259:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:260:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:261:1: H405: multi line docstring summary not separated with an empty line
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/tree.py:262:1: H405: multi line docstring summary not separated with an empty line

---------------------------------------------------------------------------- Captured log call -----------------------------------------------------------------------------
WARNING  flake8.options.manager:manager.py:186 option --indent-size: please update `help=` text to use %(default)s instead of %default -- this will be an error in the future
WARNING  flake8.options.manager:manager.py:207 option --max-complexity: please update from optparse string `type=` to argparse callable `type=` -- this will be an error in the future
_______________________________________________________________________________ FLAKE8-check _______________________________________________________________________________
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/cssselect2/compiler.py:207:42: H101: Use TODO(NAME)

---------------------------------------------------------------------------- Captured log call -----------------------------------------------------------------------------
WARNING  flake8.options.manager:manager.py:186 option --indent-size: please update `help=` text to use %(default)s instead of %default -- this will be an error in the future
WARNING  flake8.options.manager:manager.py:207 option --max-complexity: please update from optparse string `type=` to argparse callable `type=` -- this will be an error in the future

---------- coverage: platform linux, python 3.8.12-final-0 -----------
Name                       Stmts   Miss Branch BrPart  Cover
------------------------------------------------------------
cssselect2/__init__.py        46     35     20      0    17%
cssselect2/compiler.py       172     12    142     10    92%
cssselect2/parser.py         252      7     98      8    96%
cssselect2/tree.py           143      9     59      7    91%
tests/__init__.py              0      0      0      0   100%
tests/test_cssselect2.py     210      6     24      2    97%
------------------------------------------------------------
TOTAL                        823     69    343     27    90%

========================================================================= short test summary info ==========================================================================
XFAIL tests/test_cssselect2.py::test_valid_selectors[test107]
  reason:
XFAIL tests/test_cssselect2.py::test_invalid_selectors[test27]
  reason:
XFAIL tests/test_cssselect2.py::test_invalid_selectors[test28]
  reason:
FAILED cssselect2/parser.py::FLAKE8
FAILED tests/test_cssselect2.py::FLAKE8
FAILED cssselect2/tree.py::FLAKE8
FAILED cssselect2/compiler.py::FLAKE8
================================================================= 4 failed, 248 passed, 3 xfailed in 4.94s =================================================================
pytest-xprocess reminder::Be sure to terminate the started process by running 'pytest --xkill' if you have not explicitly done so in your fixture with 'xprocess.getinfo(<process_name>).terminate()'.

@kloczek
Copy link
Author

kloczek commented Sep 3, 2021

No that patch is only beginnig full switch to setuptools :/
Will try to finish it later.

@liZe
Copy link
Member

liZe commented Sep 4, 2021

Thanks for your work on this, but we’re actually really happy with Flit. It’s just a tool to create packages, for sure, but we find it really good at this.

You can launch tests with pytest, and build the documentation with sphinx-build. I did like too the possibility to launch tests and build documentation with setup.py, but when you think about it, there’s no obvious advantage.

I’m closing the issue now, as the original problem (flake8 errors and warnings) is caused by third-party plugins that we don’t use.

@liZe liZe closed this as completed Sep 4, 2021
@kloczek
Copy link
Author

kloczek commented Sep 4, 2021

Maybe you are happy however whoever would like to build documentation may be less happier
Just please keep in mind that results of your work are used by some other people.
I want only to say that from point of view people like me responsible for packaging stuff moving away from setuptools is rather regress than progress.

@liZe
Copy link
Member

liZe commented Sep 4, 2021

Maybe you are happy however whoever would like to build documentation may be less happier

We’re really sorry to see that this choice gives you problems, and we’d be really happy to help. What could you do with setuptools that you can’t do anymore about documentation?

Just please keep in mind that results of your work are used by some other people.

We know that, and we’re really grateful for your help.

I want only to say that from point of view people like me responsible for packaging stuff moving away from setuptools is rather regress than progress.

I actually know this problem, because I create packages too. There’s been a quite long conversation in Kozea/WeasyPrint#1410 about this issue, and I’d really like to fully understand the problems met by packagers in order to help them.

As a summary, my current point of view is that:

  • setuptools is not specified, can hardly be improved because of retrocompatiblity, and has been giving lots of headaches to packagers and users (mostly because it’s old and unspecified);
  • the Python Packaging Authority wrote interesting specifications (actually PEPs) to avoid the need to execute custom setup.py scripts for packaging and installation in many cases;
  • code developers can now generate and distribute wheels more easily, and can now choose between different tools to generate these wheels;
  • the Python Packaging Authority and the packagers didn’t find the time to agree on useful tools to install wheels, leading to this situation where packagers complain even more than they were complaining when there was only setuptools (and, believe me, I’ve been complaining too 😄);
  • after spending years tweaking their setuptools use and fighting against its "bugs" and limitations, packagers now have to take care of wheels, and it requires more work (and that’s frustrating, for sure);
  • these tools sometimes have to be distribution-specific, because distributions have very different requirements regarding package installation;
  • when this work is done, having a standardized packaging format will help both code developers and packagers to simplify their workflows: installing wheels without using setuptools is often really easier than installing source packages, but it requires tools, and some of them are not written yet.

As explained in Kozea/WeasyPrint#1410, I’d be really interested in discussing this topic, understanding everybody’s point of view, and of course changing my mind 😉.

@kloczek
Copy link
Author

kloczek commented Sep 4, 2021

Maybe you are happy however whoever would like to build documentation may be less happier

We’re really sorry to see that this choice gives you problems, and we’d be really happy to help. What could you do with setuptools that you can’t do anymore about documentation?

Just please keep in mind that results of your work are used by some other people.

We know that, and we’re really grateful for your help.

I want only to say that from point of view people like me responsible for packaging stuff moving away from setuptools is rather regress than progress.

I actually know this problem, because I create packages too. There’s been a quite long conversation in Kozea/WeasyPrint#1410 about this issue, and I’d really like to fully understand the problems met by packagers in order to help them.

As a summary, my current point of view is that:

  • setuptools is not specified, can hardly be improved because of retrocompatiblity, and has been giving lots of headaches to packagers and users (mostly because it’s old and unspecified);

In case of my packages:

[tkloczko@barrel SPECS]$ grep -w %py3_build python-*| wc -l; ls -l python-* | wc -l 
609
616

(as you see in ~99% of all cases was possible to use setuptools.
There are only two problems:

  • the Python Packaging Authority wrote interesting specifications (actually PEPs) to avoid the need to execute custom setup.py scripts for packaging and installation in many cases;

OK so how to:

  • build, update and install .mo files?
  • build and install documentation?
  • code developers can now generate and distribute wheels more easily, and can now choose between different tools to generate these wheels;

~80% of all .whl files are stipped documentation and test suites.
This cayused that I was forced to switch almost all my build procedures to to use VCS tar balls instedad sdist.

[tkloczko@barrel SPECS]$ grep -w "Source0:.*VCS" python-*| wc -l; ls -l python-* | wc -l
511
616

Especially striping down test suites is painful as looks like some people do not understand that executing packages test suites allows detest many issues not only in just packaged stuff but software which is in build env. Will show you some stats from my packages:

[tkloczko@barrel SPECS]$ grep -w ^%pytest python-*| wc -l; ls -l python-* | wc -l
560
616

And the same metric out of Fedora spec files:

[tkloczko@barrel SPECS.fedora]$ grep -w ^%pytest python-*| wc -l; ls -l python-* | wc -l
358
2611
  • the Python Packaging Authority and the packagers didn’t find the time to agree on useful tools to install wheels, leading to this situation where packagers complain even more than they were complaining when there was only setuptools (and, believe me, I’ve been complaining too 😄);

This authority does not need to agree on anything as +98% of all packages is possible to build using setuptool. That number actually slightly decreased when few people decided to switch to flit.

  • after spending years tweaking their setuptools use and fighting against its "bugs" and limitations, packagers now have to take care of wheels, and it requires more work (and that’s frustrating, for sure);

In this world we are dealing with only no-so-well-tested-software.
Bugs are not any problems. Only avg fixing time matters. setuptools is doing quite well in that context.

  • these tools sometimes have to be distribution-specific, because distributions have very different requirements regarding package installation;

I woiud like to see example of such issue. setuptools plays the same role as meson, cmake or GNU autotools. None of them are perfect. I've mentioned about two issues with which I'm dealing in case seuptools so the same is about python tooling.

  • when this work is done, having a standardized packaging format will help both code developers and packagers to simplify their workflows: installing wheels without using setuptools is often really easier than installing source packages, but it requires tools, and some of them are not written yet.

flit does not standardise anything. At the moment it is just only archiver which packs python stiff adding files checksums and metadata transferred from project.toml.

Additionally flit cannot reuse setuptools metadata from setup.cfg/project.toml files. The same is doing poetry. Instead standardisations IMO PEP517 opens completely new are to mess with things which are JustWiorks™️

As explained in Kozea/WeasyPrint#1410, I’d be really interested in discussing this topic, understanding everybody’s point of view, and of course changing my mind 😉.

That is small issue. Everything else is working without any issues.
Moving away from setuptools only because of that issue is IMO kind of irrational.

Using .whl files as interim archive additionally crates on packaging layer few new issue:

  • on building documentation quite often sphinx needs proper access to module metadata however with .whl based build/install procedure those metadata will be available only in install stage when .whl file will be unpackaged to dome `</install/prefix>' so it creates kind of kind of catch 22 situation (you cannot build all stuff in build stage because some files will be available only in install stage),
  • using .whl completely does not care about modules which are building DSOs because .whl does not contain any build details as that format is packaging format of the build procedure
  • .whl contains all files which should be installed in python env. Sphinx allows build documentation in +10 formats. In .whl there is no place for source or dest documentation formats. test suite does not need to be installed. They need to be fired at some poet of packaging procedure.
  • .whl is trying to solve python centric issue. Completely does not care that exact OS distribution may provide resources in own packages format because .whl format is completely useless outside python area so another packaging format like deb, rpm or Solaris IPS needs to be used as OS distribution format.

@liZe
Copy link
Member

liZe commented Sep 4, 2021

(as you see in ~99% of all cases was possible to use setuptools.

Of course, as setuptools has been the only solution for a very long time.

There are only two problems

Actually, only two problems for you 😉.

OK so how to:

  • build, update and install .mo files?
  • build and install documentation?

With setuptools, and with custom Python code.

As I said, "avoid the need to execute custom setup.py scripts for packaging and installation in many cases", not always.

The goal of the new PEPs is not to replace setuptools. The goal is to provide a standard format allowing users and packagers to package and install the code is a defined way. Having a standard gives the possibility to have different tools for that.

In a perfect world, the distribution packaging workflow would be:

  • build the wheel from the source package (only when the distributed wheels are not enough),
  • install the code from the wheel,
  • install everything else from the source (only when the code is not enough).

In more and more cases, these two first steps can now be done without even knowing which tools are used for packaging. wheel can create the wheel, and wheels have a standard way of storing Python modules. The third point is already done in many different ways depending on the package, there’s no standard, it requires extra work for the distribution packager.

~80% of all .whl files are stipped documentation and test suites.

Sure, wheels are mainly defined to store and distribute code.

You know that distributions are very opinionated about what to install, where to install, how to install. The PyPA can’t solve all these problems at once 😞. At least they proposed a standard that works with Python code and data specific to the installed packages. That’s a start.

This cayused that I was forced to switch almost all my build procedures to to use VCS tar balls instedad sdist.

If you want to do more than to install code, you can use the source package distributed on PyPI. You can launch tests by launching pytest. You can build documentation by launching sphinx-build. You can build the wheel and use it for installing code.

flit does not standardise anything.

I agree 😄.

At the moment it is just only archiver which packs python stiff adding files checksums and metadata transferred from project.toml.

Again, I agree.

Additionally flit cannot reuse setuptools metadata from setup.cfg/project.toml files. The same is doing poetry.

That’s not true anymore. It’s recently been standardized in PEP 621.

Instead standardisations IMO PEP517 opens completely new are to mess with things which are JustWiorks

Here, I disagree.

Yes, having a new standard means that new ways of packaging are possible. It also means that new tools have to be written, and that’s frustrating.

But saying that setuptools just works is not true in my opinion. It somehow works for you when the bugs you report are fixed, and because you’ve spent endless hours to report bugs, create packaging scripts, deeply understand how the library options work even when they’re not documented and not reliable. It just works because you’re a setuptools guru.

Packaging with Python is a mess. Python Packaging can definitely be improved. But of course, it requires packagers to write new tools, and that’s painful.

The difference is that, by building wheels, you can rely on a standard for more and more cases. When a package doesn’t follow the standard, we can complain, and it’s often easier to find an agreement. When a package use an undocumented setuptools option whose behavior changed between two minor releases, we’ll spend a lot of time fighting about whether it’s a bug or a feature 😉.

That is small issue. Everything else is working without any issues.
Moving away from setuptools only because of that issue is IMO kind of irrational.

Then you’re fighting the wrong guy 😄.

Python explains in PEP 517 that:

While distutils / setuptools have taken us a long way, they suffer from three serious problems: (a) they're missing important features like usable build-time dependency declaration, autoconfiguration, and even basic ergonomic niceties like DRY-compliant version number management, and (b) extending them is difficult, so while there do exist various solutions to the above problems, they're often quirky, fragile, and expensive to maintain, and yet (c) it's very difficult to use anything else, because distutils/setuptools provide the standard interface for installing packages expected by both users and installation tools like pip.

The goal of this PEP is get distutils-sig out of the business of being a gatekeeper for Python build systems. If you want to use distutils, great; if you want to use something else, then that should be easy to do using standardized methods. The difficulty of interfacing with distutils means that there aren't many such systems right now, but to give a sense of what we're thinking about see flit or bento. Fortunately, wheels have now solved many of the hard problems here -- e.g. it's no longer necessary that a build system also know about every possible installation configuration -- so pretty much all we really need from a build system is that it have some way to spit out standard-compliant wheels and sdists.

I just followed what the Python devs agreed on 3 years ago. Some of your points may be relevant, but you’ll have to convince them, not me ❤️.

@kloczek
Copy link
Author

kloczek commented Sep 4, 2021

(as you see in ~99% of all cases was possible to use setuptools.

Of course, as setuptools has been the only solution for a very long time.

There are only two problems

Actually, only two problems for you 😉.

Actually one because one is already solved in form of PR. Both problem have been exposed because I'm trying to use setuptools<>sphinx integration to generate, build and install modules documentation as man pages.
Looks like no one before have been trying to do that so obviously that are was never tested enough.
That is the risk of doing something which no one done before.
Result ..

[tkloczko@barrel rpmbuild]$ man python-
Display all 273 possibilities? (y or n)
python-amqp                               python-greenlet                           python-parver                             python-smmap.tex
python-anyiodoc                           python-h11                                python-paste                              python-sniffio
python-anytree                            python-h2                                 python-paste-deploy                       python-sos
python-argcomplete                        python-hacking                            python-path                               python-sphinx-argparse
python-argon2-cffi                        python-hpack                              python-pathspec                           python-sphinx-click
python-arrow                              python-html5lib                           python-pep517                             python-sphinxcontrib-asyncio
python-asgi                               python-httpcore                           python-pillow                             python-sphinxcontrib-autoprogram
python-aspectlib                          python-httplib2                           python-platformdirs                       python-sphinxcontrib-bibtex
python-astor                              python-hypercorn                          python-pluggy                             python-sphinxcontrib-httpdomain
python-astroid                            python-hyperframe                         python-polib                              python-sphinxcontrib-programoutput
python-async_generator                    python-hyperlink                          python-prb                                python-sphinxcontrib-trio
python-atomicwrites                       python-hypothesis                         python-priority                           python-sphinxcopybutton
python-attrs                              python-ifaddr                             python-productmd-compose                  python-sphinxext-opengraph
python-augeas                             python-importlib-metadata                 python-productmd-composeinfo              python-sphinx-inline-tabs
python-autodocsumm                        python-inflect                            python-productmd-discinfo                 python-sphinx-removed-in
python-automat                            python-ipykernel                          python-productmd-images                   python-sphinx_rtd_theme
python-babel                              python-ipythonparallel                    python-productmd-rpms                     python-sphinx-tabs
python-backcall                           python-itsdangerous                       python-productmd-terminology              python-sphinx-typlog-theme
python-backports.entry-points-selectable  python-jaraco-classes                     python-productmd-treeinfo                 python-sphobjinv
python-benchmark                          python-jaraco-collections                 python-prompt_toolkit                     python-sqlalchemy
python-betamax                            python-jaraco-envs                        python-psutil                             python-sqlparse
python-billiard                           python-jaraco-functools                   python-ptyprocess                         python-stdlib-list
python-bleach                             python-jaraco.itertools                   python-purl                               python-stem
python-blinker                            python-jaraco-packaging                   python-py                                 python-sure
python-boto3                              python-jaraco-path                        python-pyasn1                             python-sybil
python-botocore                           python-jaraco-text                        python-pybtex                             python-systemd
python-bottle                             python-jedi                               python-pybtex-docutils                    python-tempora
python-breathe                            python-Jinja                              python-pycodestyle                        python-terminado
python-build                              python-jinja2_pluralize                   python-pydocstyle                         python-testpath
python-cachetools                         python-jmespath                           python-pyfakefs                           python-test_server
python-cffi                               python-jsonschema                         python-pyftpdlib                          python-testtools
python-characteristic                     python-jupyter_client                     python-pygal                              python-tidy
python-chardet                            python-jupyter_core                       python-pygments                           python-tinycss2
python-charset-normalizer                 python-jupytext                           python-pyhamcrest                         python-toolz
python-cheroot                            python-kiwi                               python-pyiso8601                          python-tornado
python-click                              python-kombu                              python-pylama                             python-tox
python-click-log                          python-lark                               python-pylint                             python-traitlets
python-commonmark-py                      python-latexcodec                         python-pymeeus                            python-transaction
python-contextlib2                        python-lazy-object-proxy                  python-pynacl                             python-trio
python-convertdate                        python-libevdev                           python-pyopenssl                          python-trustme
python-coveragepy                         python-linkify-it-py                      python-pyrad                              python-twisted
python-coveralls                          python-lockfile                           python-pyrsistent                         python-uritemplate
python-cppy                               python-lxml                               python-pyscss                             python-urllib3
python-cssselect2                         python-lz4                                python-pytest                             python-validators
python-cython                             python-m2r                                python-pytest-cov                         python-vine
python-dateutil                           python-mako                               python-pytest-regressions                 python-virtualenv
python-decorator                          python-markupsafe                         python-pytest-runner                      python-waitress
python-dictdiffer                         python-mdit-py-plugins                    python-pytest-trio                        python-wcwidth
python-dnspython                          python-metaextract                        python-pytest-xprocess                    python-webcolors
python-dulwich                            python-mistune                            python-python-sphinx-contribspelling      python-webencodings
python-elasticsearch-py                   python-mock                               python-pyudev                             python-webob
python-elementpath                        python-more-itertools                     python-pyxattr                            python-websocket-client
python-entrypoints                        python-mpi4py                             python-pyxdg                              python-websockets
python-evdev                              python-msgpack                            python-requests                           python-webtest
python-eventlet                           python-multidict                          python-requests-mock                      python-werkzeug
python-execnet                            python-multipledispatch                   python-requests_toolbelt                  python-wheel
python-factory-boy                        python-mypy                               python-rfc3986                            python-Whoosh
python-faker                              python-myst-parser                        python-rich                               python-wrapt
python-fields                             python-nbclient                           python-rsa                                python-WSGIProxy2
python-flake8                             python-nbformat                           python-rst.linker                         python-wsproto
python-flask                              python-netaddr                            python-scons                              python-xmlschema
python-flask-sqlalchemy                   python-nose2                              python-scripttest                         python-yamlloader
python-flit                               python-notebook                           python-selenium                           python-yarl
python-fonttools                          python-numpydoc                           python-semantic-version                   python-zeroconf
python-gcovr                              python-olefile                            python-service-identity                   python-zipp
python-gidocgen                           python-openstackdocstheme                 python-setuptools                         python-zope-event
python-gitdb                              python-outcome                            python-simpleline
python-gitpython                          python-paramiko                           python-six
python-graphviz                           python-parso                              python-smartypants

OK so how to:

  • build, update and install .mo files?
  • build and install documentation?

With setuptools, and with custom Python code.

In case of meson, cmake and autotools all what you need is declare GETTXTDOMAIN and list if supported languages.
How often something is needed? Again I can check that usig my build procedures:

[tkloczko@barrel SPECS]$ grep -w %find_lang python-*| wc -l; ls -l python-* | wc -l                                                                                         11
616

As I said, "avoid the need to execute custom setup.py scripts for packaging and installation in many cases", not always.

The goal of the new PEPs is not to replace setuptools. The goal is to provide a standard format allowing users and packagers to package and install the code is a defined way. Having a standard gives the possibility to have different tools for that.

However flit is trying to do that. Poetry is generating setup.py with import setuptools.
Nevertheless in current new approach with setup.cfg/project.toml there is no place for setup.py so handling i18n or building DSO modules is not handled..

In a perfect world, the distribution packaging workflow would be:

  • build the wheel from the source package (only when the distributed wheels are not enough),
  • install the code from the wheel,
  • install everything else from the source (only when the code is not enough).

So no possibility to choose documentation format, building DSOs or include test suite .. far from ideal world :/
BTW DSOs (I'll use again my population of packaging procedures)

[tkloczko@barrel SPECS]$ grep -l "BuildArch:.*noarch" python-*| wc -l; ls -l python-* | wc -l
562
616

As youi see ~1/12 of all python modules brings DSOs.
Looks .whl completely does not care about that part of all python modules

In more and more cases, these two first steps can now be done without even knowing which tools are used for packaging. wheel can create the wheel, and wheels have a standard way of storing Python modules. The third point is already done in many different ways depending on the package, there’s no standard, it requires extra work for the distribution packager.

Sorry but I don't see that kind of cases. Can you point on such at least one?

~80% of all .whl files are stipped documentation and test suites.

Sure, wheels are mainly defined to store and distribute code.

That is the problem that it may work only in case when everything is maintained using pip which as I wrote is not acceptable from point of view any OS distribution.

You know that distributions are very opinionated about what to install, where to install, how to install. The PyPA can’t solve all these problems at once 😞. At least they proposed a standard that works with Python code and data specific to the installed packages. That’s a start.

That varies only ion case of something new.
One example. Working on PLD distribution ~18 years ago I found that there is no reason to keep all X11 stuff in /usr/X11R6 prefix. Today ALL Linux and non-Linux have no such separation.
As long as something has been tested by at least implementation showing that something simplifies some bits everyone follows and it became standard se facto.

This cayused that I was forced to switch almost all my build procedures to to use VCS tar balls instedad sdist.

If you want to do more than to install code, you can use the source package distributed on PyPI. You can launch tests by launching pytest. You can build documentation by launching sphinx-build. You can build the wheel and use it for installing code.

I can only repeat: what about modules with DSOs? Are you going to cross compile every possible OS/arch id package in .whl all possible executables files and on install out of pypi .whl file only what I need on my system?
What about the case when some library will change ABI without changing API so recompile is needed?
Should I wait until updated .whl file will appear on pypi? How to distinguish which one .whl file is for which one external library SONAME? That is only beginning of the path to the rabbit hole to which I'm jumping on daily bases.

flit does not standardise anything.

I agree 😄.

At least in one point we've reached agreement 😄

At the moment it is just only archiver which packs python stiff adding files checksums and metadata transferred from project.toml.

Again, I agree.
👍

Additionally flit cannot reuse setuptools metadata from setup.cfg/project.toml files. The same is doing poetry.

That’s not true anymore. It’s recently been standardized in PEP 621.

Practice is different.
Look on this module code

[tool.flit.metadata]
module = 'cssselect2'
author = 'Simon Sapin'
author-email = 'simon.sapin@exyr.org'
maintainer = 'CourtBouillon'
maintainer-email = 'contact@courtbouillon.org'
home-page = 'https://doc.courtbouillon.org/cssselect2/'
requires = ['tinycss2', 'webencodings']
requires-python = '>=3.6'
keywords = 'css elementtree'
description-file = 'README.rst'
classifiers = [
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3 :: Only',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: Implementation :: CPython',
'Programming Language :: Python :: Implementation :: PyPy',
'Topic :: Internet :: WWW/HTTP',
]

This is why I was not able quickly prepare patch migrating from flit to setuptools backend
Yesterday I found that similar situation in in all currently using flit modules.

Instead standardisations IMO PEP517 opens completely new are to mess with things which are JustWiorks

Here, I disagree.

Can you provide some evidences of that?

Yes, having a new standard means that new ways of packaging are possible. It also means that new tools have to be written, and that’s frustrating.

IMO effectively PEP517 opened the gates for new problems without solving even one old problems. Why?
One of the main reasons to move to new format was use .dist-info instead .egg-info. pip and setuptools can do will what was missing here and flit or poetry only minimised own functionalities to archiving functionalities. poetry can show nicer build or runtime dependencies but that is possible to do as well now with few other tools.

But saying that setuptools just works is not true in my opinion. It somehow works for you when the bugs you report are fixed, and because you’ve spent endless hours to report bugs, create packaging scripts, deeply understand how the library options work even when they’re not documented and not reliable. It just works because you’re a setuptools guru.

+/- few minor issues which re on the area whichflit or poetry will never touch.
When I've asked flit maintainer is he going to provide some form of flit<>sphinx integration he simple said that flit is not about that.
If it is not all what flit do can be done now using raw build module.
Why someone needs more build like modules?

Packaging with Python is a mess. Python Packaging can definitely be improved. But of course, it requires packagers to write new tools, and that’s painful.

Actually it i not mess. Possibility to usethe same tooling across 99% of all modules is incredibly high compare to what perl tooling provides (you have two major frameworks + another 2-3 used in case of less than 2% of all perl modules). python looks way better in case of php.

The difference is that, by building wheels, you can rely on a standard for more and more cases. When a package doesn’t follow the standard, we can complain, and it’s often easier to find an agreement. When a package use an undocumented setuptools option whose behavior changed between two minor releases, we’ll spend a lot of time fighting about whether it’s a bug or a feature 😉.

Wheel is only format standard which packs into zip all files + metadata.
Only this and nothing more. Is useless in case of modules which have DSOs.

That is small issue. Everything else is working without any issues.
Moving away from setuptools only because of that issue is IMO kind of irrational.

Then you’re fighting the wrong guy 😄.

Python explains in PEP 517 that:

While distutils / setuptools have taken us a long way, they suffer from three serious problems: (a) they're missing important features like usable build-time dependency declaration, autoconfiguration, and even basic ergonomic niceties like DRY-compliant version number management, and (b) extending them is difficult, so while there do exist various solutions to the above problems, they're often quirky, fragile, and expensive to maintain, and yet (c) it's very difficult to use anything else, because distutils/setuptools provide the standard interface for installing packages expected by both users and installation tools like pip.

setuptools maintainer recently commented under one of my tickets that he is worry that what is working now may not not be working soon. Look .. on pipi is registered +200k modules.
flit and poetry does not solve any setuptools problems.
If current setup.py/setup.cfg arte badly coded still flit or poetry cannot improve those files because overhead to improve those files according to latest setuptools documentation will be EXACTLY the same and and on migration to flit or poetry few bits will be lost.

The goal of this PEP is get distutils-sig out of the business of being a gatekeeper for Python build systems. If you want to use distutils, great; if you want to use something else, then that should be easy to do using standardized methods. The difficulty of interfacing with distutils means that there aren't many such systems right now, but to give a sense of what we're thinking about see flit or bento. Fortunately, wheels have now solved many of the hard problems here -- e.g. it's no longer necessary that a build system also know about every possible installation configuration -- so pretty much all we really need from a build system is that it have some way to spit out standard-compliant wheels and sdists.

I just followed what the Python devs agreed on 3 years ago. Some of your points may be relevant, but you’ll have to convince them, not me ❤️.

Who exactly I need to convince?

Look .. you cannot say "follow the lead" because what was crystal clear may not be still clear today. In last 3 years setuptools changed substantially. That simple fact needs to be added to whole picture and/or/ analysing whole subject with that "follow the lead" in the hand may today lead to dead end.
3 years in software development it is almost whole era .. again today setuptools seems is doing pretty accurate what it suppose to do and time response in fond issues is relatively short.
Just peaked on my automation status page and I see that that automation was able peak new setupotools version and rebuild whole package with only changed version in spec file and the same automation already grinded 60% of all my python packages which depends on setuptools to confirm that all packages still build correctly (so far none of the fails)

@liZe
Copy link
Member

liZe commented Sep 4, 2021

In case of meson, cmake and autotools all what you need is declare GETTXTDOMAIN and list if supported languages.

Of course, that would be nice to have this in pyproject.toml. But we don’t have it yet in a standard way.

This is why I was not able quickly prepare patch migrating from flit to setuptools backend

With both formats you can generate a wheel. You don’t have to take care of this if you use a wheel.

(But we’ll do our best to use the new standard as soon as we can!)

Can you provide some evidences of that? […] Actually it i not mess.

While distutils / setuptools have taken us a long way, they suffer from three serious problems: (a) they're missing important features like usable build-time dependency declaration, autoconfiguration, and even basic ergonomic niceties like DRY-compliant version number management, and (b) extending them is difficult, so while there do exist various solutions to the above problems, they're often quirky, fragile, and expensive to maintain, and yet (c) it's very difficult to use anything else, because distutils/setuptools provide the standard interface for installing packages expected by both users and installation tools like pip.

That’s what the PEP says, and I agree. That’s what I call a mess, but even if the the word is not the right one, the idea behind is still the same: some people (including the Python core devs who accepted the PEP) think that setuptools does not "just work".

When I've asked flit maintainer is he going to provide some form of flit<>sphinx integration he simple said that flit is not about that.
If it is not all what flit do can be done now using raw build module.
Why someone needs more build like modules?

Because the CLI and default options are really nice in my opinion.

Wheel is only format standard which packs into zip all files + metadata.
Only this and nothing more. Is useless in case of modules which have DSOs.

Yes, we’ll always have packages that don’t work with wheels, and that will need a custom installation script.

flit and poetry does not solve any setuptools problems.

They may not solve your problems, but they do solve some of my problems:

  • have only one file with metadata, dependencies, list of included files in source packages and wheels, etc.
  • reproducible builds that can be easily tested before being uploaded,
  • a nice CLI and default options.

If current setup.py/setup.cfg arte badly coded still flit or poetry cannot improve those files because overhead to improve those files according to latest setuptools documentation will be EXACTLY the same and and on migration to flit or poetry few bits will be lost.

At least it’s now possible to totally remove these setup files for many projects. No more specific script, no more unspecified file format. That was a nice step for WeasyPrint.

Who exactly I need to convince?

The people who wrote and accepted the PEP 😄.

Look .. you cannot say "follow the lead" because what was crystal clear may not be still clear today. In last 3 years setuptools changed substantially. That simple fact needs to be added to whole picture and/or/ analysing whole subject with that "follow the lead" in the hand may today lead to dead end.

The 3 problems listed in the PEP about distutils/setuptools are not solved:
(a) they're missing important features like usable build-time dependency declaration, autoconfiguration, and even basic ergonomic niceties like DRY-compliant version number management, and
(b) extending them is difficult, so while there do exist various solutions to the above problems, they're often quirky, fragile, and expensive to maintain, and yet
(c) it's very difficult to use anything else, because distutils/setuptools provide the standard interface for installing packages expected by both users and installation tools like pip.

And for me, technically, it’s still impossible to use setuptools with only one configuration file. I’ve spent a lot of time trying random things in various files when I was using setuptools, and I always had to dig the code and read endless comments in issues to find a fragile solution. It’s now easier: even if the format is young and sees a lot of regular improvements, I just have to read a PEP to write one file.

Just peaked on my automation status page and I see that that automation was able peak new setupotools version and rebuild whole package with only changed version in spec file and the same automation already grinded 60% of all my python packages which depends on setuptools to confirm that all packages still build correctly (so far none of the fails)

Good for you 😄.

@kloczek
Copy link
Author

kloczek commented Oct 3, 2021

Going back to the subject .. I still have some pytest failing units :/

+ PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-cssselect2-0.4.1-2.1.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-cssselect2-0.4.1-2.1.fc35.x86_64/usr/lib/python3.8/site-packages
+ /usr/bin/pytest -ra tests
=========================================================================== test session starts ============================================================================
platform linux -- Python 3.8.12, pytest-6.2.5, py-1.10.0, pluggy-0.13.1
benchmark: 3.4.1 (defaults: timer=time.perf_counter disable_gc=False min_rounds=5 min_time=0.000005 max_time=1.0 calibration_precision=10 warmup=False warmup_iterations=100000)
Using --randomly-seed=2066477642
rootdir: /home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1, configfile: pyproject.toml
plugins: forked-1.3.0, shutil-1.7.0, virtualenv-1.7.0, expect-1.1.0, flake8-1.0.7, timeout-1.4.2, betamax-0.8.1, freezegun-0.4.2, aspectlib-1.5.2, toolbox-0.5, rerunfailures-9.1.1, requests-mock-1.9.3, cov-2.12.1, flaky-3.7.0, benchmark-3.4.1, xdist-2.3.0, pylama-7.7.1, datadir-1.3.1, regressions-2.2.0, xprocess-0.18.1, black-0.3.12, asyncio-0.15.1, subtests-0.5.0, isort-2.0.0, hypothesis-6.14.6, mock-3.6.1, profiling-1.7.0, randomly-3.8.0, nose2pytest-1.0.8, pyfakefs-4.5.1, tornado-0.8.1, twisted-1.13.3, aiohttp-0.3.0, localserver-0.5.0, anyio-3.3.1, trio-0.7.0, cases-3.6.4, yagot-0.5.0, Faker-8.14.1
collected 241 items

tests/test_cssselect2.py ......................x.......................................................................                                              [ 39%]
tests/__init__.py .                                                                                                                                                  [ 39%]
tests/test_cssselect2.py .........................x.......................................................x........................................                  [ 90%]
tests/__init__.py .                                                                                                                                                  [ 90%]
tests/test_cssselect2.py .........F.............                                                                                                                     [100%]

================================================================================= FAILURES =================================================================================
_______________________________________________________________________________ FLAKE8-check _______________________________________________________________________________
/home/tkloczko/rpmbuild/BUILD/cssselect2-0.4.1/tests/test_cssselect2.py:12:38: H301: one import per line

---------------------------------------------------------------------------- Captured log call -----------------------------------------------------------------------------
WARNING  flake8.options.manager:manager.py:186 option --indent-size: please update `help=` text to use %(default)s instead of %default -- this will be an error in the future
WARNING  flake8.options.manager:manager.py:207 option --max-complexity: please update from optparse string `type=` to argparse callable `type=` -- this will be an error in the future

---------- coverage: platform linux, python 3.8.12-final-0 -----------
Name                       Stmts   Miss Branch BrPart  Cover
------------------------------------------------------------
cssselect2/__init__.py        46     35     20      0    17%
cssselect2/compiler.py       172     12    142     10    92%
cssselect2/parser.py         252      7     98      8    96%
cssselect2/tree.py           143      9     59      7    91%
tests/__init__.py              0      0      0      0   100%
tests/test_cssselect2.py     210      6     24      2    97%
------------------------------------------------------------
TOTAL                        823     69    343     27    90%

========================================================================= short test summary info ==========================================================================
XFAIL tests/test_cssselect2.py::test_invalid_selectors[test28]
  reason:
XFAIL tests/test_cssselect2.py::test_valid_selectors[test107]
  reason:
XFAIL tests/test_cssselect2.py::test_invalid_selectors[test27]
  reason:
FAILED tests/test_cssselect2.py::FLAKE8
================================================================= 1 failed, 237 passed, 3 xfailed in 3.39s =================================================================
pytest-xprocess reminder::Be sure to terminate the started process by running 'pytest --xkill' if you have not explicitly done so in your fixture with 'xprocess.getinfo(<process_name>).terminate()'.

@liZe
Copy link
Member

liZe commented Oct 3, 2021

The other Hxxx are probably reported by hacking, a tool we don’t use.

The failing test is caused by hacking, we don’t want to use this tool for linting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants