Skip to content

Conversation

@donBarbos
Copy link
Contributor

@donBarbos donBarbos commented Feb 19, 2025

New behavior:

>>> class A(_datetime.time): pass
...
>>> class B(_pydatetime.time): pass
...
>>> repr(A(1))
'A(1, 0)'
>>> repr(B(1)) # or str()
'B(1, 0)'

Old behavior:

>>> class A(_datetime.time): pass
...
>>> class B(_pydatetime.time): pass
...
>>> repr(A(1))
'A(1, 0)'
>>> repr(B(1)) # or str()
'__main__.B(1, 0)'

@mattip
Copy link
Contributor

mattip commented Feb 19, 2025

Might be nice to add the reproducer from #107773 as a test, if only to make sure this does not regress and that the C and Python implementations remain in sync.

Copy link
Member

@jaraco jaraco left a comment

Choose a reason for hiding this comment

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

I like this approach. Thank you for developing it!

Just a couple of minor comments about the test implementation and I think this is good to go.

@donBarbos
Copy link
Contributor Author

@jaraco thank you for the comments, I added your suggestions 👍

@donBarbos
Copy link
Contributor Author

Sorry, I was in a hurry to ping you, but now everything seems to be ready

@jaraco jaraco merged commit 81a9b53 into python:main Feb 23, 2025
39 checks passed
@bedevere-bot
Copy link

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

Hi! The buildbot aarch64 RHEL8 LTO + PGO 3.x has failed when building commit 81a9b53.

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/78/builds/8483) and take a look at the build logs.
  4. Check if the failure is related to this commit (81a9b53) 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/78/builds/8483

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

==

Click to see traceback logs
Traceback (most recent call last):
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL8-aarch64.lto-pgo/build/Lib/threading.py", line 1054, in _bootstrap_inner
    self.run()
    ~~~~~~~~^^
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL8-aarch64.lto-pgo/build/Lib/threading.py", line 996, in run
    self._target(*self._args, **self._kwargs)
    ~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL8-aarch64.lto-pgo/build/Lib/test/test_interpreters/test_stress.py", line 30, in task
    interp = interpreters.create()
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL8-aarch64.lto-pgo/build/Lib/test/support/interpreters/__init__.py", line 76, in create
    id = _interpreters.create(reqrefs=True)
interpreters.InterpreterError: interpreter creation failed
k


Traceback (most recent call last):
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL8-aarch64.lto-pgo/build/Lib/threading.py", line 1054, in _bootstrap_inner
    self.run()
    ~~~~~~~~^^
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL8-aarch64.lto-pgo/build/Lib/threading.py", line 996, in run
    self._target(*self._args, **self._kwargs)
    ~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL8-aarch64.lto-pgo/build/Lib/test/test_interpreters/test_stress.py", line 47, in run
    interp = interpreters.create()
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL8-aarch64.lto-pgo/build/Lib/test/support/interpreters/__init__.py", line 76, in create
    id = _interpreters.create(reqrefs=True)
interpreters.InterpreterError: interpreter creation failed
k

@jaraco
Copy link
Member

jaraco commented Feb 24, 2025

The buildbot failures appear unrelated to this change, so I'm going to assume they're not related, but if someone finds otherwise, please don't hesitate to ping me or back out the change and we can revisit.\

seehwan pushed a commit to seehwan/cpython that referenced this pull request Apr 16, 2025
…ementations (python#130308)

---------

Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
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.

4 participants