mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] docs: conf.py: fix the 'utf-8' typo
@ 2026-08-06  5:11 Randy Dunlap
  2026-08-11 16:46 ` Jonathan Corbet
  0 siblings, 1 reply; 3+ messages in thread
From: Randy Dunlap @ 2026-08-06  5:11 UTC (permalink / raw)
  To: linux-kernel
  Cc: Randy Dunlap, Jonathan Corbet, Shuah Khan, Mauro Carvalho Chehab

"encoding" should be 'utf-8'. Fix the typo.

Fixes: 7ea9a550f710 ("docs: conf.py: several coding style fixes")
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
---
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Shuah Khan <skhan@linuxfoundation.org>
Cc: Mauro Carvalho Chehab <mchehab@kernel.org>

 Documentation/conf.py |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- linux-next-20260805.orig/Documentation/conf.py
+++ linux-next-20260805/Documentation/conf.py
@@ -287,7 +287,7 @@ author = "The kernel development communi
 try:
     makefile_version = None
     makefile_patchlevel = None
-    with open("../Makefile", encoding="utf=8") as fp:
+    with open("../Makefile", encoding="utf-8") as fp:
         for line in fp:
             key, val = [x.strip() for x in line.split("=", 2)]
             if key == "VERSION":

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] docs: conf.py: fix the 'utf-8' typo
  2026-08-06  5:11 [PATCH] docs: conf.py: fix the 'utf-8' typo Randy Dunlap
@ 2026-08-11 16:46 ` Jonathan Corbet
  2026-08-14 22:54   ` Randy Dunlap
  0 siblings, 1 reply; 3+ messages in thread
From: Jonathan Corbet @ 2026-08-11 16:46 UTC (permalink / raw)
  To: Randy Dunlap, linux-kernel
  Cc: Randy Dunlap, Shuah Khan, Mauro Carvalho Chehab

Randy Dunlap <rdunlap@infradead.org> writes:

> "encoding" should be 'utf-8'. Fix the typo.
>
> Fixes: 7ea9a550f710 ("docs: conf.py: several coding style fixes")
> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> ---
> Cc: Jonathan Corbet <corbet@lwn.net>
> Cc: Shuah Khan <skhan@linuxfoundation.org>
> Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
>
>  Documentation/conf.py |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> --- linux-next-20260805.orig/Documentation/conf.py
> +++ linux-next-20260805/Documentation/conf.py
> @@ -287,7 +287,7 @@ author = "The kernel development communi
>  try:
>      makefile_version = None
>      makefile_patchlevel = None
> -    with open("../Makefile", encoding="utf=8") as fp:
> +    with open("../Makefile", encoding="utf-8") as fp:
>          for line in fp:

So this is somewhat weird... open() will throw an exception with an
unknown encoding, but takes "utf=8" without complaint.  Somehow they are
explicitly handling that case.  So the code is arguably correct :)

That said, I've applied the patch, thanks.

jon

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] docs: conf.py: fix the 'utf-8' typo
  2026-08-11 16:46 ` Jonathan Corbet
@ 2026-08-14 22:54   ` Randy Dunlap
  0 siblings, 0 replies; 3+ messages in thread
From: Randy Dunlap @ 2026-08-14 22:54 UTC (permalink / raw)
  To: Jonathan Corbet, linux-kernel; +Cc: Shuah Khan, Mauro Carvalho Chehab



On 8/11/26 9:46 AM, Jonathan Corbet wrote:
> Randy Dunlap <rdunlap@infradead.org> writes:
> 
>> "encoding" should be 'utf-8'. Fix the typo.
>>
>> Fixes: 7ea9a550f710 ("docs: conf.py: several coding style fixes")
>> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
>> ---
>> Cc: Jonathan Corbet <corbet@lwn.net>
>> Cc: Shuah Khan <skhan@linuxfoundation.org>
>> Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
>>
>>  Documentation/conf.py |    2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> --- linux-next-20260805.orig/Documentation/conf.py
>> +++ linux-next-20260805/Documentation/conf.py
>> @@ -287,7 +287,7 @@ author = "The kernel development communi
>>  try:
>>      makefile_version = None
>>      makefile_patchlevel = None
>> -    with open("../Makefile", encoding="utf=8") as fp:
>> +    with open("../Makefile", encoding="utf-8") as fp:
>>          for line in fp:
> 
> So this is somewhat weird... open() will throw an exception with an
> unknown encoding, but takes "utf=8" without complaint.  Somehow they are
> explicitly handling that case.  So the code is arguably correct :)

It's not listed as a valid alias anywhere that I can find.

But then using "utf8" is only a valid alias when using cpython codecs AFAICT:

kdoc_parser.py:1690:            with open(self.fname, "r", encoding="utf8",
kdoc_parser.py:1731:            with open(self.fname, "r", encoding="utf8",

> That said, I've applied the patch, thanks.


-- 
~Randy


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-08-14 22:54 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-08-06  5:11 [PATCH] docs: conf.py: fix the 'utf-8' typo Randy Dunlap
2026-08-11 16:46 ` Jonathan Corbet
2026-08-14 22:54   ` Randy Dunlap

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®