This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: turtle.py update: 1.0 --> 1.1
Type: enhancement Stage:
Components: Library (Lib) Versions: Python 3.1
process
Status: closed Resolution: accepted
Dependencies: Superseder:
Assigned To: Nosy List: benjamin.peterson, georg.brandl, gregorlingl, loewis, r.david.murray, rhettinger
Priority: normal Keywords: patch

Created on 2009-05-04 14:56 by gregorlingl, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
turtle31.py gregorlingl, 2009-05-04 14:56 Updated version of turtle module
turtle30_to_31.diff gregorlingl, 2009-05-04 15:02 Unified diff for ver1.0 --> ver 1.1
tdemo_round_dance.py gregorlingl, 2009-05-04 22:08
print_ver_patch.diff gregorlingl, 2009-05-04 22:14 This patch comments out one print statement
turtle31.rst.diff gregorlingl, 2009-05-05 00:28 Update of turtle.py docs for turtle version 1.1
tdemo_nim.py gregorlingl, 2009-05-05 00:30 nim game, a script for the turtle graphics Demo directory
issue5923.doc.patch r.david.murray, 2009-05-05 02:15 update of turtle.py docs for 1.1 against r72307
Messages (11)
msg87132 - (view) Author: Gregor Lingl (gregorlingl) Date: 2009-05-04 14:56
I propose to update turtle.py with this new version 1.1 of the turtle
module. 

Summary of changes:

1. a few bugfixes, with 1 - 5 lines of code changed for each;
   these concern bugs that prevented turtle to run correctly

2. I've added four methods to the class TurtleScreeenBase:
   _onkeypress(fun, key)  (supplementing _onkeyrelease)
   mainloop()  (which is now a Screen-method and a function)
   textinput(title, prompt)
   numinput(title, prompt, default, minval, maxval)
          the latter two remedy the complete lack of input methods

   _onkey, an internal method name is changed to _onkeyrelease

3. I've added one method to the class TurtleScreen:
   onkeypress(fun, key=None)        implemented in analogy to the
already present onkey()
       which got onkeyrelease as an alias.

4. I've changed several portions of the code that affect
  the representation of the turtleshape thus making it
  more compact (by removing some duplicated code) and more
  powerful, i. e. by adding the possibility to apply
  shearings to turtleshapes (in addition to the already present
  scaling and rotating transformations). Thus now the full
  range of (non singular) linear transformations is available.

  New methods in class RawTurtle:
   shearfactor(shear=None)    set or get the shearfactor
   shapetransform(t11, t12, t21, t22)
                   set or get the shape transform directly
   get_shapepoly() return the polygon of the current shape

  I've enhanced the functionality of tiltangle(angle=None)
  to contain also that of settiltangle and I propose to
  declare settiltangle as deprecated.
  5. I've removed a lot of codelines that were commented out
  during the process of transferring the module from 2.6
  to 3.0

6. I've implemented the bugfix for http://bugs.python.org/issue4117
  according do my proposition there and I strongly
  recommend this change again, as the bug described is very
  annoying, the fix is easy and no one proposed a better
  solution. 

For convenience I'll add the diff subsequently

Regards,
Gregor
msg87133 - (view) Author: Gregor Lingl (gregorlingl) Date: 2009-05-04 15:02
Just to see what I've changed:

The unified diff from version 1.0 ( Revision 69847 )
to the proposed version 1.1b

(Should result in version 1.1 'final'ly)
msg87166 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2009-05-04 20:26
I won't have time to look into this soon.
msg87179 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2009-05-04 21:18
Had a quick look over the patch, and couldn't find ab obvious problem
(except one -- you maybe want to comment out "print(_ver)" again).

Needs a docs patch, though.
msg87184 - (view) Author: Gregor Lingl (gregorlingl) Date: 2009-05-04 22:08
I just wanted to submit the reply below. In the meantime Benjamin's
remark arrived. So perhaps the issue can be resolved successfully.

May I submit here one of the two example scripts I'd like to add to the
demos: tdemo_round_dance.py . Have a look at it and run it. 
Just for fun - in this strained situation - I hope you enjoy it.

I'll prepare the patch for the docs and I'll submit it as soon as
possible, not later than tomorrow.

Of course the print(_ver) statement should be commented out.

Regards,
Gregor

-----------------------------------------------------------

So perhaps there is someone else who could do it.

I'd like to state decisively:

Version 1.1 contains significant amendments.
I tested it thoroughly 
It would be a big advantage if others could test it also
during the 4 weeks of beta testing.

So I'd like to ask: Would it be practicable to put it
into 3.1b with the caveat to revert this adoption if it
turns out to have unrecoverable flaws? 

I'd like to remind you that Martin even did significant 
changes to version 1.0 only a few days before the final 
release of Python2.6. 

I know (and regret) that I submitted these changes rather late, 
but it was four days ago that I asked Martin and also Raymond for
advice on how to proceed with the submission but regrettably with 
no response. Unfortunately I'm a full time teacher and have to
do a lot of final exams these days. So I have only limited 
resources to work on turtle development. Nevertheless 
I'm anxious to only deliver valuable contributions.

I hope there is a way to accept these for now.
Regards
Gregor
msg87185 - (view) Author: Gregor Lingl (gregorlingl) Date: 2009-05-04 22:14
Here the patch to comment out the print(_ver) statement
msg87186 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2009-05-04 22:15
Gregor, I'll have a more thorough look and commit the patch before
3.1b1, if you promise to submit a patch to the documentation later --
that one can go in until a few days before final anyway.
msg87194 - (view) Author: Gregor Lingl (gregorlingl) Date: 2009-05-05 00:28
Here is a patch for the documentation. It may contain some typos and/or
inaccuracies. I promise to check it and submit a patch if necessary
before final.

It contains also the announcement of two new demo scripts, the one
beeing round_dance submitted already, the other one being a nim game.
I'll submit it subsequently

Regards,
Gregor
msg87195 - (view) Author: Gregor Lingl (gregorlingl) Date: 2009-05-05 00:30
The second demo script just announced
msg87201 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2009-05-05 02:15
Gregor, I applied my doctest fixups to turtle.rst in the py3k branch in
r72307.  I've attached an updated version of your docpatch that applies
against this new revision.
msg87221 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2009-05-05 08:15
OK, I committed turtle30_to_31.diff, and additionally commented the
print(_ver) out and updated the version in the comment at the file's
top, and committed issues5923.doc.patch in r72318.
History
Date User Action Args
2022-04-11 14:56:48adminsetgithub: 50173
2009-05-05 08:15:40georg.brandlsetstatus: open -> closed
resolution: accepted
messages: + msg87221
2009-05-05 02:15:39r.david.murraysetfiles: + issue5923.doc.patch
nosy: + r.david.murray
messages: + msg87201

2009-05-05 00:31:00gregorlinglsetfiles: + tdemo_nim.py

messages: + msg87195
2009-05-05 00:28:05gregorlinglsetfiles: + turtle31.rst.diff

messages: + msg87194
2009-05-04 22:15:21georg.brandlsetmessages: + msg87186
2009-05-04 22:14:22gregorlinglsetfiles: + print_ver_patch.diff

messages: + msg87185
2009-05-04 22:08:34gregorlinglsetfiles: + tdemo_round_dance.py

messages: + msg87184
2009-05-04 21:18:10georg.brandlsetnosy: + georg.brandl
messages: + msg87179
2009-05-04 20:26:48loewissetassignee: loewis ->
messages: + msg87166
2009-05-04 17:03:17georg.brandlsetassignee: loewis
2009-05-04 15:02:48gregorlinglsetfiles: + turtle30_to_31.diff
keywords: + patch
messages: + msg87133
2009-05-04 14:56:37gregorlinglcreate