Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp1313034pxx; Fri, 30 Oct 2020 07:17:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzlc++ZT4bftFY6PQwXLVFISxS8eONgteN5NcZfeyCGhRYn+IqiQf7n7nW+R2eeubvGUtF8 X-Received: by 2002:a17:906:b202:: with SMTP id p2mr819018ejz.483.1604067456441; Fri, 30 Oct 2020 07:17:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1604067456; cv=none; d=google.com; s=arc-20160816; b=ins8rTvEnhxXpsStpqXs1Zall9jabwpqXVJ+We/eTrodVB4nxkNe+c4M1Fj28Dq2xf WeJkTXmmbMZ4PhYUNytyzqA5j/L1XYHtjB+MGFn3OJTVLOij9G2EGNg2GjHuhJLsebnf sz4zHLCgY4bcNKp89BTFolrT/RY+yQqwTUsRUULXzCZdzJVXmHOBSpcaEUun3VJGw7UK jZueOa/hm9wHS+mxNlrdtRKN4i+NuG8sKvpZcl6ciBPKb+rp+Kl9/nDk3Lnnwa5XN1iY sm70NySHY8s1EAKm7B3Wh4vxibMUsBC/NEHdCkqL3lYdzWlTm3Xxct3ROtPdpZirc3B6 maOw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :date; bh=zsf/1t63y0CqkqsnJ17/mxw9Ln4KmqL3SDE+TOuP3jA=; b=RafXd6yMrpAYns/l5x8ckwAQdsiIPHlqGAw16l9DiU9fQbipSTa3rHQEoO+VbXtjWa kl64y8bEOmVC2B7qoJNoKO169ERte8dzhJcqeo/SFIqJqcSG2Lh3Hr4qohy6PaFGe46m RfrcebHaxv4ipstumkJ4AT3Sykf8Vqxpjp6GWwGcWW3eI3woX0Zntc847kWA9eKkDsB0 ts8IcIBiUo5EhbJrZdmVXyoV4oNqr8nDKrHkbjTFbNNm8gCQ2aWpFEF0r4LNSO+Ag3sy H5FiPwox37WoFFB1bgIcEz+6TUCB6Iiopvi2PPuoqIFNhzNqeZ+TM42BUb7YizHicaKP OYqg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z8si4774328edp.59.2020.10.30.07.17.11; Fri, 30 Oct 2020 07:17:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726691AbgJ3OOn (ORCPT + 99 others); Fri, 30 Oct 2020 10:14:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60452 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725834AbgJ3OOm (ORCPT ); Fri, 30 Oct 2020 10:14:42 -0400 Received: from ms.lwn.net (ms.lwn.net [IPv6:2600:3c01:e000:3a1::42]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C1845C0613CF; Fri, 30 Oct 2020 07:14:42 -0700 (PDT) Received: from lwn.net (localhost [127.0.0.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ms.lwn.net (Postfix) with ESMTPSA id 30DE02E7; Fri, 30 Oct 2020 14:14:42 +0000 (UTC) Date: Fri, 30 Oct 2020 08:14:40 -0600 From: Jonathan Corbet To: Mauro Carvalho Chehab Cc: Dafna Hirschfeld , "=?UTF-8?B?TsOtY29s?= =?UTF-8?B?YXM=?= F. R. A. Prado" , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, lkcamp@lists.libreplanetbr.org, andrealmeid@collabora.com Subject: Re: Python 2.7 support and automarkup.py - Was: Re: [PATCH v2 1/5] docs: automarkup.py: Use new C roles in Sphinx 3 Message-ID: <20201030081440.47a74dad@lwn.net> In-Reply-To: <20201030151026.3afd7997@coco.lan> References: <20201013231218.2750109-1-nfraprado@protonmail.com> <20201013231218.2750109-2-nfraprado@protonmail.com> <5053e824-625b-5a76-d862-2c855c79c427@collabora.com> <20201030151026.3afd7997@coco.lan> Organization: LWN.net MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 30 Oct 2020 15:10:26 +0100 Mauro Carvalho Chehab wrote: > I see a few alternatives: > > 1) fix automarkup.py for it to work again with python 2.7; > > 2) conf.py could gain some logic to disable automarkup with > Python < 3; > > 3) scripts/sphinx-pre-install already detects Python version. > It should likely be easy to ask the user to use python 3.x, > if an older version is detected. > > Doing (1) or (2) will require an additional step when we raise > the bar for Python version. We haven't dropped support for Python 2 yet, so this constitutes a regression. My own approach would be something like this at the top of automarkup.py: if python2: ascii = 0 else: ascii = re.ASCII ...then s/re.ASCII/ascii/ throughout. I can probably put together something later this morning. jon