Skip to content

Conversation

@serhiy-storchaka
Copy link
Member

…able.

@serhiy-storchaka serhiy-storchaka added the type-feature A feature request or enhancement label Apr 5, 2017
@mention-bot
Copy link

@serhiy-storchaka, thanks for your PR! By analyzing the history of the files in this pull request, we identified @tiran, @nnorwitz and @Yhg1s to be potential reviewers.

@serhiy-storchaka serhiy-storchaka merged commit fdbd011 into python:master Apr 16, 2017
@serhiy-storchaka serhiy-storchaka deleted the re-copy branch April 16, 2017 07:16
@aarcro
Copy link

aarcro commented Oct 31, 2017

This was not back ported? I'm on 3.6.3 and 3.6.1 and still get "TypeError: cannot deepcopy this pattern object"

@serhiy-storchaka
Copy link
Member Author

This is a new feature and it wasn't backported. You can work around this by registering trivial copiers in copy._copy_dispatch.

copy._copy_dispatch[type(re.compile(''))] = lambda x: x                                                                                                                                                   
copy._copy_dispatch[type(re.match('', ''))] = lambda x: x

This is a hack, do it only for working around limitations of old versions.

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

Labels

type-feature A feature request or enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants