<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/cpython-git.git/Lib/turtledemo, branch refactor-lambda-parameters</title>
<subtitle>github.com: python/cpython.git
</subtitle>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/'/>
<entry>
<title>bpo-40431: Fix syntax typo in turtledemo (GH-19777)</title>
<updated>2020-04-29T00:00:07+00:00</updated>
<author>
<name>Miro Hrončok</name>
<email>miro@hroncok.cz</email>
</author>
<published>2020-04-29T00:00:07+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=49f70db83e2c62ad06805927f53f6c3e8f4b798e'/>
<id>49f70db83e2c62ad06805927f53f6c3e8f4b798e</id>
<content type='text'>
***   File "/usr/lib64/python3.9/turtledemo/__main__.py", line 275
        bg="#d00" if clear == NORMAL else"#fca")
                                        ^
    SyntaxError: invalid string prefix</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
***   File "/usr/lib64/python3.9/turtledemo/__main__.py", line 275
        bg="#d00" if clear == NORMAL else"#fca")
                                        ^
    SyntaxError: invalid string prefix</pre>
</div>
</content>
</entry>
<entry>
<title>Mark files as executable that are meant as scripts. (GH-15354)</title>
<updated>2019-09-09T14:16:33+00:00</updated>
<author>
<name>Greg Price</name>
<email>gnprice@gmail.com</email>
</author>
<published>2019-09-09T14:16:33+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=fa3a38d81faaf96d17b5a7f0248b9923e3a648cc'/>
<id>fa3a38d81faaf96d17b5a7f0248b9923e3a648cc</id>
<content type='text'>
This is the converse of GH-15353 -- in addition to plenty of
scripts in the tree that are marked with the executable bit
(and so can be directly executed), there are a few that have
a leading `#!` which could let them be executed, but it doesn't
do anything because they don't have the executable bit set.

Here's a command which finds such files and marks them.  The
first line finds files in the tree with a `#!` line *anywhere*;
the next-to-last step checks that the *first* line is actually of
that form.  In between we filter out files that already have the
bit set, and some files that are meant as fragments to be
consumed by one or another kind of preprocessor.

    $ git grep -l '^#!' \
      | grep -vxFf &lt;( \
          git ls-files --stage \
          | perl -lane 'print $F[3] if (!/^100644/)' \
        ) \
      | grep -ve '\.in$' -e '^Doc/includes/' \
      | while read f; do
          head -c2 "$f" | grep -qxF '#!' \
          &amp;&amp; chmod a+x "$f"; \
        done</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is the converse of GH-15353 -- in addition to plenty of
scripts in the tree that are marked with the executable bit
(and so can be directly executed), there are a few that have
a leading `#!` which could let them be executed, but it doesn't
do anything because they don't have the executable bit set.

Here's a command which finds such files and marks them.  The
first line finds files in the tree with a `#!` line *anywhere*;
the next-to-last step checks that the *first* line is actually of
that form.  In between we filter out files that already have the
bit set, and some files that are meant as fragments to be
consumed by one or another kind of preprocessor.

    $ git grep -l '^#!' \
      | grep -vxFf &lt;( \
          git ls-files --stage \
          | perl -lane 'print $F[3] if (!/^100644/)' \
        ) \
      | grep -ve '\.in$' -e '^Doc/includes/' \
      | while read f; do
          head -c2 "$f" | grep -qxF '#!' \
          &amp;&amp; chmod a+x "$f"; \
        done</pre>
</div>
</content>
</entry>
<entry>
<title>Unmark files as executable that can't actually be executed. (GH-15353)</title>
<updated>2019-08-21T04:53:59+00:00</updated>
<author>
<name>Greg Price</name>
<email>gnprice@gmail.com</email>
</author>
<published>2019-08-21T04:53:59+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=9ece4a5057d52c42a8a064a6c0c7f923267fb3db'/>
<id>9ece4a5057d52c42a8a064a6c0c7f923267fb3db</id>
<content type='text'>
There are plenty of legitimate scripts in the tree that begin with a
`#!`, but also a few that seem to be marked executable by mistake.

Found them with this command -- it gets executable files known to Git,
filters to the ones that don't start with a `#!`, and then unmarks
them as executable:

    $ git ls-files --stage \
      | perl -lane 'print $F[3] if (!/^100644/)' \
      | while read f; do
          head -c2 "$f" | grep -qxF '#!' \
          || chmod a-x "$f"; \
        done

Looking at the list by hand confirms that we didn't sweep up any
files that should have the executable bit after all.  In particular

 * The `.psd` files are images from Photoshop.

 * The `.bat` files sure look like things that can be run.
   But we have lots of other `.bat` files, and they don't have
   this bit set, so it must not be needed for them.



Automerge-Triggered-By: @benjaminp</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
There are plenty of legitimate scripts in the tree that begin with a
`#!`, but also a few that seem to be marked executable by mistake.

Found them with this command -- it gets executable files known to Git,
filters to the ones that don't start with a `#!`, and then unmarks
them as executable:

    $ git ls-files --stage \
      | perl -lane 'print $F[3] if (!/^100644/)' \
      | while read f; do
          head -c2 "$f" | grep -qxF '#!' \
          || chmod a-x "$f"; \
        done

Looking at the list by hand confirms that we didn't sweep up any
files that should have the executable bit after all.  In particular

 * The `.psd` files are images from Photoshop.

 * The `.bat` files sure look like things that can be run.
   But we have lots of other `.bat` files, and they don't have
   this bit set, so it must not be needed for them.



Automerge-Triggered-By: @benjaminp</pre>
</div>
</content>
</entry>
<entry>
<title>Fix typos in docs and docstrings (GH-13745)</title>
<updated>2019-06-02T23:12:33+00:00</updated>
<author>
<name>Xtreak</name>
<email>tir.karthi@gmail.com</email>
</author>
<published>2019-06-02T23:12:33+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=0d70227e419ab78c44d81b4ea6ae8aaf769470e6'/>
<id>0d70227e419ab78c44d81b4ea6ae8aaf769470e6</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>turtledemo/penrose.py: remove unused clock() calls (GH-10033)</title>
<updated>2018-10-24T22:43:39+00:00</updated>
<author>
<name>Srinivas  Thatiparthy (శ్రీనివాస్  తాటిపర్తి)</name>
<email>thatiparthysreenivas@gmail.com</email>
</author>
<published>2018-10-24T22:43:39+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=9f270a24237ce562c327af5d187fad72b735e9d2'/>
<id>9f270a24237ce562c327af5d187fad72b735e9d2</id>
<content type='text'>
Actually time calculations were remove in commit 891a1f8.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Actually time calculations were remove in commit 891a1f8.</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-14117: Make minor tweaks to turtledemo (GH-8002)</title>
<updated>2018-06-29T05:10:05+00:00</updated>
<author>
<name>Terry Jan Reedy</name>
<email>tjreedy@udel.edu</email>
</author>
<published>2018-06-29T05:10:05+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=891a1f86d415779cf67ca23e626a868e586feb05'/>
<id>891a1f86d415779cf67ca23e626a868e586feb05</id>
<content type='text'>
The 'wikipedia' example is now 'rosette', describing what it draws.
The 'penrose' print output is reduced.  The 'tree' '1024'
output is eliminated.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The 'wikipedia' example is now 'rosette', describing what it draws.
The 'penrose' print output is reduced.  The 'tree' '1024'
output is eliminated.
</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-32297: Few misspellings found in Python source code comments. (#4803)</title>
<updated>2017-12-14T11:04:53+00:00</updated>
<author>
<name>Mike</name>
<email>mehanig@gmail.com</email>
</author>
<published>2017-12-14T11:04:53+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=53f7a7c2814fbfd8a29200926601a32fa48bacb3'/>
<id>53f7a7c2814fbfd8a29200926601a32fa48bacb3</id>
<content type='text'>
* Fix multiple typos in code comments

* Add spacing in comments (test_logging.py, test_math.py)

* Fix spaces at the beginning of comments in test_logging.py
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Fix multiple typos in code comments

* Add spacing in comments (test_logging.py, test_math.py)

* Fix spaces at the beginning of comments in test_logging.py
</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-32155: Bugfixes found by flake8 F841 warnings (#4608)</title>
<updated>2017-11-28T14:30:32+00:00</updated>
<author>
<name>Victor Stinner</name>
<email>victor.stinner@gmail.com</email>
</author>
<published>2017-11-28T14:30:32+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=696b501cd11dc429a0f661adeb598bfaf89e4112'/>
<id>696b501cd11dc429a0f661adeb598bfaf89e4112</id>
<content type='text'>
* distutils.config: Use the PyPIRCCommand.realm attribute if set
* turtledemo: wait until macOS osascript command completes to not
  create a zombie process
* Tools/scripts/treesync.py: declare 'default_answer' and
  'create_files' as globals to modify them with the command line
  arguments. Previously, -y, -n, -f and -a options had no effect.

flake8 warning: "F841 local variable 'p' is assigned to but never
used".</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* distutils.config: Use the PyPIRCCommand.realm attribute if set
* turtledemo: wait until macOS osascript command completes to not
  create a zombie process
* Tools/scripts/treesync.py: declare 'default_answer' and
  'create_files' as globals to modify them with the command line
  arguments. Previously, -y, -n, -f and -a options had no effect.

flake8 warning: "F841 local variable 'p' is assigned to but never
used".</pre>
</div>
</content>
</entry>
<entry>
<title>time.clock() now emits a DeprecationWarning (GH-4020)</title>
<updated>2017-10-17T21:46:45+00:00</updated>
<author>
<name>Victor Stinner</name>
<email>victor.stinner@gmail.com</email>
</author>
<published>2017-10-17T21:46:45+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=884d13a55fc328e2e1e3948a82b361b30804b818'/>
<id>884d13a55fc328e2e1e3948a82b361b30804b818</id>
<content type='text'>
bpo-31803: time.clock() and time.get_clock_info('clock') now emit a
DeprecationWarning warning.

Replace time.clock() with time.perf_counter() in tests and demos.

Remove also hasattr(time, 'monotonic') in test_time since time.monotonic()
is now always available since Python 3.5.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
bpo-31803: time.clock() and time.get_clock_info('clock') now emit a
DeprecationWarning warning.

Replace time.clock() with time.perf_counter() in tests and demos.

Remove also hasattr(time, 'monotonic') in test_time since time.monotonic()
is now always available since Python 3.5.
</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-30296 Remove unnecessary tuples, lists, sets, and dicts (#1489)</title>
<updated>2017-05-18T14:35:54+00:00</updated>
<author>
<name>Jon Dufresne</name>
<email>jon.dufresne@gmail.com</email>
</author>
<published>2017-05-18T14:35:54+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=3972628de3d569c88451a2a176a1c94d8822b8a6'/>
<id>3972628de3d569c88451a2a176a1c94d8822b8a6</id>
<content type='text'>
* Replaced list(&lt;generator expression&gt;) with list comprehension
* Replaced dict(&lt;generator expression&gt;) with dict comprehension
* Replaced set(&lt;list literal&gt;) with set literal
* Replaced builtin func(&lt;list comprehension&gt;) with func(&lt;generator
  expression&gt;) when supported (e.g. any(), all(), tuple(), min(), &amp;
  max())</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Replaced list(&lt;generator expression&gt;) with list comprehension
* Replaced dict(&lt;generator expression&gt;) with dict comprehension
* Replaced set(&lt;list literal&gt;) with set literal
* Replaced builtin func(&lt;list comprehension&gt;) with func(&lt;generator
  expression&gt;) when supported (e.g. any(), all(), tuple(), min(), &amp;
  max())</pre>
</div>
</content>
</entry>
</feed>
