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

Update functionality in versioneer.py and setup.py #891

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ahmedsalim3
Copy link

So, I've been using radiomics in an image segmentation project and had to install it from source. I made two key changes:

1. versioneer.py file

Update for `SafeConfigParser` Deprecation

In the versioneer.py file, I updated the use of SafeConfigParser. The SafeConfigParser class has been renamed to ConfigParser. From Python 3.2 and above, ConfigParser should be used directly.

/usr/lib/python3.9/site-packages/nitrate/config.py:273: DeprecationWarning: The SafeConfigParser class has been renamed to ConfigParser in Python 3.2. This alias will be removed in future versions. Use ConfigParser directly instead.
parser = ConfigParser.SafeConfigParser()

-- Docs: https://docs.pytest.org/en/stable/warnings.html
Update for `readfp` Deprecation

The readfp method has been removed in future versions. It now supports the parser.read_file() method.

telemetryconfig.py:46: DeprecationWarning: This method will be removed in future versions. Use 'parser.read_file()' instead.
  self.config_parser.readfp(f)

2. setup.py file

  1. Updated the import statement to use import sysconfig.
  2. Fixed the if statement condition.
  3. Updated the include directories retrieval to reflect changes in the sysconfig API.

- Updated `SafeConfigParser` to `ConfigParser` in `versioneer.py` to align with Python 3.2+ standards.
- Replaced deprecated `readfp` method with `read_file` in `versioneer.py`.
- Changed import statement to `import sysconfig` in `setup.py`.
- Fixed architecture check condition to verify 64-bit Python in `setup.py`.
- Updated include directories retrieval in `setup.py` to match changes in `sysconfig` API.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant