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

deepcopy can't copy self-referential new-style classes #38157

Closed
scp93ch mannequin opened this issue Mar 13, 2003 · 3 comments
Closed

deepcopy can't copy self-referential new-style classes #38157

scp93ch mannequin opened this issue Mar 13, 2003 · 3 comments
Labels
interpreter-core (Objects, Python, Grammar, and Parser dirs)

Comments

@scp93ch
Copy link
Mannequin

scp93ch mannequin commented Mar 13, 2003

BPO 702858
Nosy @gvanrossum

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = None
closed_at = <Date 2003-06-13.19:27:38.000>
created_at = <Date 2003-03-13.10:14:29.000>
labels = ['interpreter-core']
title = "deepcopy can't copy self-referential new-style classes"
updated_at = <Date 2003-06-13.19:27:38.000>
user = 'https://bugs.python.org/scp93ch'

bugs.python.org fields:

activity = <Date 2003-06-13.19:27:38.000>
actor = 'gvanrossum'
assignee = 'none'
closed = True
closed_date = None
closer = None
components = ['Interpreter Core']
creation = <Date 2003-03-13.10:14:29.000>
creator = 'scp93ch'
dependencies = []
files = []
hgrepos = []
issue_num = 702858
keywords = []
message_count = 3.0
messages = ['15117', '15118', '15119']
nosy_count = 3.0
nosy_names = ['gvanrossum', 'staschuk', 'scp93ch']
pr_nums = []
priority = 'normal'
resolution = None
stage = None
status = 'closed'
superseder = None
type = None
url = 'https://bugs.python.org/issue702858'
versions = ['Python 2.3']

@scp93ch
Copy link
Mannequin Author

scp93ch mannequin commented Mar 13, 2003

Given this code:

import copy
class Foo(object):
    pass
f = Foo()
f.bar = f
g = copy.deepcopy(f)

You will find with Python 2.3a2 and 2.2.2:

f is f.bar -> True
g is g.bar -> False
g is not f -> True
g.bar is not f -> True

Obviously, all the statements should be True.

@scp93ch scp93ch mannequin closed this as completed Mar 13, 2003
@scp93ch scp93ch mannequin added the interpreter-core (Objects, Python, Grammar, and Parser dirs) label Mar 13, 2003
@scp93ch scp93ch mannequin closed this as completed Mar 13, 2003
@scp93ch scp93ch mannequin added the interpreter-core (Objects, Python, Grammar, and Parser dirs) label Mar 13, 2003
@staschuk
Copy link
Mannequin

staschuk mannequin commented Mar 30, 2003

Logged In: YES
user_id=666873

See patch 707900.

http://www.python.org/sf/707900

@gvanrossum
Copy link
Member

Logged In: YES
user_id=6380

Fixed using that patch.

@ezio-melotti ezio-melotti transferred this issue from another repository Apr 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
interpreter-core (Objects, Python, Grammar, and Parser dirs)
Projects
None yet
Development

No branches or pull requests

1 participant