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

Remove 'coreader' methods adding formal '__copy__' API #1442

Merged
merged 9 commits into from
Jan 16, 2021

Conversation

mondeja
Copy link
Collaborator

@mondeja mondeja commented Jan 14, 2021

  • Removed coreader methods of VideoFileClip and AudioFileClip.
  • Added safe support for copy.copy(clip) and copy.deepcopy(clip).
  • Replace copy(clip) by clip.copy() in video.fx.blink.
  • Removed test of video.fx.blink that was added because copy() was removed from builtin Python functions.

I haven't tested performance, but this change should speed up the library, since almost all the transormations returns copies and now some unnecesary checks are not executed in Clip.copy.

Closes #1441

  • I have provided code that clearly demonstrates the bug and that only works correctly when applying this fix
  • I have added suitable tests demonstrating a fixed bug or new/changed feature to the test suite in tests/
  • I have properly documented new or changed features in the documentation or in the docstrings
  • I have properly explained unusual or unexpected code in the comments around it
  • I have formatted my code using black -t py36

@mondeja mondeja added breaking-change Must not merge without proper approval. Requires full documentation (own section) in the changelog. bug-fix For PRs and issues solving bugs. enhancement Positive change that does not change the API, i.e. improved performance, using less memory etc. labels Jan 14, 2021
@mondeja mondeja marked this pull request as draft January 15, 2021 10:33
@mondeja mondeja marked this pull request as ready for review January 15, 2021 11:09
@tburrows13
Copy link
Collaborator

I fixed the changelog, so feel free to merge when you like.

@coveralls
Copy link

coveralls commented Jan 16, 2021

Coverage Status

Coverage decreased (-0.1%) to 66.018% when pulling 091401b on mondeja:copy-methods into 72e1418 on Zulko:master.

@mondeja mondeja merged commit cc02587 into Zulko:master Jan 16, 2021
@mondeja mondeja deleted the copy-methods branch January 18, 2021 23:56
tburrows13 added a commit to tburrows13/moviepy that referenced this pull request Jan 19, 2021
* Replace 'coreader' methods by formal '__copy__' API

* Fix code style error

* Add support for 'copy.copy(clip)' and 'copy.deepcopy(clip)' to CHANGELOG

* Add tests for copied clips rendering

* Fine tune comments

* Update CHANGELOG.md

* Fix flake8 errors

Co-authored-by: Tom Burrows <tomburrows13@icloud.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking-change Must not merge without proper approval. Requires full documentation (own section) in the changelog. bug-fix For PRs and issues solving bugs. enhancement Positive change that does not change the API, i.e. improved performance, using less memory etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

'coreader' methods of 'VideoFileClip' and 'AudioFileClip' are buggy
3 participants