Skip to content

bpo-37868: Improve is_dataclass for instances. #15325

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

Conversation

ericvsmith
Copy link
Member

@ericvsmith ericvsmith commented Aug 18, 2019


# class A above is really testing the same things as:
class B:
__dataclass_fields = []
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
__dataclass_fields = []
__dataclass_fields__ = []

Copy link
Member Author

@ericvsmith ericvsmith left a comment

Choose a reason for hiding this comment

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

Thanks for the review, Serhiy.

@ericvsmith ericvsmith merged commit b0f4dab into python:master Aug 20, 2019
@ericvsmith ericvsmith deleted the bpo-37868-is_dataclass-if-getattr-always-succeeds branch August 20, 2019 05:40
@miss-islington
Copy link
Contributor

Thanks @ericvsmith for the PR 🌮🎉.. I'm working now to backport this PR to: 3.7, 3.8.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Aug 20, 2019
(cherry picked from commit b0f4dab)

Co-authored-by: Eric V. Smith <[email protected]>
@bedevere-bot
Copy link

GH-15339 is a backport of this pull request to the 3.8 branch.

@bedevere-bot
Copy link

GH-15340 is a backport of this pull request to the 3.7 branch.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Aug 20, 2019
(cherry picked from commit b0f4dab)

Co-authored-by: Eric V. Smith <[email protected]>
miss-islington added a commit that referenced this pull request Aug 20, 2019
(cherry picked from commit b0f4dab)

Co-authored-by: Eric V. Smith <[email protected]>
miss-islington added a commit that referenced this pull request Aug 20, 2019
(cherry picked from commit b0f4dab)

Co-authored-by: Eric V. Smith <[email protected]>
@bedevere-bot
Copy link

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

Hi! The buildbot AMD64 Windows7 SP1 3.7 has failed when building commit 02c1457.

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/all/#builders/130/builds/1050) and take a look at the build logs.
  4. Check if the failure is related to this commit (02c1457) 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/all/#builders/130/builds/1050

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

Click to see traceback logs
From https://github.com/python/cpython
 * branch            3.7        -> FETCH_HEAD
Reset branch '3.7'

Could Not Find C:\buildbot.python.org\3.7.kloth-win64\build\Lib\*.pyc
The system cannot find the file specified.
Could Not Find C:\buildbot.python.org\3.7.kloth-win64\build\PCbuild\python*.zip

test_threadsignals skipped -- Can't test signal on win32
minkernel\crts\ucrt\src\appcrt\lowio\write.cpp(50) : Assertion failed: (_osfile(fh) & FOPEN)
test_epoll skipped -- test works only on Linux 2.6
test_wait3 skipped -- os.fork not defined
test_dbm_gnu skipped -- No module named '_gdbm'
test_xxtestfuzz skipped -- No module named '_xxtestfuzz'
test_kqueue skipped -- test works only on BSD
minkernel\crts\ucrt\src\appcrt\lowio\write.cpp(50) : Assertion failed: (_osfile(fh) & FOPEN)
minkernel\crts\ucrt\src\appcrt\lowio\close.cpp(49) : Assertion failed: (_osfile(fh) & FOPEN)
minkernel\crts\ucrt\src\appcrt\lowio\close.cpp(49) : Assertion failed: (_osfile(fh) & FOPEN)
test_ttk_guionly skipped -- gui not available (WSF_VISIBLE flag not set)
test_posix skipped -- No module named 'posix'
test_gdb skipped -- Couldn't find gdb on the path
test_ossaudiodev skipped -- No module named 'ossaudiodev'
test_grp skipped -- No module named 'grp'
test_spwd skipped -- No module named 'spwd'
test_syslog skipped -- No module named 'syslog'
test_nis skipped -- No module named 'nis'
test_ioctl skipped -- No module named 'fcntl'
test_curses skipped -- No module named '_curses'
test_poll skipped -- select.poll not defined
test_readline skipped -- No module named 'readline'
test_tix skipped -- gui not available (WSF_VISIBLE flag not set)
test_resource skipped -- No module named 'resource'
test_openpty skipped -- os.openpty() not available.
test_devpoll skipped -- test works only on Solaris OS family
test_fork1 skipped -- object <module 'os' from 'C:\\buildbot.python.org\\3.7.kloth-win64\\build\\lib\\os.py'> has no attribute 'fork'
test_fcntl skipped -- No module named 'fcntl'
test_pwd skipped -- No module named 'pwd'
test_dbm_ndbm skipped -- No module named '_dbm'
test_multiprocessing_forkserver skipped -- forkserver is not available on Windows
test_wait4 skipped -- object <module 'os' from 'C:\\buildbot.python.org\\3.7.kloth-win64\\build\\lib\\os.py'> has no attribute 'fork'
test_zipfile64 skipped -- test requires loads of disk-space bytes and a long time to run
test_pty skipped -- No module named 'termios'
test_crypt skipped -- No module named '_crypt'
test_tk skipped -- gui not available (WSF_VISIBLE flag not set)
test_multiprocessing_fork skipped -- fork is not available on Windows
test_pipes skipped -- pipes module only works on posix

Could Not Find C:\buildbot.python.org\3.7.kloth-win64\build\PCbuild\python*.zip

lisroach pushed a commit to lisroach/cpython that referenced this pull request Sep 10, 2019
DinoV pushed a commit to DinoV/cpython that referenced this pull request Jan 14, 2020
websurfer5 pushed a commit to websurfer5/cpython that referenced this pull request Jul 20, 2020
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.

5 participants