Skip to content

Merge#67

Draft
eriks245 wants to merge 138 commits into
mainfrom
merge
Draft

Merge#67
eriks245 wants to merge 138 commits into
mainfrom
merge

Conversation

@eriks245

@eriks245 eriks245 commented Jul 7, 2026

Copy link
Copy Markdown

This should resolve #39 (was implemented upstream and is now available as grace_period(time_to_end_of_contest) in the contest-config)

prandla and others added 30 commits June 7, 2025 18:37
* add type hints: part 1

Converting old docstring-based type hints to PEP 484 type hints. This
commit includes all of cms/ except for cms/server/, and all of cmscommon/.

* python 3.11 compatibility (use typing.TypeVar instead of new syntax)

* add type hints part 2

Added type hints to cms/server and fixed some previous type hint
mistakes.

* type hints for cmsranking

* more type hint fixes

guard all tornado imports behind `if typing.TYPE_CHECKING`. i think this
allows the "tornado4" workaround to still work, though i don't know if
it's relevant anymore.

* type hints for cmscontrib (and prerequisites.py)

* type hints for cmstestsuite

* make PriorityQueue and TriggeredService generic

* Update Python version requirement to 3.11

* Run `black` on modified files

* update CONTRIBUTING.md

* address review comments

* Some better type hints on FileCacher / LargeObject

Use typing.IO[bytes] instead of BinaryIO, because some stdlib types are
apparently only compatible with the former.
Currently, we log to stdout, which is contrary to UNIX conventions.
Also, it makes it impossible to redirect normal standard output of commands
like cmsRWSHelper to a file.

Closes cms-dev#1382.
Evaluation outcome is stored as a formatted string with "%" serving
as a formatting control character. We therefore need to escape percent
signs in manager output.

Previously, some ANSI escape sequences (ESC + arbitrary characters + m,
which is a superset of SGR sequences) were removed from the messages.
We argue that all programs emitting such sequences without checking that
the output is a terminal are broken and we should not sweep the problem
under the rug.

Instead, we firmly reject all control characters in C0 and C1 ranges
except for TAB.
It is very useful for the scientific commitee to see it in the Comment column of the submissions page in the admin website. This column was mostly unused and empty in the past.
To improve performance when connecting to worker instances over high latency network
gollux and others added 30 commits July 7, 2025 17:34
It is useful when a stand-alone script needs to talk to a remote service,
because service.connect() returns while the connection attempt is being
done in the background.
* use `` in places where bare ` were used previously
* fix missing references and other sphinx errors
* change json code-blocks to use comments to indicate the types of things
* updated some docs that referred to unsupported installation methods
* remove link to distutils, and fix old setuptools link
* rename "target directory" to "installation directory"
Previously, we tried to find shared-mime-info.mo and use that to
translate the descriptions obtained from xdg.Mime into the right
language. This was not the correct approach: first, the path to
shared-mime-info.mo varied (on Ubuntu it was in locale-langpack instead
of locale), and second, sometimes (e.g. on Fedora) it was not present at
all.

The right place to find these translations is in the mimetype xml
files themselves. However, this caused other issues: first, pyxdg does
not have proper support for using more than one language. I hacked
around this by setting the (global) language before each call, and
clearing pyxdg's own cache. And then adding my own cache on top that can
cache multiple languages. The second problem was that on Debian/Ubuntu,
the xml:lang tags that specify the language codes for each string use an
incorrect format: they use POSIX-style locale names (like zh_CN) instead
of XML-compliant BCP47 language codes (like zh-Hans-CN). pyxdg only
knows how to handle these incorrect names, so I had to implement a hack
to get it to recognize the correct names too.

Also deleted the undocumented and now-unused shared_mime_info_prefix
config option, and mentioned shared-mime-info as a dependency in the
installation docs.
* Remove unneeded import attempts from "tornado4". From what I can tell,
  this was only ever useful when using system packages on ubuntu 20.04.
  We don't support installation using system packages anymore (and
  ubuntu 20.04 is EOL).
* Remove misleading comment about monkey-patching the DB connection
  string in the test suite. We don't monkey-patch it anymore (instead we
  assume someone else fixed it and assert that it's correct).
When multiple versions of C++ are enabled in a contest, it is impossible
to guess the language by filename extension.

It is not checked that the language is really enabled in the contest.
We consider this a feature (and document it as such), because it allows
the administrator to test languages before they are made available
to the contestants.
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

Successfully merging this pull request may close these issues.

Automatisierte Submissionlimits