Package: python3-minimal
Version: 3.13.2-2
Severity: minor
Tags: patch
* What led up to the situation?
Checking for defects with a new version
test-[g|n]roff -mandoc -t -K utf8 -rF0 -rHY=0 -rCHECKSTYLE=10 -ww -z < "man
page"
[Use "grep -e ' $' -e '\\~$' <file>" to find obvious trailing spaces.]
["test-groff" is a script in the repository for "groff"; is not shipped]
(local copy and "troff" slightly changed by me).
[The fate of "test-nroff" was decided in groff bug #55941.]
* What was the outcome of this action?
an.tmac:<stdin>:1: style: .TH expects 2 to 5 arguments, got 1
troff:<stdin>:1: warning: start (0) and end (0) index of substring out of range
an.tmac:<stdin>:1: warning: TH: second argument is not a numeric expression:
an.tmac:<stdin>:1: style: .TH missing third argument; consider document
modification date in ISO 8601 format (YYYY-MM-DD)
an.tmac:<stdin>:1: style: .TH missing fourth argument; consider package/project
name and version (e.g., "groff 1.23.0")
troff:<stdin>:1: warning: name 'an-extra3' not defined
an.tmac:<stdin>:1: style: .TH missing fifth argument and second argument '' not
a recognized manual section; specify its title
* What outcome did you expect instead?
No output (no warnings).
-.-
General remarks and further material, if a diff-file exist, are in the
attachments.
-- System Information:
Debian Release: trixie/sid
APT prefers testing
APT policy: (500, 'testing')
Architecture: amd64 (x86_64)
Kernel: Linux 6.12.19-amd64 (SMP w/2 CPU threads; PREEMPT)
Locale: LANG=is_IS.iso88591, LC_CTYPE=is_IS.iso88591 (charmap=ISO-8859-1),
LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: sysvinit (via /sbin/init)
Versions of packages python3-minimal depends on:
ii dpkg 1.22.18
ii python3.13-minimal 3.13.2-2
python3-minimal recommends no packages.
python3-minimal suggests no packages.
-- no debconf information
Input file is py3versions.1
Output from "mandoc -T lint py3versions.1": (shortened list)
1 missing date, using "": TH
1 missing manual section, using "": TH PY3VERSIONS
2 skipping paragraph macro: PP after SH
-.-.
Output from "test-nroff -mandoc -t -ww -z py3versions.1": (shortened list)
1
1 name 'an-extra3' not defined
1 start (0) and end (0) index of substring out of range
-.-.
Change two HYPHEN-MINUSES (code 0x2D) to an em-dash (\(em),
if one is intended.
" \(em " creates a too big gap in the text (in "troff").
An en-dash is usually surrounded by a space,
while an em-dash is used without spaces.
"man" (1 byte characters in input) transforms an en-dash (\(en) to one
HYPHEN-MINUS,
and an em-dash to two HYPHEN-MINUSES without considering the space
around it.
If "--" are two single "-"
(begin of an option or end of options)
then use "\-\-".
py3versions.1:16:.I -d, --default
py3versions.1:19:.I -s, --supported
py3versions.1:24:.I -r, --requested [<version string>|<control file>]
py3versions.1:34:Python3. Uses the same sort order as the -s, --supported
option.
py3versions.1:36:.I -i, --installed
py3versions.1:39:.I --min-supported
py3versions.1:42:.I --max-supported
py3versions.1:45:.I -v, --version
py3versions.1:48:.I -h, --help
-.-.
Change a HYPHEN-MINUS (code 0x2D) to a minus(-dash) (\-),
if it
is in front of a name for an option,
is a symbol for standard input,
is a single character used to indicate an option,
or is in the NAME section (man-pages(7)).
N.B. - (0x2D), processed as a UTF-8 file, is changed to a hyphen
(0x2010, groff \[u2010] or \[hy]) in the output.
7:.I [-h] [-v] [<options>]
-.-.
Add a "\&" (or a comma (Oxford comma)) after "e.g." and "i.e.",
or use English words
(man-pages(7)).
Abbreviation points should be marked as such and protected against being
interpreted as an end of sentence, if they are not, and that independent
of the current place on the line.
21:version with the default version last (e.g. python3.4 python3.6 python3.5 if
-.-.
Wrong distance (not two spaces) between sentences in the input file.
Separate the sentences and subordinate clauses; each begins on a new
line. See man-pages(7) ("Conventions for source file layout") and
"info groff" ("Input Conventions").
The best procedure is to always start a new sentence on a new line,
at least, if you are typing on a computer.
Remember coding: Only one command ("sentence") on each (logical) line.
E-mail: Easier to quote exactly the relevant lines.
Generally: Easier to edit the sentence.
Patches: Less unaffected text.
Search for two adjacent words is easier, when they belong to the same line,
and the same phrase.
The amount of space between sentences in the output can then be
controlled with the ".ss" request.
Mark a final abbreviation point as such by suffixing it with "\&".
Some sentences (etc.) do not begin on a new line.
Split (sometimes) lines after a punctuation mark; before a conjunction.
Lines with only one (or two) space(s) between sentences could be split,
so latter sentences begin on a new line.
Use
#!/usr/bin/sh
sed -e '/^\./n' \
-e 's/\([[:alpha:]]\)\. */\1.\n/g' $1
to split lines after a sentence period.
Check result with the difference between the formatted outputs.
See also the attachment "general.bugs"
21:version with the default version last (e.g. python3.4 python3.6 python3.5 if
28:python3 versions. The parameter is interpreted as a version string, if
29:it is not the name of a file. If the X-Python3-Version field is
31:versions after checking debian/control. Versions less than 3 are
32:ignored. The keyword all is ignored because it covers all Python2
-.-.
Only one space character after a possible end of sentence
(after a punctuation, that can end a sentence).
py3versions.1:21:version with the default version last (e.g. python3.4
python3.6 python3.5 if
py3versions.1:28:python3 versions. The parameter is interpreted as a version
string, if
py3versions.1:29:it is not the name of a file. If the X-Python3-Version field is
py3versions.1:31:versions after checking debian/control. Versions less than 3
are
py3versions.1:32:ignored. The keyword all is ignored because it covers all
Python2
-.-.
Put a subordinate sentence (after a comma) on a new line.
py3versions.1:11:prints information about installed, supported python3
runtimes, the
py3versions.1:12:default runtime, and parses the information of the
PythonVersion
py3versions.1:22:python3.4, 3.5, and 3.6 are supported, but python3.5 is the
default python3).
py3versions.1:28:python3 versions. The parameter is interpreted as a version
string, if
py3versions.1:30:missing, it will fall back to list the supported Python3
py3versions.1:34:Python3. Uses the same sort order as the -s, --supported
option.
-.-.
Output from "test-groff -mandoc -t -K utf8 -rF0 -rHY=0 -rCHECKSTYLE=10 -ww -z
":
an.tmac:<stdin>:1: style: .TH expects 2 to 5 arguments, got 1
troff:<stdin>:1: warning: start (0) and end (0) index of substring out of range
an.tmac:<stdin>:1: warning: TH: second argument is not a numeric expression:
an.tmac:<stdin>:1: style: .TH missing third argument; consider document
modification date in ISO 8601 format (YYYY-MM-DD)
an.tmac:<stdin>:1: style: .TH missing fourth argument; consider package/project
name and version (e.g., "groff 1.23.0")
troff:<stdin>:1: warning: name 'an-extra3' not defined
an.tmac:<stdin>:1: style: .TH missing fifth argument and second argument '' not
a recognized manual section; specify its title
-.-.
Generally:
Split (sometimes) lines after a punctuation mark; before a conjunction.
--- py3versions.1 2025-03-27 00:02:56.746075876 +0000
+++ py3versions.1.new 2025-03-27 00:12:32.694541673 +0000
@@ -1,51 +1,53 @@
-.TH PY3VERSIONS
+.TH PY3VERSIONS 1
.SH NAME
py3versions \- print python3 version information
.SH SYNOPSIS
-.PP
.B py3versions
-.I [-h] [-v] [<options>]
+.I [\-h] [\-v] [<options>]
.SH DESCRIPTION
-.PP
.B py3versions
prints information about installed, supported python3 runtimes, the
default runtime, and parses the information of the PythonVersion
fields in the package control file for Python3.
.SH OPTIONS
.TP
-.I -d, --default
+.I \-d, \-\-default
Show the default python3 version.
.TP
-.I -s, --supported
+.I \-s, \-\-supported
Show the supported python3 versions. List is lowest version to highest
-version with the default version last (e.g. python3.4 python3.6 python3.5 if
+version with the default version last
+(e.g.\& python3.4 python3.6 python3.5 if
python3.4, 3.5, and 3.6 are supported, but python3.5 is the default python3).
.TP
-.I -r, --requested [<version string>|<control file>]
+.I \-r, \-\-requested [<version string>|<control file>]
Reads the value of the
.B X-Python3-Version
field in the source section of a control file and shows all matching
-python3 versions. The parameter is interpreted as a version string, if
-it is not the name of a file. If the X-Python3-Version field is
-missing, it will fall back to list the supported Python3
-versions after checking debian/control. Versions less than 3 are
-ignored. The keyword all is ignored because it covers all Python2
+python3 versions.
+The parameter is interpreted as a version string,
+if it is not the name of a file.
+If the X-Python3-Version field is missing,
+it will fall back to list the supported Python3
+versions after checking debian/control.
+Versions less than 3 are ignored.
+The keyword all is ignored because it covers all Python2
versions. The former keyword current is not supported at all in
-Python3. Uses the same sort order as the -s, --supported option.
+Python3. Uses the same sort order as the \-s, \-\-supported option.
.TP
-.I -i, --installed
+.I \-i, \-\-installed
Show the installed supported python3 versions.
.TP
-.I --min-supported
+.I \-\-min-supported
Show the minimum supported python3 version.
.TP
-.I --max-supported
+.I \-\-max-supported
Show the maximum supported python3 version.
.TP
-.I -v, --version
+.I \-v, \-\-version
Limit the output to the version numbers of the python3 versions.
.TP
-.I -h, --help
+.I \-h, \-\-help
Print a help text.
.SH SEE ALSO
Python policy.
Any program (person), that produces man pages, should check the output
for defects by using (both groff and nroff)
[gn]roff -mandoc -t -ww -b -z -K utf8 <man page>
The same goes for man pages that are used as an input.
For a style guide use
mandoc -T lint
-.-
Any "autogenerator" should check its products with the above mentioned
'groff', 'mandoc', and additionally with 'nroff ...'.
It should also check its input files for too long (> 80) lines.
This is just a simple quality control measure.
The "autogenerator" may have to be corrected to get a better man page,
the source file may, and any additional file may.
Common defects:
Not removing trailing spaces (in in- and output).
The reason for these trailing spaces should be found and eliminated.
"git" has a "tool" to point out whitespace,
see for example "git-apply(1)" and git-config(1)")
Not beginning each input sentence on a new line.
Line length and patch size should thus be reduced.
The script "reportbug" uses 'quoted-printable' encoding when a line is
longer than 1024 characters in an 'ascii' file.
See man-pages(7), item "semantic newline".
-.-
The difference between the formatted output of the original and patched file
can be seen with:
nroff -mandoc <file1> > <out1>
nroff -mandoc <file2> > <out2>
diff -d -u <out1> <out2>
and for groff, using
\"printf '%s\n%s\n' '.kern 0' '.ss 12 0' | groff -mandoc -Z - \"
instead of 'nroff -mandoc'
Add the option '-t', if the file contains a table.
Read the output from 'diff -d -u ...' with 'less -R' or similar.
-.-.
If 'man' (man-db) is used to check the manual for warnings,
the following must be set:
The option \"-warnings=w\"
The environmental variable:
export MAN_KEEP_STDERR=yes (or any non-empty value)
or
(produce only warnings):
export MANROFFOPT=\"-ww -b -z\"
export MAN_KEEP_STDERR=yes (or any non-empty value)
-.-