All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH for-5.2] iotests: Replace deprecated ConfigParser.readfp()
@ 2020-11-13 10:06 Kevin Wolf
  2020-11-13 13:47 ` Eric Blake
  2020-11-16 12:39 ` Philippe Mathieu-Daudé
  0 siblings, 2 replies; 5+ messages in thread
From: Kevin Wolf @ 2020-11-13 10:06 UTC (permalink / raw)
  To: qemu-block; +Cc: kwolf, qemu-devel

iotest 277 fails on Fedora 33 (Python 3.9) because a deprecation warning
changes the output:

    nbd-fault-injector.py:230: DeprecationWarning: This method will be
    removed in future versions.  Use 'parser.read_file()' instead.

In fact, readfp() has already been deprecated in Python 3.2 and the
replacement has existed since the same version, so we can now
unconditionally switch to read_file().

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
 tests/qemu-iotests/nbd-fault-injector.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/qemu-iotests/nbd-fault-injector.py b/tests/qemu-iotests/nbd-fault-injector.py
index 78f42c4214..6e11ef89b8 100755
--- a/tests/qemu-iotests/nbd-fault-injector.py
+++ b/tests/qemu-iotests/nbd-fault-injector.py
@@ -227,7 +227,7 @@ def parse_config(config):
 def load_rules(filename):
     config = configparser.RawConfigParser()
     with open(filename, 'rt') as f:
-        config.readfp(f, filename)
+        config.read_file(f, filename)
     return parse_config(config)
 
 def open_socket(path):
-- 
2.28.0



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

* Re: [PATCH for-5.2] iotests: Replace deprecated ConfigParser.readfp()
  2020-11-13 10:06 [PATCH for-5.2] iotests: Replace deprecated ConfigParser.readfp() Kevin Wolf
@ 2020-11-13 13:47 ` Eric Blake
  2020-11-13 14:40   ` Kevin Wolf
  2020-11-16 12:39 ` Philippe Mathieu-Daudé
  1 sibling, 1 reply; 5+ messages in thread
From: Eric Blake @ 2020-11-13 13:47 UTC (permalink / raw)
  To: Kevin Wolf, qemu-block; +Cc: qemu-devel

On 11/13/20 4:06 AM, Kevin Wolf wrote:
> iotest 277 fails on Fedora 33 (Python 3.9) because a deprecation warning
> changes the output:
> 
>     nbd-fault-injector.py:230: DeprecationWarning: This method will be
>     removed in future versions.  Use 'parser.read_file()' instead.
> 
> In fact, readfp() has already been deprecated in Python 3.2 and the
> replacement has existed since the same version, so we can now
> unconditionally switch to read_file().
> 
> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
> ---
>  tests/qemu-iotests/nbd-fault-injector.py | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Eric Blake <eblake@redhat.com>

I'm happy to queue this through my NBD tree for -rc2.

> 
> diff --git a/tests/qemu-iotests/nbd-fault-injector.py b/tests/qemu-iotests/nbd-fault-injector.py
> index 78f42c4214..6e11ef89b8 100755
> --- a/tests/qemu-iotests/nbd-fault-injector.py
> +++ b/tests/qemu-iotests/nbd-fault-injector.py
> @@ -227,7 +227,7 @@ def parse_config(config):
>  def load_rules(filename):
>      config = configparser.RawConfigParser()
>      with open(filename, 'rt') as f:
> -        config.readfp(f, filename)
> +        config.read_file(f, filename)
>      return parse_config(config)
>  
>  def open_socket(path):
> 

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3226
Virtualization:  qemu.org | libvirt.org



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

* Re: [PATCH for-5.2] iotests: Replace deprecated ConfigParser.readfp()
  2020-11-13 13:47 ` Eric Blake
@ 2020-11-13 14:40   ` Kevin Wolf
  2020-11-13 14:43     ` Eric Blake
  0 siblings, 1 reply; 5+ messages in thread
From: Kevin Wolf @ 2020-11-13 14:40 UTC (permalink / raw)
  To: Eric Blake; +Cc: qemu-devel, qemu-block

Am 13.11.2020 um 14:47 hat Eric Blake geschrieben:
> On 11/13/20 4:06 AM, Kevin Wolf wrote:
> > iotest 277 fails on Fedora 33 (Python 3.9) because a deprecation warning
> > changes the output:
> > 
> >     nbd-fault-injector.py:230: DeprecationWarning: This method will be
> >     removed in future versions.  Use 'parser.read_file()' instead.
> > 
> > In fact, readfp() has already been deprecated in Python 3.2 and the
> > replacement has existed since the same version, so we can now
> > unconditionally switch to read_file().
> > 
> > Signed-off-by: Kevin Wolf <kwolf@redhat.com>
> > ---
> >  tests/qemu-iotests/nbd-fault-injector.py | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> Reviewed-by: Eric Blake <eblake@redhat.com>
> 
> I'm happy to queue this through my NBD tree for -rc2.

If you don't have other patches to send, I can take it through my own
tree, but if you send a pull request anyway, that's fine, too.

Kevin



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

* Re: [PATCH for-5.2] iotests: Replace deprecated ConfigParser.readfp()
  2020-11-13 14:40   ` Kevin Wolf
@ 2020-11-13 14:43     ` Eric Blake
  0 siblings, 0 replies; 5+ messages in thread
From: Eric Blake @ 2020-11-13 14:43 UTC (permalink / raw)
  To: Kevin Wolf; +Cc: qemu-devel, qemu-block

On 11/13/20 8:40 AM, Kevin Wolf wrote:
> Am 13.11.2020 um 14:47 hat Eric Blake geschrieben:
>> On 11/13/20 4:06 AM, Kevin Wolf wrote:
>>> iotest 277 fails on Fedora 33 (Python 3.9) because a deprecation warning
>>> changes the output:
>>>
>>>     nbd-fault-injector.py:230: DeprecationWarning: This method will be
>>>     removed in future versions.  Use 'parser.read_file()' instead.
>>>
>>> In fact, readfp() has already been deprecated in Python 3.2 and the
>>> replacement has existed since the same version, so we can now
>>> unconditionally switch to read_file().
>>>
>>> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
>>> ---
>>>  tests/qemu-iotests/nbd-fault-injector.py | 2 +-
>>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> Reviewed-by: Eric Blake <eblake@redhat.com>
>>
>> I'm happy to queue this through my NBD tree for -rc2.
> 
> If you don't have other patches to send, I can take it through my own
> tree, but if you send a pull request anyway, that's fine, too.

I've got at least one other NBD patch, and am double-checking my trees
and flagged inbox messages to see if there are any other last-minute
-rc2 candidates, so I will be sending a Pull Request on Monday.

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3226
Virtualization:  qemu.org | libvirt.org



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

* Re: [PATCH for-5.2] iotests: Replace deprecated ConfigParser.readfp()
  2020-11-13 10:06 [PATCH for-5.2] iotests: Replace deprecated ConfigParser.readfp() Kevin Wolf
  2020-11-13 13:47 ` Eric Blake
@ 2020-11-16 12:39 ` Philippe Mathieu-Daudé
  1 sibling, 0 replies; 5+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-11-16 12:39 UTC (permalink / raw)
  To: Kevin Wolf, qemu-block; +Cc: qemu-devel

On 11/13/20 11:06 AM, Kevin Wolf wrote:
> iotest 277 fails on Fedora 33 (Python 3.9) because a deprecation warning
> changes the output:
> 
>     nbd-fault-injector.py:230: DeprecationWarning: This method will be
>     removed in future versions.  Use 'parser.read_file()' instead.
> 
> In fact, readfp() has already been deprecated in Python 3.2 and the
> replacement has existed since the same version, so we can now
> unconditionally switch to read_file().
> 
> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
> ---
>  tests/qemu-iotests/nbd-fault-injector.py | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>



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

end of thread, other threads:[~2020-11-16 12:41 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-13 10:06 [PATCH for-5.2] iotests: Replace deprecated ConfigParser.readfp() Kevin Wolf
2020-11-13 13:47 ` Eric Blake
2020-11-13 14:40   ` Kevin Wolf
2020-11-13 14:43     ` Eric Blake
2020-11-16 12:39 ` Philippe Mathieu-Daudé

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.