qemu-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-commits] [qemu/qemu] f03868: python: futurize -f libfuturize.fixes


From: GitHub
Subject: [Qemu-commits] [qemu/qemu] f03868: python: futurize -f libfuturize.fixes.fix_print_wi...
Date: Tue, 12 Jun 2018 04:41:45 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: f03868bd5653265e97b253102d77d83ea85efdea
      
https://github.com/qemu/qemu/commit/f03868bd5653265e97b253102d77d83ea85efdea
  Author: Eduardo Habkost <address@hidden>
  Date:   2018-06-08 (Fri, 08 Jun 2018)

  Changed paths:
    M scripts/analyse-9p-simpletrace.py
    M scripts/analyse-locks-simpletrace.py
    M scripts/analyze-migration.py
    M scripts/device-crash-test
    M scripts/dump-guest-memory.py
    M scripts/kvm/kvm_flightrecorder
    M scripts/kvm/vmxcap
    M scripts/qmp/qemu-ga-client
    M scripts/qmp/qmp
    M scripts/qmp/qmp-shell
    M scripts/qmp/qom-get
    M scripts/qmp/qom-list
    M scripts/qmp/qom-set
    M scripts/qmp/qom-tree
    M scripts/replay-dump.py
    M scripts/signrom.py
    M scripts/simpletrace.py
    M scripts/vmstate-static-checker.py
    M tests/docker/docker.py
    M tests/docker/travis.py
    M tests/guest-debug/test-gdbstub.py
    M tests/image-fuzzer/runner.py
    M tests/migration/guestperf/engine.py
    M tests/migration/guestperf/plot.py
    M tests/migration/guestperf/shell.py
    M tests/qemu-iotests/149
    M tests/qemu-iotests/165
    M tests/qemu-iotests/iotests.py
    M tests/qemu-iotests/nbd-fault-injector.py
    M tests/qemu-iotests/qcow2.py
    M tests/qemu-iotests/qed.py
    M tests/vm/basevm.py

  Log Message:
  -----------
  python: futurize -f libfuturize.fixes.fix_print_with_import

Change all Python code to use print as a function.

This is necessary for Python 3 compatibility.

Done using:

  $ py=$( (g grep -l -E '^#!.*python';find -name '*.py' -printf '%P\n';) | \
    sort -u | grep -v README.sh4)
  $ futurize -w -f libfuturize.fixes.fix_print_with_import $py

Reviewed-by: Stefan Hajnoczi <address@hidden>
Acked-by: Fam Zheng <address@hidden>
Signed-off-by: Eduardo Habkost <address@hidden>
Message-Id: <address@hidden>
[ehabkost: fixup tests/docker/docker.py]
Signed-off-by: Eduardo Habkost <address@hidden>


  Commit: 068cf7a44cd4d65c05aa877dbebced295be5ce44
      
https://github.com/qemu/qemu/commit/068cf7a44cd4d65c05aa877dbebced295be5ce44
  Author: Eduardo Habkost <address@hidden>
  Date:   2018-06-08 (Fri, 08 Jun 2018)

  Changed paths:
    M scripts/qmp/qemu-ga-client
    M scripts/qmp/qmp
    M scripts/qmp/qmp-shell
    M scripts/qmp/qom-fuse
    M scripts/qmp/qom-get
    M scripts/qmp/qom-list
    M scripts/qmp/qom-set
    M scripts/qmp/qom-tree
    M tests/image-fuzzer/qcow2/__init__.py
    M tests/image-fuzzer/qcow2/layout.py

  Log Message:
  -----------
  python: futurize -f libfuturize.fixes.fix_absolute_import

Make implicit relative imports explicit and add "from __future__ import
absolute_import" at the top of each relevant module.

This is necessary for Python 3 compatibility.

Done using:

  $ py=$( (g grep -l -E '^#!.*python';find -name '*.py' -printf '%P\n';) | \
    sort -u | grep -v README.sh4)
  $ futurize -w -f libfuturize.fixes.fix_absolute_import $py

Signed-off-by: Eduardo Habkost <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Stefan Hajnoczi <address@hidden>
Signed-off-by: Eduardo Habkost <address@hidden>


  Commit: d24d523c14f5f519e04ea49bbe066323bb795879
      
https://github.com/qemu/qemu/commit/d24d523c14f5f519e04ea49bbe066323bb795879
  Author: Eduardo Habkost <address@hidden>
  Date:   2018-06-08 (Fri, 08 Jun 2018)

  Changed paths:
    M scripts/ordereddict.py
    M scripts/vmstate-static-checker.py
    M tests/image-fuzzer/runner.py

  Log Message:
  -----------
  python: futurize -f libfuturize.fixes.fix_next_call

Change obj.next() calls to next(obj).

This is necessary for Python 3 compatibility.

Done using:

  $ py=$( (g grep -l -E '^#!.*python';find -name '*.py' -printf '%P\n';) | \
    sort -u | grep -v README.sh4)
  $ futurize -w -f libfuturize.fixes.fix_next_call $py

Reviewed-by: Stefan Hajnoczi <address@hidden>
Signed-off-by: Eduardo Habkost <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Eduardo Habkost <address@hidden>


  Commit: d7a4228ebb0150e4c97a19077f3fac81d843e2c3
      
https://github.com/qemu/qemu/commit/d7a4228ebb0150e4c97a19077f3fac81d843e2c3
  Author: Eduardo Habkost <address@hidden>
  Date:   2018-06-08 (Fri, 08 Jun 2018)

  Changed paths:
    M scripts/qmp/qmp
    M scripts/qmp/qmp-shell
    M scripts/qmp/qom-fuse
    M scripts/qmp/qom-get
    M scripts/qmp/qom-list
    M scripts/qmp/qom-set
    M scripts/qmp/qom-tree
    M tests/qemu-iotests/093
    M tests/qemu-iotests/096
    M tests/qemu-iotests/136

  Log Message:
  -----------
  python: futurize -f lib2to3.fixes.fix_has_key

Change "dict.has_key(key)" to "key in dict"

This is necessary for Python 3 compatibility.

Done using:

  $ py=$( (g grep -l -E '^#!.*python';find -name '*.py' -printf '%P\n';) | \
    sort -u | grep -v README.sh4)
  $ futurize -w -f lib2to3.fixes.fix_has_key $py

Reviewed-by: Stefan Hajnoczi <address@hidden>
Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
Signed-off-by: Eduardo Habkost <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Eduardo Habkost <address@hidden>


  Commit: 050c5d865e946c7616f183d8be950ad1aae2cee4
      
https://github.com/qemu/qemu/commit/050c5d865e946c7616f183d8be950ad1aae2cee4
  Author: Eduardo Habkost <address@hidden>
  Date:   2018-06-08 (Fri, 08 Jun 2018)

  Changed paths:
    M scripts/qmp/qemu-ga-client

  Log Message:
  -----------
  python: futurize -f lib2to3.fixes.fix_standarderror

Rename StandardError to Exception.

This is necessary for Python 3 compatibility.

Done using:

  $ py=$( (g grep -l -E '^#!.*python';find -name '*.py' -printf '%P\n';) | \
    sort -u | grep -v README.sh4)
  $ futurize -w -f lib2to3.fixes.fix_standarderror $py

Reviewed-by: Stefan Hajnoczi <address@hidden>
Signed-off-by: Eduardo Habkost <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Eduardo Habkost <address@hidden>


  Commit: 8d2860cb91dbb3586a659c7793fb7828505c8a5a
      
https://github.com/qemu/qemu/commit/8d2860cb91dbb3586a659c7793fb7828505c8a5a
  Author: Eduardo Habkost <address@hidden>
  Date:   2018-06-08 (Fri, 08 Jun 2018)

  Changed paths:
    M tests/image-fuzzer/qcow2/fuzz.py

  Log Message:
  -----------
  python: futurize -f lib2to3.fixes.fix_reduce

Handle the move of reduce() to functools.reduce().

This is necessary for Python 3 compatibility.

Done using:

  $ py=$( (g grep -l -E '^#!.*python';find -name '*.py' -printf '%P\n';) | \
    sort -u | grep -v README.sh4)
  $ futurize -w -f lib2to3.fixes.fix_reduce $py

Reviewed-by: Stefan Hajnoczi <address@hidden>
Signed-off-by: Eduardo Habkost <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Eduardo Habkost <address@hidden>


  Commit: 5cdda8ce11820c52e5d51cf3e6cef54aa9ad9425
      
https://github.com/qemu/qemu/commit/5cdda8ce11820c52e5d51cf3e6cef54aa9ad9425
  Author: Eduardo Habkost <address@hidden>
  Date:   2018-06-08 (Fri, 08 Jun 2018)

  Changed paths:
    M scripts/analyse-locks-simpletrace.py

  Log Message:
  -----------
  python: futurize -f lib2to3.fixes.fix_tuple_params

Remove implicit tuple parameter unpacking.

This is necessary for Python 3 compatibility.

Done using:

  $ py=$( (g grep -l -E '^#!.*python';find -name '*.py' -printf '%P\n';) | \
    sort -u | grep -v README.sh4)
  $ futurize -w -f lib2to3.fixes.fix_tuple_params $py

Reviewed-by: Stefan Hajnoczi <address@hidden>
Signed-off-by: Eduardo Habkost <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Eduardo Habkost <address@hidden>


  Commit: cd67daaa93e259f5b5baedbe7cbd42e5c99421d3
      
https://github.com/qemu/qemu/commit/cd67daaa93e259f5b5baedbe7cbd42e5c99421d3
  Author: Eduardo Habkost <address@hidden>
  Date:   2018-06-08 (Fri, 08 Jun 2018)

  Changed paths:
    M tests/image-fuzzer/runner.py

  Log Message:
  -----------
  python: futurize -f lib2to3.fixes.fix_renames

Change sys.maxint to sys.maxsize.

This is necessary for Python 3 compatibility.

Done using:

  $ py=$( (g grep -l -E '^#!.*python';find -name '*.py' -printf '%P\n';) | \
    sort -u | grep -v README.sh4)
  $ futurize -w -f lib2to3.fixes.fix_renames $py

Reviewed-by: Stefan Hajnoczi <address@hidden>
Signed-off-by: Eduardo Habkost <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Eduardo Habkost <address@hidden>


  Commit: bd228083f7364dd2903970ec4dc0cc55bf156104
      
https://github.com/qemu/qemu/commit/bd228083f7364dd2903970ec4dc0cc55bf156104
  Author: Eduardo Habkost <address@hidden>
  Date:   2018-06-08 (Fri, 08 Jun 2018)

  Changed paths:
    M scripts/simpletrace.py

  Log Message:
  -----------
  python: futurize -f lib2to3.fixes.fix_except

Convert "except X, T" to "except X as T".

This is necessary for Python 3 compatibility.

Done using:

  $ py=$( (g grep -l -E '^#!.*python';find -name '*.py' -printf '%P\n';) | \
    sort -u | grep -v README.sh4)
  $ futurize -w -f lib2to3.fixes.fix_except $py

Reviewed-by: Stefan Hajnoczi <address@hidden>
Signed-off-by: Eduardo Habkost <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Eduardo Habkost <address@hidden>


  Commit: 4803c5cde8afa3f8b8fc1bc639ebf4f4fccddf94
      
https://github.com/qemu/qemu/commit/4803c5cde8afa3f8b8fc1bc639ebf4f4fccddf94
  Author: Eduardo Habkost <address@hidden>
  Date:   2018-06-08 (Fri, 08 Jun 2018)

  Changed paths:
    M scripts/qmp/qom-fuse
    M tests/qemu-iotests/118

  Log Message:
  -----------
  python: futurize -f lib2to3.fixes.fix_numliterals

Convert octal literals into the new syntax.

This is necessary for Python 3 compatibility.

Done using:

  $ py=$( (g grep -l -E '^#!.*python';find -name '*.py' -printf '%P\n';) | \
    sort -u | grep -v README.sh4)
  $ futurize -w -f lib2to3.fixes.fix_numliterals $py

Reviewed-by: Stefan Hajnoczi <address@hidden>
Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
Signed-off-by: Eduardo Habkost <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Eduardo Habkost <address@hidden>


  Commit: 7f2b55443a1c5cf17905b14c3ad38413924e4123
      
https://github.com/qemu/qemu/commit/7f2b55443a1c5cf17905b14c3ad38413924e4123
  Author: Eduardo Habkost <address@hidden>
  Date:   2018-06-08 (Fri, 08 Jun 2018)

  Changed paths:
    M configure

  Log Message:
  -----------
  configure: Require Python 2.7 or newer

All of the supported build platforms documented in qemu-doc.texi
should already support Python 2.7.

Removing support for Python 2.6 will allow us to remove some
compatibility modules we carry in the QEMU tree:

* scripts/argparse.py
* scripts/ordereddict.py

Python 2.6 is also not receiving bug fixes upstream and is not
supported by pylint, which makes it harder to keep the code
compatible with both Python 2 and Python 3.

Signed-off-by: Eduardo Habkost <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Daniel P. Berrangé <address@hidden>
Reviewed-by: Cleber Rosa <address@hidden>
Reviewed-by: John Snow <address@hidden>
Signed-off-by: Eduardo Habkost <address@hidden>


  Commit: 7f5ed8c997d16e1ee24b25a9b0af80e71fb79770
      
https://github.com/qemu/qemu/commit/7f5ed8c997d16e1ee24b25a9b0af80e71fb79770
  Author: Eduardo Habkost <address@hidden>
  Date:   2018-06-08 (Fri, 08 Jun 2018)

  Changed paths:
    R scripts/argparse.py

  Log Message:
  -----------
  python: Remove scripts/argparse.py

Python 2.7 (the minimum Python version we require) already
provides the argparse module on the standard library.

Signed-off-by: Eduardo Habkost <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Eduardo Habkost <address@hidden>


  Commit: c7883412440905b41dde7e70f4af782932e80e90
      
https://github.com/qemu/qemu/commit/c7883412440905b41dde7e70f4af782932e80e90
  Author: Eduardo Habkost <address@hidden>
  Date:   2018-06-08 (Fri, 08 Jun 2018)

  Changed paths:
    M Makefile
    R scripts/ordereddict.py
    M scripts/qapi/common.py
    M tests/Makefile.include

  Log Message:
  -----------
  python: Remove scripts/ordereddict.py

Python 2.7 (the minimum Python version we require) provides
collections.OrderedDict on the standard library, so we don't need
to carry our own implementation.

Signed-off-by: Eduardo Habkost <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Eduardo Habkost <address@hidden>


  Commit: 5eca450b2ec219c4256062bfb5498c726c1ed0a4
      
https://github.com/qemu/qemu/commit/5eca450b2ec219c4256062bfb5498c726c1ed0a4
  Author: Peter Maydell <address@hidden>
  Date:   2018-06-12 (Tue, 12 Jun 2018)

  Changed paths:
    M Makefile
    M configure
    M scripts/analyse-9p-simpletrace.py
    M scripts/analyse-locks-simpletrace.py
    M scripts/analyze-migration.py
    R scripts/argparse.py
    M scripts/device-crash-test
    M scripts/dump-guest-memory.py
    M scripts/kvm/kvm_flightrecorder
    M scripts/kvm/vmxcap
    R scripts/ordereddict.py
    M scripts/qapi/common.py
    M scripts/qmp/qemu-ga-client
    M scripts/qmp/qmp
    M scripts/qmp/qmp-shell
    M scripts/qmp/qom-fuse
    M scripts/qmp/qom-get
    M scripts/qmp/qom-list
    M scripts/qmp/qom-set
    M scripts/qmp/qom-tree
    M scripts/replay-dump.py
    M scripts/signrom.py
    M scripts/simpletrace.py
    M scripts/vmstate-static-checker.py
    M tests/Makefile.include
    M tests/docker/docker.py
    M tests/docker/travis.py
    M tests/guest-debug/test-gdbstub.py
    M tests/image-fuzzer/qcow2/__init__.py
    M tests/image-fuzzer/qcow2/fuzz.py
    M tests/image-fuzzer/qcow2/layout.py
    M tests/image-fuzzer/runner.py
    M tests/migration/guestperf/engine.py
    M tests/migration/guestperf/plot.py
    M tests/migration/guestperf/shell.py
    M tests/qemu-iotests/093
    M tests/qemu-iotests/096
    M tests/qemu-iotests/118
    M tests/qemu-iotests/136
    M tests/qemu-iotests/149
    M tests/qemu-iotests/165
    M tests/qemu-iotests/iotests.py
    M tests/qemu-iotests/nbd-fault-injector.py
    M tests/qemu-iotests/qcow2.py
    M tests/qemu-iotests/qed.py
    M tests/vm/basevm.py

  Log Message:
  -----------
  Merge remote-tracking branch 'remotes/ehabkost/tags/python-next-pull-request' 
into staging

Python queue, 2018-06-11

* Make code compatible with Python 3 using 'futurize --stage1'
* Require Python >= 2.7 and remove Python 2.6 compatibility
  modules

# gpg: Signature made Mon 11 Jun 2018 18:41:26 BST
# gpg:                using RSA key 2807936F984DC5A6
# gpg: Good signature from "Eduardo Habkost <address@hidden>"
# Primary key fingerprint: 5A32 2FD5 ABC4 D3DB ACCF  D1AA 2807 936F 984D C5A6

* remotes/ehabkost/tags/python-next-pull-request:
  python: Remove scripts/ordereddict.py
  python: Remove scripts/argparse.py
  configure: Require Python 2.7 or newer
  python: futurize -f lib2to3.fixes.fix_numliterals
  python: futurize -f lib2to3.fixes.fix_except
  python: futurize -f lib2to3.fixes.fix_renames
  python: futurize -f lib2to3.fixes.fix_tuple_params
  python: futurize -f lib2to3.fixes.fix_reduce
  python: futurize -f lib2to3.fixes.fix_standarderror
  python: futurize -f lib2to3.fixes.fix_has_key
  python: futurize -f libfuturize.fixes.fix_next_call
  python: futurize -f libfuturize.fixes.fix_absolute_import
  python: futurize -f libfuturize.fixes.fix_print_with_import

Signed-off-by: Peter Maydell <address@hidden>


Compare: https://github.com/qemu/qemu/compare/6e3bd769916e...5eca450b2ec2
      **NOTE:** This service been marked for deprecation: 
https://developer.github.com/changes/2018-04-25-github-services-deprecation/

      Functionality will be removed from GitHub.com on January 31st, 2019.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]