• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

elParaguayo / qtile / 12036727602
83%

Build:
DEFAULT BRANCH: master
Ran 26 Nov 2024 06:36PM UTC
Jobs 8
Files 151
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

26 Nov 2024 03:01PM UTC coverage: 75.687% (+0.002%) from 75.685%
12036727602

push

github

tych0
tests: don't use multiprocessing.Queue

we are getting some warnings in pythons >= 3.12 of the following form:

      /opt/hostedtoolcache/Python/3.12.7/x64/lib/python3.12/multiprocessing/popen_fork.py:66: Deprecat
        self.pid = os.fork()

    -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
    ==== 1277 passed, 25 skipped, 2 xpassed, 299 warnings in 1252.65s (0:20:52) ====

it turns out that some of these are from Qtile proper that I have fixed,
but the test suite itself spawns threads, which causes these again when we
e.g. use multiprocessing.Process() to create a process (the subprocess
module uses vfork() under the hood, so it is not subject to these same
problems or DeprecationWarnings).

pytest's docs [1] explicitly mention that it is single threaded:

    pytest is single-threaded, executing its tests always in the same
    thread, sequentially, never spawning any threads itself.

so it's not pytest. So who is spawning the threads? Almost as an
afterthought of an implementation detail, it seems to be
multiprocessing.Queue [2]:

    When a process first puts an item on the queue a feeder thread is
    started which transfers objects from a buffer into the pipe.

Since we use multiprocessing.Queue in the `logger` fixture, the fixture is
run, the Queue thread is started, etc. all before we spawn the qtile
process, and we get this warning.

Luckily, we can implement this same functionality directly via os.pipe()
and os.fork() in less code than the fixture setup with one insight: we
don't need constant message passing, because we're not worried about the
kernel's pipe buffer filling up. This is only for test cases, who only ever
write a small amount of logs, so "64k should be enough for anybody".

Unfortunately, this only gets us a few warnings reduced: the ones from
test_manager, and a few from test_base and test_tasklist. But, it's a
start...

[1]: https://docs.pytest.org/en/stable/explanation/flaky.html#thread-safety
... (continued)

16337 of 21585 relevant lines covered (75.69%)

5.4 hits per line

Jobs
ID Job ID Ran Files Coverage
1 3.13-x11 - 12036727602.1 26 Nov 2024 06:45PM UTC 0
68.08
GitHub Action Run
2 3.10-wayland - 12036727602.2 26 Nov 2024 06:45PM UTC 0
66.9
GitHub Action Run
3 3.13-wayland - 12036727602.3 26 Nov 2024 06:45PM UTC 0
66.94
GitHub Action Run
4 3.11-x11 - 12036727602.4 26 Nov 2024 06:45PM UTC 0
68.06
GitHub Action Run
5 3.12-wayland - 12036727602.5 26 Nov 2024 06:45PM UTC 0
66.91
GitHub Action Run
6 3.11-wayland - 12036727602.6 26 Nov 2024 06:45PM UTC 0
66.93
GitHub Action Run
7 3.12-x11 - 12036727602.7 26 Nov 2024 06:45PM UTC 0
68.09
GitHub Action Run
8 3.10-x11 - 12036727602.8 26 Nov 2024 06:46PM UTC 0
68.06
GitHub Action Run
Source Files on build 12036727602
Detailed source file information is not available for this build.
  • Back to Repo
  • 1dacffb8 on github
  • Prev Build on master (#11947753244)
  • Next Build on master (#12104612737)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc