GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — [configparser] Add several deprecated attributes by donbarbos · Pull Request #14487 · python/typeshed

Conversation

@donbarbos

@donbarbos donbarbos commented Jul 28, 2025 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor
  • Source: gh-89336: Remove configparser APIs that were deprecated for 3.12 cpython#92503
  • Deprecate SafeConfigParser
  • Deprecate ParsingError filename parameter
  • Add deprecated ParsingError methods
  • Deprecate RawConfigParser.readfp method

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@donbarbos
[configparser] Deprecate SafeConfigParser
70e4c69
"Remove" PR for deprecation message: python/cpython#92503
@github-actions

This comment has been minimized.

Sign in to view
brianschubert
brianschubert approved these changes Jul 28, 2025
View reviewed changes
Comment thread stdlib/configparser.pyi Resolved

Uh oh!

There was an error while loading. Please reload this page.

@brianschubert

brianschubert commented Jul 28, 2025

Copy link
Copy Markdown
Collaborator

The same PR also removed a deprecated parameter from ParsingError, which isn't reflected in the stubs yet. Might as well add that as well while we're here!

donbarbos reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

donbarbos added 3 commits July 28, 2025 23:48
@donbarbos
Add overload to ParsingError
6ce442d
@donbarbos
Fix
9fb93fd
@donbarbos
add filename to first overload
fccd93f
@donbarbos

donbarbos commented Jul 28, 2025

Copy link
Copy Markdown
Contributor Author

The same PR also removed a deprecated parameter from ParsingError, which isn't reflected in the stubs yet. Might as well add that as well while we're here!

Thanks, again it seems to me that it is worth adding some removed deprecated methods since they reflected some capabilities of ParsingError (as in #14457 :-), but I'll be glad if someone agrees that they should be added:

    if sys.version_info < (3, 12):
        @property
        @deprecated("Removed in Python 3.12. Use `source` instead.")
        def filename(self) -> str: ...
        @filename.setter
        @deprecated("Removed in Python 3.12. Use `source` instead.")
        def filename(self, value: str) -> None: ...
        @deprecated("Removed in Python 3.12. Use `parser.read_file()` instead.")
        def readfp(self, fp: Iterable[str], filename: str | None = None) -> None: ...
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@github-actions

This comment has been minimized.

Sign in to view
@brianschubert

brianschubert commented Jul 28, 2025

Copy link
Copy Markdown
Collaborator

Looks like they were documented APIs, so adding them sounds reasonable to me

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@donbarbos donbarbos changed the title [configparser] Deprecate SafeConfigParser [configparser] Add several deprecated attributes Jul 29, 2025
@donbarbos
Add few deprecations
3262634
@donbarbos

donbarbos commented Jul 29, 2025

Copy link
Copy Markdown
Contributor Author

Looks like they were documented APIs, so adding them sounds reasonable to me

Indeed, I didn't notice that they were documented

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@donbarbos
Remove entries from allowlist
31c55e7
@github-actions

This comment has been minimized.

Sign in to view
@donbarbos
Merge branch 'main' into deprecate-SafeConfigParser-configparser
eda7300
@github-actions

github-actions Bot commented Aug 5, 2025

Copy link
Copy Markdown
Contributor

According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

srittau
srittau approved these changes Aug 8, 2025
View reviewed changes
@srittau
srittau merged commit d2eb9ac into python:main Aug 8, 2025
@donbarbos
donbarbos deleted the deprecate-SafeConfigParser-configparser branch February 25, 2026 04:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@srittau srittau srittau approved these changes
@brianschubert brianschubert brianschubert approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@donbarbos @brianschubert @srittau
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.