All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ross Burton <ross.burton@arm.com>
To: openembedded-core@lists.openembedded.org
Subject: [PATCH] python3: silence DeprecationWarnings in python3-config
Date: Tue,  2 Nov 2021 18:02:33 +0000	[thread overview]
Message-ID: <20211102180233.4104293-1-ross.burton@arm.com> (raw)

Our patched python3-config uses distutils, but that will emit a
DeprecationWarning when imported.  This isn't useful when using the
output of python3-config to find include paths.

This isn't a huge problem typically as the warning goes to stderr, but
some build systems read both stdout and stderr.

Signed-off-by: Ross Burton <ross.burton@arm.com>
---
 meta/recipes-devtools/python/python3/python-config.patch | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-devtools/python/python3/python-config.patch b/meta/recipes-devtools/python/python3/python-config.patch
index d0ddbbc7fd..c53f646af3 100644
--- a/meta/recipes-devtools/python/python3/python-config.patch
+++ b/meta/recipes-devtools/python/python3/python-config.patch
@@ -14,7 +14,6 @@ as appropriate.
 Upstream-Status: Inappropriate [Embedded Specific]
 
 Signed-off-by: Tyler Hall <tylerwhall@gmail.com>
-:
 
 ---
  Misc/python-config.in | 10 +++++-----
@@ -24,11 +23,13 @@ diff --git a/Misc/python-config.in b/Misc/python-config.in
 index ebd99da..13e57ae 100644
 --- a/Misc/python-config.in
 +++ b/Misc/python-config.in
-@@ -6,7 +6,7 @@
+@@ -6,7 +6,9 @@
  import getopt
  import os
  import sys
 -import sysconfig
++import warnings
++warnings.filterwarnings("ignore", category=DeprecationWarning)
 +from distutils import sysconfig
  
  valid_opts = ['prefix', 'exec-prefix', 'includes', 'libs', 'cflags',
-- 
2.25.1



             reply	other threads:[~2021-11-02 18:02 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-02 18:02 Ross Burton [this message]
2021-11-02 18:05 ` [OE-core] [PATCH] python3: silence DeprecationWarnings in python3-config Khem Raj
2021-11-02 20:06   ` Ross Burton
2021-11-02 20:12     ` Khem Raj
2021-11-02 21:05       ` Tim Orling

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211102180233.4104293-1-ross.burton@arm.com \
    --to=ross.burton@arm.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.