Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

{Interactive} Compliant with Python 3.12 #8186

Merged
merged 2 commits into from
Oct 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/interactive/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
Release History
===============

1.0.0b1
+++++
* Compliant with Python 3.12

0.5.3
+++++
* Optimize the visualization of help text when the window is reduced horizontally
Expand Down
2 changes: 1 addition & 1 deletion src/interactive/azext_interactive/azclishell/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------------------------------

VERSION = '0.5.3'
VERSION = '1.0.0b1'
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,9 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------------------------------
from __future__ import print_function

import configparser
import os

from six.moves import configparser

from azure.cli.core._help import PRIVACY_STATEMENT

from prompt_toolkit import prompt # pylint: disable=import-error
Expand Down Expand Up @@ -73,7 +70,7 @@ def __init__(self, cli_config, style=None):
self.config.write(config_file)
else:
with open(os.path.join(self.config_dir, CONFIG_FILE_NAME), 'r') as config_file:
self.config.readfp(config_file) # pylint: disable=deprecated-method
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

readfp is deprecated since Python 3.2. I guess use it to support Python 2.7.

https://docs.python.org/3.11/library/configparser.html#configparser.ConfigParser.readfp

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

readfp is deprecated since Python 3.2. I guess use it to support Python 2.7.

https://docs.python.org/3.11/library/configparser.html#configparser.ConfigParser.readfp

I thought we no longer needed to support Python 2?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it's been EOL for almost five years.

self.config.read_file(config_file)
self.update()

def get_config_dir(self):
Expand Down
Loading