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

bpo-39361: Document the removal of tp_print #18125

Merged
merged 2 commits into from Jan 24, 2020

Conversation

@ammaraskar
Copy link
Member

ammaraskar commented Jan 22, 2020

Looks like there are still some remnants of tp_print in test_defaultdict.py:

# NOTE: We can't use tempfile.[Named]TemporaryFile since this
# code must exercise the tp_print C code, which only gets
# invoked for *real* files.
tfn = tempfile.mktemp()
try:
f = open(tfn, "w+")
try:
print(d1, file=f)
print(d2, file=f)
f.seek(0)
self.assertEqual(f.readline(), repr(d1) + "\n")
self.assertEqual(f.readline(), repr(d2) + "\n")
finally:
f.close()
finally:
os.remove(tfn)

The tp_print function was removed as part of 346f1a8 but the test exercising that path was never changed. Should changing that be done here as well or a separate issue/PR?

https://bugs.python.org/issue39361

@ammaraskar ammaraskar requested a review from vstinner Jan 22, 2020
@ammaraskar ammaraskar requested a review from jdemeyer Jan 22, 2020
@ammaraskar ammaraskar force-pushed the ammaraskar:tp_print_remove branch from 4a9a778 to b7179f4 Jan 22, 2020
@ammaraskar ammaraskar force-pushed the ammaraskar:tp_print_remove branch from b7179f4 to 60fa633 Jan 22, 2020
@vstinner vstinner merged commit 2d50976 into python:master Jan 24, 2020
5 checks passed
5 checks passed
Docs
Details
Azure Pipelines PR #20200124.12 succeeded
Details
bedevere/issue-number Issue number 39361 found
Details
bedevere/news "skip news" label found
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@vstinner

This comment has been minimized.

Copy link
Member

vstinner commented Jan 24, 2020

Thanks @ammaraskar

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.