X Tutup
The Wayback Machine - https://web.archive.org/web/20260222081100/https://github.com/python/cpython/pull/21248
Skip to content

Comments

bpo-41177: Add iterator support to ConvertingList, ConvertingTuple, and items() to ConvertingDict#21248

Closed
godotgildor wants to merge 3 commits intopython:mainfrom
godotgildor:feature/add_iterator_support_for_converting_objects_in_logging
Closed

bpo-41177: Add iterator support to ConvertingList, ConvertingTuple, and items() to ConvertingDict#21248
godotgildor wants to merge 3 commits intopython:mainfrom
godotgildor:feature/add_iterator_support_for_converting_objects_in_logging

Conversation

@godotgildor
Copy link

@godotgildor godotgildor commented Jun 30, 2020

Add iterator support for logging.config.ConvertingList and logging.config.ConvertingTuple
Add items() support for logging.config.ConvertingDict.

https://bugs.python.org/issue41177

 - ConvertingDict
 - ConvertingList
 - ConvertingTuple
@the-knights-who-say-ni
Copy link

Hello, and thanks for your contribution!

I'm a bot set up to make sure that the project can legally accept this contribution by verifying everyone involved has signed the PSF contributor agreement (CLA).

Recognized GitHub username

We couldn't find a bugs.python.org (b.p.o) account corresponding to the following GitHub usernames:

@godotgildor

This might be simply due to a missing "GitHub Name" entry in one's b.p.o account settings. This is necessary for legal reasons before we can look at this contribution. Please follow the steps outlined in the CPython devguide to rectify this issue.

You can check yourself to see if the CLA has been received.

Thanks again for the contribution, we look forward to reviewing it!

@vsajip vsajip changed the title bpo-41177 Add iterator support to ConvertingList, ConvertingTuple, and items() to ConvertingDict bpo-41177: Add iterator support to ConvertingList, ConvertingTuple, and items() to ConvertingDict Jul 1, 2020
@vsajip vsajip added the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Jul 7, 2020
@bedevere-bot
Copy link

🤖 New build scheduled with the buildbot fleet by @vsajip for commit 349b2cc 🤖

If you want to schedule another build, you need to add the ":hammer: test-with-buildbots" label again.

@bedevere-bot bedevere-bot removed the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Jul 7, 2020
Copy link
Member

@vsajip vsajip left a comment

Choose a reason for hiding this comment

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

I think tests should be added, but the NEWS file removed (as the APIs being changed are internal, they don't need a NEWS entry - I'll add the skip-news label so it doesn't cause a block to merging).

@bedevere-bot
Copy link

A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated.

Once you have made the requested changes, please leave a comment on this pull request containing the phrase I have made the requested changes; please review again. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request.

# Can't replace a tuple entry.
return self.convert_with_key(key, value, replace=False)

def __iter__(self):
Copy link
Member

Choose a reason for hiding this comment

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

Is it needed? Are any tests failed without it?

Copy link
Member

@vsajip vsajip Aug 1, 2020

Choose a reason for hiding this comment

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

No tests fail without it, but the request is for additional functionality (which would need its own tests, of course). The issue gives more info about the use case.

Copy link
Member

Choose a reason for hiding this comment

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

I suppose that tests for iterating ConvertingList and ConvertingTuple would expose that there is no need to add __iter__().

Tests are necessary.

@vsajip
Copy link
Member

vsajip commented May 11, 2022

I requested that tests be added, but the OP has not responded to that. The requested functionality could be added (the use case in the issue is not unreasonable) but it's not an especial priority - the OP can implement tests if they want to hurry things along, and I'll review it.

@serhiy-storchaka
Copy link
Member

The original issue has been closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

X Tutup