Skip to content

Conversation

@shihai1991
Copy link
Member

@shihai1991shihai1991 commented Feb 9, 2020

@codecov
Copy link

codecovbot commented Feb 9, 2020

Codecov Report

Merging #18424 into master will increase coverage by 0.99%.
The diff coverage is n/a.

Impacted file tree graph

@@ Coverage Diff @@## master #18424 +/- ## =========================================== + Coverage 82.19% 83.19% +0.99%  =========================================== Files 1957 1570 -387 Lines 589306 414436 -174870 Branches 44428 44428 =========================================== - Hits 484409 344788 -139621 + Misses 95235 59998 -35237 + Partials 9662 9650 -12 
Impacted FilesCoverage Δ
Lib/distutils/tests/test_bdist_rpm.py30.00% <0.00%> (-65.00%)⬇️
Lib/distutils/command/bdist_rpm.py7.63% <0.00%> (-56.88%)⬇️
Lib/test/test_urllib2net.py76.92% <0.00%> (-13.85%)⬇️
Lib/test/test_smtpnet.py78.57% <0.00%> (-12.86%)⬇️
Lib/ftplib.py63.85% <0.00%> (-6.06%)⬇️
Lib/test/test_ftplib.py87.11% <0.00%> (-4.72%)⬇️
Lib/dbm/__init__.py66.66% <0.00%> (-4.45%)⬇️
Tools/scripts/db2pickle.py17.82% <0.00%> (-3.97%)⬇️
Lib/test/test_socket.py71.94% <0.00%> (-3.87%)⬇️
Tools/scripts/pickle2db.py16.98% <0.00%> (-3.78%)⬇️
... and 431 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7f6f7ee...f013d98. Read the comment docs.

Copy link
Member

@corona10corona10 left a comment

Choose a reason for hiding this comment

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

LGTM on my side.
@vstinner Can you please take a look?

@csabellacsabella requested review from vstinner and removed request for vstinnerMay 25, 2020 17:53
@vstinner
Copy link
Member

Oops, I had a pending comment that I never submitted!

@shihai1991
Copy link
MemberAuthor

Oops, I had a pending comment that I never submitted!

I always forget to submit too ; )

@shihai1991
Copy link
MemberAuthor

shihai1991 commented May 27, 2020

@vstinner Hi, victor. There have a testcase of nomralizeing() in #19069, can you take a look if you have free time, thanks.


data=PyBytes_AS_STRING(value);
size=strlen(data); /* XXX Why not Py_SIZE(value)? */
/* bpo-39593: XXX Why not Py_SIZE(value)? */
Copy link
Member

Choose a reason for hiding this comment

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

I don't think that it's correct to add a test which indirectly specify the behavior and keep this comment which suggests to change the behavior.

I suggest to rewrite the comment to explain that we do use strlen() on purpose, rather than PyBytes_GET_SIZE() since we truncate characters after a null character on purpose. Keep the bpo number in the comment.

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

Thanks, got it. I updated the description info, do you think it's clear enough?

Co-authored-by: Victor Stinner <vstinner@python.org>
@shihai1991shihai1991 requested a review from vstinnerJune 1, 2020 16:32
@vstinnervstinner merged commit a97011b into python:masterJun 1, 2020
@vstinner
Copy link
Member

Thanks, merged.

@shihai1991
Copy link
MemberAuthor

Thanks, merged.

Thanks, victor.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@shihai1991@vstinner@corona10@the-knights-who-say-ni@bedevere-bot