<feed xmlns='http://www.w3.org/2005/Atom'>
<title>python.git/Modules/main.c, branch 2.2</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.</subtitle>
<id>http://dangofactory.net/cgit/cgit.cgi/Server/python.git/atom/Modules/main.c?h=2.2</id>
<link rel='self' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/atom/Modules/main.c?h=2.2'/>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/'/>
<updated>2003-03-30T17:00:58Z</updated>
<entry>
<title>Patch #695250: Suppress COPYRIGHT if site.py is not read. Fixes #672614.</title>
<updated>2003-03-30T17:00:58Z</updated>
<author>
<name>Martin v. Löwis</name>
<email>martin@v.loewis.de</email>
</author>
<published>2003-03-30T17:00:58Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=fa8b672c2a0a603b19c9f0b696186a67ef647e9a'/>
<id>urn:sha1:fa8b672c2a0a603b19c9f0b696186a67ef647e9a</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Backport a checkin of lemburg's:</title>
<updated>2002-03-17T19:42:18Z</updated>
<author>
<name>Michael W. Hudson</name>
<email>mwh@python.net</email>
</author>
<published>2002-03-17T19:42:18Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=9bf2889930340323f8ca730fcf287fec9061b413'/>
<id>urn:sha1:9bf2889930340323f8ca730fcf287fec9061b413</id>
<content type='text'>
Remove mentioning of -U option in "python -h" output.
</content>
</entry>
<entry>
<title>Include &lt;unistd.h&gt; in Python.h. Fixes #500924.</title>
<updated>2002-01-12T11:13:24Z</updated>
<author>
<name>Martin v. Löwis</name>
<email>martin@v.loewis.de</email>
</author>
<published>2002-01-12T11:13:24Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=0d21e644096c700d9cf87038e736dd5ae0f738af'/>
<id>urn:sha1:0d21e644096c700d9cf87038e736dd5ae0f738af</id>
<content type='text'>
</content>
</entry>
<entry>
<title>SF bug #488514: -Qnew needs work</title>
<updated>2001-12-06T06:23:26Z</updated>
<author>
<name>Tim Peters</name>
<email>tim.peters@gmail.com</email>
</author>
<published>2001-12-06T06:23:26Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=3caca2326e04ea3c0d1f8c6a588e646d8201af38'/>
<id>urn:sha1:3caca2326e04ea3c0d1f8c6a588e646d8201af38</id>
<content type='text'>
Big Hammer to implement -Qnew as PEP 238 says it should work (a global
option affecting all instances of "/").

pydebug.h, main.c, pythonrun.c:  define a private _Py_QnewFlag flag, true
iff -Qnew is passed on the command line.  This should go away (as the
comments say) when true division becomes The Rule.  This is
deliberately not exposed to runtime inspection or modification:  it's
a one-way one-shot switch to pretend you're using Python 3.

ceval.c:  when _Py_QnewFlag is set, treat BINARY_DIVIDE as
BINARY_TRUE_DIVIDE.

test_{descr, generators, zipfile}.py:  fiddle so these pass under
-Qnew too.  This was just a matter of s!/!//! in test_generators and
test_zipfile.  test_descr was trickier, as testbinop() is passed
assumptions that "/" is the same as calling a "__div__" method; put
a temporary hack there to call "__truediv__" instead when the method
name is "__div__" and 1/2 evaluates to 0.5.

Three standard tests still fail under -Qnew (on Windows; somebody
please try the Linux tests with -Qnew too!  Linux runs a whole bunch
of tests Windows doesn't):
    test_augassign
    test_class
    test_coercion
I can't stay awake longer to stare at this (be my guest).  Offhand
cures weren't obvious, nor was it even obvious that cures are possible
without major hackery.

Question:  when -Qnew is in effect, should calls to __div__ magically
change into calls to __truediv__?  See "major hackery" at tail end of
last paragraph &lt;wink&gt;.
</content>
</entry>
<entry>
<title>PEP 238 documented -Qwarn as warning only for classic int or long</title>
<updated>2001-09-04T03:51:09Z</updated>
<author>
<name>Guido van Rossum</name>
<email>guido@python.org</email>
</author>
<published>2001-09-04T03:51:09Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=1832de4bc07e7ffd5938b41e8d7d8fcf8b5e12e2'/>
<id>urn:sha1:1832de4bc07e7ffd5938b41e8d7d8fcf8b5e12e2</id>
<content type='text'>
division, and this makes sense.  Add -Qwarnall to warn for all
classic divisions, as required by the fixdiv.py tool.
</content>
</entry>
<entry>
<title>Rename the -D option to -Q, to avoid a Jython option name conflict.</title>
<updated>2001-09-04T03:26:15Z</updated>
<author>
<name>Guido van Rossum</name>
<email>guido@python.org</email>
</author>
<published>2001-09-04T03:26:15Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=61c345fa37573005b708d239c0911218ca22383c'/>
<id>urn:sha1:61c345fa37573005b708d239c0911218ca22383c</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Oops.  The -W option takes args, not -X.</title>
<updated>2001-08-31T18:17:13Z</updated>
<author>
<name>Guido van Rossum</name>
<email>guido@python.org</email>
</author>
<published>2001-08-31T18:17:13Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=97741a30414c41e314950844bebee3230e9d813d'/>
<id>urn:sha1:97741a30414c41e314950844bebee3230e9d813d</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Add warning mode for classic division, almost exactly as specified in</title>
<updated>2001-08-31T17:40:15Z</updated>
<author>
<name>Guido van Rossum</name>
<email>guido@python.org</email>
</author>
<published>2001-08-31T17:40:15Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=393661d15fa76ec46e9f7b71e97bf2ed38470620'/>
<id>urn:sha1:393661d15fa76ec46e9f7b71e97bf2ed38470620</id>
<content type='text'>
PEP 238.  Changes:

- add a new flag variable Py_DivisionWarningFlag, declared in
  pydebug.h, defined in object.c, set in main.c, and used in
  {int,long,float,complex}object.c.  When this flag is set, the
  classic division operator issues a DeprecationWarning message.

- add a new API PyRun_SimpleStringFlags() to match
  PyRun_SimpleString().  The main() function calls this so that
  commands run with -c can also benefit from -Dnew.

- While I was at it, I changed the usage message in main() somewhat:
  alphabetized the options, split it in *four* parts to fit in under
  512 bytes (not that I still believe this is necessary -- doc strings
  elsewhere are much longer), and perhaps most visibly, don't display
  the full list of options on each command line error.  Instead, the
  full list is only displayed when -h is used, and otherwise a brief
  reminder of -h is displayed.  When -h is used, write to stdout so
  that you can do `python -h | more'.

Notes:

- I don't want to use the -W option to control whether the classic
  division warning is issued or not, because the machinery to decide
  whether to display the warning or not is very expensive (it involves
  calling into the warnings.py module).  You can use -Werror to turn
  the warnings into exceptions though.

- The -Dnew option doesn't select future division for all of the
  program -- only for the __main__ module.  I don't know if I'll ever
  change this -- it would require changes to the .pyc file magic
  number to do it right, and a more global notion of compiler flags.

- You can usefully combine -Dwarn and -Dnew: this gives the __main__
  module new division, and warns about classic division everywhere
  else.
</content>
</entry>
<entry>
<title>Add -E command line switch (ignore environment variables like PYTHONHOME</title>
<updated>2001-07-23T16:30:27Z</updated>
<author>
<name>Neil Schemenauer</name>
<email>nascheme@enme.ucalgary.ca</email>
</author>
<published>2001-07-23T16:30:27Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=7d4bb9f179f1888a472fd5d5a30df4ec3c55fea5'/>
<id>urn:sha1:7d4bb9f179f1888a472fd5d5a30df4ec3c55fea5</id>
<content type='text'>
and PYTHONPATH).
</content>
</entry>
<entry>
<title>Add "help" to the things one is encouraged to type for more</title>
<updated>2001-07-18T16:59:46Z</updated>
<author>
<name>Guido van Rossum</name>
<email>guido@python.org</email>
</author>
<published>2001-07-18T16:59:46Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=36002d7af1a9971c62e982cbbb1d1ce34610129d'/>
<id>urn:sha1:36002d7af1a9971c62e982cbbb1d1ce34610129d</id>
<content type='text'>
information.  (I found this idea in the ActivePython 2.1 diffs.)
</content>
</entry>
</feed>
