Skip to content

doc: Fix example code using deprecated xrange in py_tutorials#18918

Merged
opencv-pushbot merged 1 commit intoopencv:3.4from
gabrielnhn:patch-2
Nov 25, 2020
Merged

doc: Fix example code using deprecated xrange in py_tutorials#18918
opencv-pushbot merged 1 commit intoopencv:3.4from
gabrielnhn:patch-2

Conversation

@gabrielnhn
Copy link
Copy Markdown
Contributor

@gabrielnhn gabrielnhn commented Nov 25, 2020

Update py_tutorial Camera Calibration:

xrange() was abandoned and doesn't exist in Python 3. range() works as intended

  • I agree to contribute to the project under Apache 2 License.
  • To the best of my knowledge, the proposed patch is not based on a code under GPL or other license that is incompatible with OpenCV
  • The PR is proposed to proper branch
  • There is reference to original bug report and related work
  • There is accuracy test, performance test and test data in opencv_extra repository, if applicable
    Patch to opencv_extra has the same branch name.
  • The feature is well documented and sample code can be built with the project CMake

@gabrielnhn gabrielnhn changed the title doc: Fix example code using deprecated xrange doc: Fix example code using deprecated xrange in py_tutorials Nov 25, 2020
@alalek
Copy link
Copy Markdown
Member

alalek commented Nov 25, 2020

Thank you for contribution!

This patch should go into 3.4 branch first.
We will merge changes from 3.4 into master regularly (weekly/bi-weekly).

So, please:

  • change "base" branch of this PR: master => 3.4 (use "Edit" button near PR title)
  • rebase your commits from master onto 3.4 branch. For example:
    git rebase -i --onto upstream/3.4 upstream/master
    (check list of your commits, save and quit (Esc + "wq" + Enter)
    where upstream is configured by following this GitHub guide and fetched (git fetch upstream).
  • push rebased commits into source branch of your fork (with --force option)

Note: no needs to re-open PR, apply changes "inplace".

@gabrielnhn gabrielnhn changed the base branch from master to 3.4 November 25, 2020 11:32
@asmorkalov
Copy link
Copy Markdown
Contributor

@gabrielnhn Please pay attention, that you changed target branch but actual rebase does not happen. Please rebase the branch properly.

xrange was abandoned and doesn't exist in Python 3. range() works just the same
@gabrielnhn
Copy link
Copy Markdown
Contributor Author

I believe the required changes were applied successfully by now. Sorry for the delay.

@opencv-pushbot opencv-pushbot merged commit 3fd0d0d into opencv:3.4 Nov 25, 2020
This was referenced Nov 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

category: documentation Documentation fix or update

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants