Skip to content

Conversation

@guoci
Copy link
Contributor

@guoci guoci commented Dec 27, 2021

@github-actions
Copy link

This PR is stale because it has been open for 30 days with no activity.

@github-actions github-actions bot added the stale Stale PR or inactive for long period of time. label Jan 27, 2022
Copy link
Contributor

@MaxwellDupre MaxwellDupre left a comment

Choose a reason for hiding this comment

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

The issue had comments:
...can you give an example where it fails? Is it possible to write a unit test demonstrating that the current behaviour is wrong?
Can give more info please? I cant see a clear use case.

@guoci
Copy link
Contributor Author

guoci commented Feb 5, 2022

The old code has an incorrect usage of io.IncrementalNewlineDecoder. Since the decode method is called only once, is it the final call and needs the final=True argument as documented in https://docs.python.org/dev/library/codecs.html#codecs.IncrementalDecoder.decode

It happens that in those cases, the results are correct in spite of the incorrect usage.

@github-actions github-actions bot removed the stale Stale PR or inactive for long period of time. label Feb 6, 2022
@guoci guoci force-pushed the replace_IncrementalNewlineDecoder branch from 7f94b2b to 7107a2a Compare October 31, 2025 13:50
@guoci guoci force-pushed the replace_IncrementalNewlineDecoder branch from 7107a2a to ffb090f Compare October 31, 2025 14:02
Copy link
Member

@brettcannon brettcannon 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 the news entry can be a bit more descriptive, but otherwise LGTM!

@bedevere-app
Copy link

bedevere-app bot commented Oct 31, 2025

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.

@guoci
Copy link
Contributor Author

guoci commented Oct 31, 2025

I have made the requested changes; please review again

@bedevere-app
Copy link

bedevere-app bot commented Oct 31, 2025

Thanks for making the requested changes!

@brettcannon: please review the changes made to this pull request.

@bedevere-app bedevere-app bot requested a review from brettcannon October 31, 2025 23:07
@brettcannon brettcannon self-assigned this Oct 31, 2025
@brettcannon brettcannon enabled auto-merge (squash) October 31, 2025 23:14
@guoci
Copy link
Contributor Author

guoci commented Nov 7, 2025

The tests are failing due to the news item.
/home/runner/work/cpython/cpython/Doc/build/NEWS:212: WARNING: py:meth reference target not found: io.IncrementalNewlineDecoder.decode [ref.meth]

auto-merge was automatically disabled November 9, 2025 17:00

Head branch was pushed to by a user without write access

@guoci
Copy link
Contributor Author

guoci commented Nov 14, 2025

@brettcannon is that ok now?

@brettcannon
Copy link
Member

@brettcannon is that ok now?

Sorry, had a sick toddler the past week, so I haven't had time to look at your changes. But I'm going to look now.

@brettcannon brettcannon enabled auto-merge (squash) November 14, 2025 23:47
@brettcannon brettcannon changed the title bpo-46186: replace io.IncrementalNewlineDecoder with non incremental newline decoders GH-90344: replace io.IncrementalNewlineDecoder with non incremental newline decoders Nov 14, 2025
@brettcannon brettcannon disabled auto-merge November 14, 2025 23:48
@brettcannon brettcannon enabled auto-merge (squash) November 14, 2025 23:49
@brettcannon brettcannon disabled auto-merge November 14, 2025 23:49
@brettcannon brettcannon enabled auto-merge (squash) November 14, 2025 23:49
@brettcannon brettcannon merged commit 453d886 into python:main Nov 15, 2025
46 checks passed
@brettcannon
Copy link
Member

Thanks, @guoci !

@bedevere-bot
Copy link

⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️

Hi! The buildbot ARM64 macOS 3.x (tier-2) has failed when building commit 453d886.

What do you need to do:

  1. Don't panic.
  2. Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/#/builders/725/builds/12345) and take a look at the build logs.
  4. Check if the failure is related to this commit (453d886) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/#/builders/725/builds/12345

Failed tests:

  • test_urllib2net

Summary of the results of the build (if available):

==

Click to see traceback logs
remote: Enumerating objects: 26, done.        
remote: Counting objects:   3% (1/26)        
remote: Counting objects:   7% (2/26)        
remote: Counting objects:  11% (3/26)        
remote: Counting objects:  15% (4/26)        
remote: Counting objects:  19% (5/26)        
remote: Counting objects:  23% (6/26)        
remote: Counting objects:  26% (7/26)        
remote: Counting objects:  30% (8/26)        
remote: Counting objects:  34% (9/26)        
remote: Counting objects:  38% (10/26)        
remote: Counting objects:  42% (11/26)        
remote: Counting objects:  46% (12/26)        
remote: Counting objects:  50% (13/26)        
remote: Counting objects:  53% (14/26)        
remote: Counting objects:  57% (15/26)        
remote: Counting objects:  61% (16/26)        
remote: Counting objects:  65% (17/26)        
remote: Counting objects:  69% (18/26)        
remote: Counting objects:  73% (19/26)        
remote: Counting objects:  76% (20/26)        
remote: Counting objects:  80% (21/26)        
remote: Counting objects:  84% (22/26)        
remote: Counting objects:  88% (23/26)        
remote: Counting objects:  92% (24/26)        
remote: Counting objects:  96% (25/26)        
remote: Counting objects: 100% (26/26)        
remote: Counting objects: 100% (26/26), done.        
remote: Compressing objects:  14% (1/7)        
remote: Compressing objects:  28% (2/7)        
remote: Compressing objects:  42% (3/7)        
remote: Compressing objects:  57% (4/7)        
remote: Compressing objects:  71% (5/7)        
remote: Compressing objects:  85% (6/7)        
remote: Compressing objects: 100% (7/7)        
remote: Compressing objects: 100% (7/7), done.        
remote: Total 14 (delta 12), reused 7 (delta 7), pack-reused 0 (from 0)        
From https://github.com/python/cpython
 * branch                    main       -> FETCH_HEAD
Note: switching to '453d886f8592d2f4346d5621b1e4ff31c24338d5'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:

  git switch -c <new-branch-name>

Or undo this operation with:

  git switch -

Turn off this advice by setting config variable advice.detachedHead to false

HEAD is now at 453d886f859 GH-90344: replace single-call `io.IncrementalNewlineDecoder` usage with non-incremental newline decoders (GH-30276)
Switched to and reset branch 'main'

make: *** [buildbottest] Error 2

StanFromIreland pushed a commit to StanFromIreland/cpython that referenced this pull request Dec 6, 2025
…age with non-incremental newline decoders (pythonGH-30276)

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Brett Cannon <[email protected]>
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.

6 participants