Mercurial > hg
annotate pyproject.toml @ 52217:96b113d22b34 stable
rust-update: handle SIGINT from long-running update threads
The current code does not respond to ^C until after the Rust bit is finished
doing its work. This is expected, since Rust holds the GIL for the duration
of the call and does not call `PyErr_CheckSignals`. Freeing the GIL to do our
work does not really improve anything since the Rust threads are still going,
and the only way of cancelling a thread is by making it cooperate.
So we do the following:
- remember the SIGINT handler in hg-cpython and reset it after the call
into core (see inline comment in `update.rs` about this)
- make all update threads watch for a global `AtomicBool` being `true`,
and if so stop their work
- reset the global bool and exit early (i.e. before writing the dirstate)
- raise SIGINT from `hg-cpython` if update returns `InterruptReceived`
author | Raphaël Gomès <rgomes@octobus.net> |
---|---|
date | Tue, 12 Nov 2024 12:52:13 +0100 |
parents | d4b275587847 |
children |
rev | line source |
---|---|
46381 | 1 [build-system] |
2 requires = ["setuptools", "wheel"] | |
52003
d4b275587847
install: static data moved from setup.py to pyproject.toml
paugier <pierre.augier@univ-grenoble-alpes.fr>
parents:
48004
diff
changeset
|
3 build-backend = "setuptools.build_meta" |
d4b275587847
install: static data moved from setup.py to pyproject.toml
paugier <pierre.augier@univ-grenoble-alpes.fr>
parents:
48004
diff
changeset
|
4 |
d4b275587847
install: static data moved from setup.py to pyproject.toml
paugier <pierre.augier@univ-grenoble-alpes.fr>
parents:
48004
diff
changeset
|
5 |
d4b275587847
install: static data moved from setup.py to pyproject.toml
paugier <pierre.augier@univ-grenoble-alpes.fr>
parents:
48004
diff
changeset
|
6 [project] |
d4b275587847
install: static data moved from setup.py to pyproject.toml
paugier <pierre.augier@univ-grenoble-alpes.fr>
parents:
48004
diff
changeset
|
7 name = "mercurial" |
d4b275587847
install: static data moved from setup.py to pyproject.toml
paugier <pierre.augier@univ-grenoble-alpes.fr>
parents:
48004
diff
changeset
|
8 authors = [ |
d4b275587847
install: static data moved from setup.py to pyproject.toml
paugier <pierre.augier@univ-grenoble-alpes.fr>
parents:
48004
diff
changeset
|
9 {name = "Olivia Mackall and many others", email = "mercurial@mercurial-scm.org"}, |
d4b275587847
install: static data moved from setup.py to pyproject.toml
paugier <pierre.augier@univ-grenoble-alpes.fr>
parents:
48004
diff
changeset
|
10 ] |
d4b275587847
install: static data moved from setup.py to pyproject.toml
paugier <pierre.augier@univ-grenoble-alpes.fr>
parents:
48004
diff
changeset
|
11 description="Fast scalable distributed SCM (revision control, version control) system" |
d4b275587847
install: static data moved from setup.py to pyproject.toml
paugier <pierre.augier@univ-grenoble-alpes.fr>
parents:
48004
diff
changeset
|
12 readme = "README.rst" |
d4b275587847
install: static data moved from setup.py to pyproject.toml
paugier <pierre.augier@univ-grenoble-alpes.fr>
parents:
48004
diff
changeset
|
13 requires-python = ">=3.8" |
d4b275587847
install: static data moved from setup.py to pyproject.toml
paugier <pierre.augier@univ-grenoble-alpes.fr>
parents:
48004
diff
changeset
|
14 license={text = "GNU GPLv2 or any later version"} |
d4b275587847
install: static data moved from setup.py to pyproject.toml
paugier <pierre.augier@univ-grenoble-alpes.fr>
parents:
48004
diff
changeset
|
15 classifiers=[ |
d4b275587847
install: static data moved from setup.py to pyproject.toml
paugier <pierre.augier@univ-grenoble-alpes.fr>
parents:
48004
diff
changeset
|
16 "Development Status :: 6 - Mature", |
d4b275587847
install: static data moved from setup.py to pyproject.toml
paugier <pierre.augier@univ-grenoble-alpes.fr>
parents:
48004
diff
changeset
|
17 "Environment :: Console", |
d4b275587847
install: static data moved from setup.py to pyproject.toml
paugier <pierre.augier@univ-grenoble-alpes.fr>
parents:
48004
diff
changeset
|
18 "Intended Audience :: Developers", |
d4b275587847
install: static data moved from setup.py to pyproject.toml
paugier <pierre.augier@univ-grenoble-alpes.fr>
parents:
48004
diff
changeset
|
19 "Intended Audience :: System Administrators", |
d4b275587847
install: static data moved from setup.py to pyproject.toml
paugier <pierre.augier@univ-grenoble-alpes.fr>
parents:
48004
diff
changeset
|
20 "License :: OSI Approved :: GNU General Public License (GPL)", |
d4b275587847
install: static data moved from setup.py to pyproject.toml
paugier <pierre.augier@univ-grenoble-alpes.fr>
parents:
48004
diff
changeset
|
21 "Natural Language :: Danish", |
d4b275587847
install: static data moved from setup.py to pyproject.toml
paugier <pierre.augier@univ-grenoble-alpes.fr>
parents:
48004
diff
changeset
|
22 "Natural Language :: English", |
d4b275587847
install: static data moved from setup.py to pyproject.toml
paugier <pierre.augier@univ-grenoble-alpes.fr>
parents:
48004
diff
changeset
|
23 "Natural Language :: German", |
d4b275587847
install: static data moved from setup.py to pyproject.toml
paugier <pierre.augier@univ-grenoble-alpes.fr>
parents:
48004
diff
changeset
|
24 "Natural Language :: Italian", |
d4b275587847
install: static data moved from setup.py to pyproject.toml
paugier <pierre.augier@univ-grenoble-alpes.fr>
parents:
48004
diff
changeset
|
25 "Natural Language :: Japanese", |
d4b275587847
install: static data moved from setup.py to pyproject.toml
paugier <pierre.augier@univ-grenoble-alpes.fr>
parents:
48004
diff
changeset
|
26 "Natural Language :: Portuguese (Brazilian)", |
d4b275587847
install: static data moved from setup.py to pyproject.toml
paugier <pierre.augier@univ-grenoble-alpes.fr>
parents:
48004
diff
changeset
|
27 "Operating System :: Microsoft :: Windows", |
d4b275587847
install: static data moved from setup.py to pyproject.toml
paugier <pierre.augier@univ-grenoble-alpes.fr>
parents:
48004
diff
changeset
|
28 "Operating System :: OS Independent", |
d4b275587847
install: static data moved from setup.py to pyproject.toml
paugier <pierre.augier@univ-grenoble-alpes.fr>
parents:
48004
diff
changeset
|
29 "Operating System :: POSIX", |
d4b275587847
install: static data moved from setup.py to pyproject.toml
paugier <pierre.augier@univ-grenoble-alpes.fr>
parents:
48004
diff
changeset
|
30 "Programming Language :: C", |
d4b275587847
install: static data moved from setup.py to pyproject.toml
paugier <pierre.augier@univ-grenoble-alpes.fr>
parents:
48004
diff
changeset
|
31 "Programming Language :: Python", |
d4b275587847
install: static data moved from setup.py to pyproject.toml
paugier <pierre.augier@univ-grenoble-alpes.fr>
parents:
48004
diff
changeset
|
32 "Topic :: Software Development :: Version Control", |
d4b275587847
install: static data moved from setup.py to pyproject.toml
paugier <pierre.augier@univ-grenoble-alpes.fr>
parents:
48004
diff
changeset
|
33 ] |
d4b275587847
install: static data moved from setup.py to pyproject.toml
paugier <pierre.augier@univ-grenoble-alpes.fr>
parents:
48004
diff
changeset
|
34 dynamic = ["version"] |
d4b275587847
install: static data moved from setup.py to pyproject.toml
paugier <pierre.augier@univ-grenoble-alpes.fr>
parents:
48004
diff
changeset
|
35 |
d4b275587847
install: static data moved from setup.py to pyproject.toml
paugier <pierre.augier@univ-grenoble-alpes.fr>
parents:
48004
diff
changeset
|
36 [project.urls] |
d4b275587847
install: static data moved from setup.py to pyproject.toml
paugier <pierre.augier@univ-grenoble-alpes.fr>
parents:
48004
diff
changeset
|
37 home = "https://mercurial-scm.org/" |
d4b275587847
install: static data moved from setup.py to pyproject.toml
paugier <pierre.augier@univ-grenoble-alpes.fr>
parents:
48004
diff
changeset
|
38 download_url = "https://mercurial-scm.org/release/" |
d4b275587847
install: static data moved from setup.py to pyproject.toml
paugier <pierre.augier@univ-grenoble-alpes.fr>
parents:
48004
diff
changeset
|
39 |
46382
d4c8b4b90ecb
black: merge config into main pyproject.toml now that we have it
Augie Fackler <augie@google.com>
parents:
46381
diff
changeset
|
40 |
d4c8b4b90ecb
black: merge config into main pyproject.toml now that we have it
Augie Fackler <augie@google.com>
parents:
46381
diff
changeset
|
41 [tool.black] |
d4c8b4b90ecb
black: merge config into main pyproject.toml now that we have it
Augie Fackler <augie@google.com>
parents:
46381
diff
changeset
|
42 line-length = 80 |
d4c8b4b90ecb
black: merge config into main pyproject.toml now that we have it
Augie Fackler <augie@google.com>
parents:
46381
diff
changeset
|
43 exclude = ''' |
d4c8b4b90ecb
black: merge config into main pyproject.toml now that we have it
Augie Fackler <augie@google.com>
parents:
46381
diff
changeset
|
44 build/ |
d4c8b4b90ecb
black: merge config into main pyproject.toml now that we have it
Augie Fackler <augie@google.com>
parents:
46381
diff
changeset
|
45 | wheelhouse/ |
d4c8b4b90ecb
black: merge config into main pyproject.toml now that we have it
Augie Fackler <augie@google.com>
parents:
46381
diff
changeset
|
46 | dist/ |
d4c8b4b90ecb
black: merge config into main pyproject.toml now that we have it
Augie Fackler <augie@google.com>
parents:
46381
diff
changeset
|
47 | packages/ |
d4c8b4b90ecb
black: merge config into main pyproject.toml now that we have it
Augie Fackler <augie@google.com>
parents:
46381
diff
changeset
|
48 | \.hg/ |
d4c8b4b90ecb
black: merge config into main pyproject.toml now that we have it
Augie Fackler <augie@google.com>
parents:
46381
diff
changeset
|
49 | \.mypy_cache/ |
d4c8b4b90ecb
black: merge config into main pyproject.toml now that we have it
Augie Fackler <augie@google.com>
parents:
46381
diff
changeset
|
50 | \.venv/ |
d4c8b4b90ecb
black: merge config into main pyproject.toml now that we have it
Augie Fackler <augie@google.com>
parents:
46381
diff
changeset
|
51 | mercurial/thirdparty/ |
d4c8b4b90ecb
black: merge config into main pyproject.toml now that we have it
Augie Fackler <augie@google.com>
parents:
46381
diff
changeset
|
52 ''' |
d4c8b4b90ecb
black: merge config into main pyproject.toml now that we have it
Augie Fackler <augie@google.com>
parents:
46381
diff
changeset
|
53 skip-string-normalization = true |
d4c8b4b90ecb
black: merge config into main pyproject.toml now that we have it
Augie Fackler <augie@google.com>
parents:
46381
diff
changeset
|
54 quiet = true |