<feed xmlns='http://www.w3.org/2005/Atom'>
<title>python.git/Python/pythonrun.c, branch v2.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/Python/pythonrun.c?h=v2.2</id>
<link rel='self' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/atom/Python/pythonrun.c?h=v2.2'/>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/'/>
<updated>2002-03-03T21:32:01Z</updated>
<entry>
<title>Patch #50002: Display line information for bad \x escapes:</title>
<updated>2002-03-03T21:32:01Z</updated>
<author>
<name>Martin v. Löwis</name>
<email>martin@v.loewis.de</email>
</author>
<published>2002-03-03T21:32:01Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=59509f511ed8eacbefecc4357c69036fc036effe'/>
<id>urn:sha1:59509f511ed8eacbefecc4357c69036fc036effe</id>
<content type='text'>
- recognize "SyntaxError"s by the print_file_and_line attribute.
- add the syntaxerror attributes to all exceptions in compile.c.
Fixes #221791
</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>Missing DECREFs when exception is raised in sys.excepthook.</title>
<updated>2001-12-07T15:35:35Z</updated>
<author>
<name>Jeremy Hylton</name>
<email>jeremy@alum.mit.edu</email>
</author>
<published>2001-12-07T15:35:35Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=0702858d733e1ab37e3e7bb6258557fd7aca3d10'/>
<id>urn:sha1:0702858d733e1ab37e3e7bb6258557fd7aca3d10</id>
<content type='text'>
Bug fix candidate for 2.1 branch.

(I imagine the other recent leak patches are bug fix candidates, too,
but I forgot to mark mine as such.)
</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>Use PyOS_snprintf instead of sprintf.</title>
<updated>2001-11-28T20:42:20Z</updated>
<author>
<name>Jeremy Hylton</name>
<email>jeremy@alum.mit.edu</email>
</author>
<published>2001-11-28T20:42:20Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=518ab1c02a01a1a502fedeccb62ea73f2a952ba7'/>
<id>urn:sha1:518ab1c02a01a1a502fedeccb62ea73f2a952ba7</id>
<content type='text'>
</content>
</entry>
<entry>
<title>PyOS_getsig(), PyOS_setsig(): The minimal amount of work to avoid the</title>
<updated>2001-11-13T23:08:26Z</updated>
<author>
<name>Barry Warsaw</name>
<email>barry@python.org</email>
</author>
<published>2001-11-13T23:08:26Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=afeb2a4d8914848d8761472c93b3e9cbff57b275'/>
<id>urn:sha1:afeb2a4d8914848d8761472c93b3e9cbff57b275</id>
<content type='text'>
uninitialized memory reads reported in bug #478001.

Note that this doesn't address the following larger issues:

- Error conditions are not documented for PyOS_*sig() in the C API.

- Nothing that actually calls PyOS_*sig() in the core interpreter and
  extension modules actually /checks/ the return value of the call.

Fixing those is left as an exercise for a later day.
</content>
</entry>
<entry>
<title>SF patch #467455 : Enhanced environment variables, by Toby Dickenson.</title>
<updated>2001-10-12T22:17:56Z</updated>
<author>
<name>Guido van Rossum</name>
<email>guido@python.org</email>
</author>
<published>2001-10-12T22:17:56Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=9abaf4d3b78d756e4c0e30b7accb70e531dd9085'/>
<id>urn:sha1:9abaf4d3b78d756e4c0e30b7accb70e531dd9085</id>
<content type='text'>
   This patch changes to logic to:

   if env.var. set and non-empty:
       if env.var. is an integer:
           set flag to that integer
   if flag is zero: # [actually, &lt;= 0 --GvR]
       set flag to 1

   Under this patch, anyone currently using
   PYTHONVERBOSE=yes will get the same output as before.

   PYTHONVERBNOSE=2 will generate more verbosity than
   before.

   The only unusual case that the following three are
   still all equivalent:
   PYTHONVERBOSE=yespleas
   PYTHONVERBOSE=1
   PYTHONVERBOSE=0
</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>Patch #445762: Support --disable-unicode</title>
<updated>2001-08-17T18:39:25Z</updated>
<author>
<name>Martin v. Löwis</name>
<email>martin@v.loewis.de</email>
</author>
<published>2001-08-17T18:39:25Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=339d0f720e86dc34837547c90d3003a4a68d7d46'/>
<id>urn:sha1:339d0f720e86dc34837547c90d3003a4a68d7d46</id>
<content type='text'>
- Do not compile unicodeobject, unicodectype, and unicodedata if Unicode is disabled
- check for Py_USING_UNICODE in all places that use Unicode functions
- disables unicode literals, and the builtin functions
- add the types.StringTypes list
- remove Unicode literals from most tests.
</content>
</entry>
<entry>
<title>Oops.  Two fixes for SF bug #422004 are not needed. :-)</title>
<updated>2001-08-16T08:24:00Z</updated>
<author>
<name>Guido van Rossum</name>
<email>guido@python.org</email>
</author>
<published>2001-08-16T08:24:00Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=f6309e8ecf293f5dbab031b1b8068771d5ac9a8f'/>
<id>urn:sha1:f6309e8ecf293f5dbab031b1b8068771d5ac9a8f</id>
<content type='text'>
</content>
</entry>
</feed>
