1. 06 Mar, 2001 1 kayıt (commit)
  2. 02 Mar, 2001 2 kayıt (commit)
  3. 01 Mar, 2001 5 kayıt (commit)
  4. 28 Şub, 2001 3 kayıt (commit)
    • Tim Peters's avatar
    • Tim Peters's avatar
      Comment typos. · f91ed2dd
      Tim Peters yazdı
      f91ed2dd
    • Tim Peters's avatar
      Implement PEP 235: Import on Case-Insensitive Platforms. · 50d8d37b
      Tim Peters yazdı
          http://python.sourceforge.net/peps/pep-0235.html
      
      Renamed check_case to case_ok.  Substantial code rearrangement to get
      this stuff in one place in the file.  Innermost loop of find_module()
      now much simpler and #ifdef-free, and I want to keep it that way (it's
      bad enough that the innermost loop is itself still in an #ifdef!).
      
      Windows semantics tested and are fine.
      
      Jason, Cygwin *should* be fine if and only if what you did before "worked"
      for case_ok.
      
      Jack, the semantics on your flavor of Mac have definitely changed (see
      the PEP), and need to be tested.  The intent is that your flavor of Mac
      now work the same as everything else in the "lower left" box, including
      respecting PYTHONCASEOK.
      
      Steven, sorry, you did the most work here so far but you got screwed the
      worst.  Happy to work with you on repairing it, but I don't understand
      anything about all your Mac variants.  We need to add another branch (or
      two, three, ...?) inside case_ok.  But we should not need to change
      anything else.
      50d8d37b
  5. 20 Şub, 2001 1 kayıt (commit)
    • Guido van Rossum's avatar
      The code in PyImport_Import() tried to save itself a bit of work and · 85cd1d69
      Guido van Rossum yazdı
      save the __builtin__ module in a static variable.  But this doesn't
      work across Py_Finalise()/Py_Initialize()!  It also doesn't work when
      using multiple interpreter states created with PyInterpreterState_New().
      
      So I'm ripping out this small optimization.
      
      This was probably broken since PyImport_Import() was introduced in
      1997!  We really need a better test suite for multiple interpreter
      states and repeatedly initializing.
      
      This fixes the problems Barry reported in Demo/embed/loop.c.
      85cd1d69
  6. 09 Şub, 2001 1 kayıt (commit)
    • Marc-André Lemburg's avatar
      This modified version of a patch by Thomas Heller allows __import__ · 3c61c352
      Marc-André Lemburg yazdı
      hooks to take over the Python import machinery at a very early stage
      in the Python startup phase.
      
      If there are still places in the Python interpreter which need to
      bypass the __import__ hook, these places must now use
      PyImport_ImportModuleEx() instead. So far no other places than in
      the import mechanism itself have been identified.
      3c61c352
  7. 02 Şub, 2001 2 kayıt (commit)
  8. 28 Ock, 2001 1 kayıt (commit)
    • Tim Peters's avatar
      It's unclear whether PyMarshal_XXX() are part of the public or private API. · d9b9ac85
      Tim Peters yazdı
      They're named as if public, so I did a Bad Thing by changing
      PyMarshal_ReadObjectFromFile() to suck up the remainder of the file in one
      gulp:  anyone who counted on that leaving the file pointer merely at the
      end of the next object would be screwed.  So restored
      PyMarshal_ReadObjectFromFile() to its earlier state, renamed the new greedy
      code to PyMarshal_ReadLastObjectFromFile(), and changed Python internals to
      call the latter instead.
      d9b9ac85
  9. 25 Ock, 2001 1 kayıt (commit)
    • Jeremy Hylton's avatar
      PEP 227 implementation · 64949cb7
      Jeremy Hylton yazdı
      The majority of the changes are in the compiler.  The mainloop changes
      primarily to implement the new opcodes and to pass a function's
      closure to eval_code2().  Frames and functions got new slots to hold
      the closure.
      
      Include/compile.h
          Add co_freevars and co_cellvars slots to code objects.
          Update PyCode_New() to take freevars and cellvars as arguments
      Include/funcobject.h
          Add func_closure slot to function objects.
          Add GetClosure()/SetClosure() functions (and corresponding
          macros) for getting at the closure.
      Include/frameobject.h
          PyFrame_New() now takes a closure.
      Include/opcode.h
          Add four new opcodes: MAKE_CLOSURE, LOAD_CLOSURE, LOAD_DEREF,
          STORE_DEREF.
          Remove comment about old requirement for opcodes to fit in 7
          bits.
      compile.c
          Implement changes to code objects for co_freevars and co_cellvars.
      
          Modify symbol table to use st_cur_name (string object for the name
          of the current scope) and st_cur_children (list of nested blocks).
          Also define st_nested, which might more properly be called
          st_cur_nested.  Add several DEF_XXX flags to track def-use
          information for free variables.
      
          New or modified functions of note:
          com_make_closure(struct compiling *, PyCodeObject *)
              Emit LOAD_CLOSURE opcodes as needed to pass cells for free
              variables into nested scope.
          com_addop_varname(struct compiling *, int, char *)
              Emits opcodes for LOAD_DEREF and STORE_DEREF.
          get_ref_type(struct compiling *, char *name)
              Return NAME_CLOSURE if ref type is FREE or CELL
          symtable_load_symbols(struct compiling *)
              Decides what variables are cell or free based on def-use info.
              Can now raise SyntaxError if nested scopes are mixed with
              exec or from blah import *.
          make_scope_info(PyObject *, PyObject *, int, int)
              Helper functions for symtable scope stack.
          symtable_update_free_vars(struct symtable *)
              After a code block has been analyzed, it must check each of
              its children for free variables that are not defined in the
              block.  If a variable is free in a child and not defined in
              the parent, then it is defined by block the enclosing the
              current one or it is a global.  This does the right logic.
          symtable_add_use() is now a macro for symtable_add_def()
          symtable_assign(struct symtable *, node *)
              Use goto instead of for (;;)
      
          Fixed bug in symtable where name of keyword argument in function
          call was treated as assignment in the scope of the call site. Ex:
              def f():
                  g(a=2) # a was considered a local of f
      
      ceval.c
          eval_code2() now take one more argument, a closure.
          Implement LOAD_CLOSURE, LOAD_DEREF, STORE_DEREF, MAKE_CLOSURE>
      
          Also: When name error occurs for global variable, report that the
          name was global in the error mesage.
      
      Objects/frameobject.c
          Initialize f_closure to be a tuple containing space for cellvars
          and freevars.  f_closure is NULL if neither are present.
      Objects/funcobject.c
          Add support for func_closure.
      Python/import.c
          Change the magic number.
      Python/marshal.c
          Track changes to code objects.
      64949cb7
  10. 18 Ock, 2001 1 kayıt (commit)
  11. 10 Ock, 2001 1 kayıt (commit)
  12. 13 Kas, 2000 1 kayıt (commit)
  13. 03 Eki, 2000 1 kayıt (commit)
  14. 29 Eyl, 2000 1 kayıt (commit)
    • Tim Peters's avatar
      The 2.0b2 change to write .pyc files in exclusive mode (if possible) · 42c83afd
      Tim Peters yazdı
      unintentionally caused them to get written in text mode under Windows.
      As a result, when .pyc files were later read-- in binary mode --the
      magic number was always wrong (note that .pyc magic numbers deliberately
      include \r and \n characters, so this was "good" breakage, 100% across
      all .pyc files, not random corruption in a subset).  Fixed that.
      42c83afd
  15. 20 Eyl, 2000 1 kayıt (commit)
  16. 01 Eyl, 2000 1 kayıt (commit)
  17. 27 Agu, 2000 1 kayıt (commit)
  18. 24 Agu, 2000 1 kayıt (commit)
  19. 21 Agu, 2000 1 kayıt (commit)
  20. 17 Agu, 2000 1 kayıt (commit)
  21. 11 Agu, 2000 1 kayıt (commit)
  22. 23 Tem, 2000 1 kayıt (commit)
  23. 22 Tem, 2000 2 kayıt (commit)
  24. 11 Tem, 2000 1 kayıt (commit)
  25. 09 Tem, 2000 1 kayıt (commit)
  26. 01 Tem, 2000 1 kayıt (commit)
  27. 30 Haz, 2000 4 kayıt (commit)
    • Guido van Rossum's avatar
      Change copyright notice - 2nd try. · ffcc3813
      Guido van Rossum yazdı
      ffcc3813
    • Guido van Rossum's avatar
      Change copyright notice. · fd71b9e9
      Guido van Rossum yazdı
      fd71b9e9
    • Fred Drake's avatar
      Trent Mick <trentm@activestate.com>: · 4c82b236
      Fred Drake yazdı
      This patch fixes possible overflow in the use of
      PyOS_GetLastModificationTime in getmtime.c and Python/import.c.
      
      Currently PyOS_GetLastModificationTime returns a C long. This can
      overflow on Win64 where sizeof(time_t) > sizeof(long). Besides it
      should logically return a time_t anyway (this patch changes this).
      
      As well, import.c uses PyOS_GetLastModificationTime for .pyc
      timestamping.  There has been recent discussion about the .pyc header
      format on python-dev.  This patch adds oveflow checking to import.c so
      that an exception will be raised if the modification time
      overflows. There are a few other minor 64-bit readiness changes made
      to the module as well:
      
      - size_t instead of int or long for function-local buffer and string
      length variables
      
      - one buffer overflow check was added (raises an exception on possible
      overflow, this overflow chance exists on 32-bit platforms as well), no
      other possible buffer overflows existed (from my analysis anyway)
      
      Closes SourceForge patch #100509.
      4c82b236
    • Jeremy Hylton's avatar
      another typo caught by Rob Hooft · 9262b8ab
      Jeremy Hylton yazdı
      9262b8ab
  28. 03 May, 2000 1 kayıt (commit)
    • Guido van Rossum's avatar
      Vladimir Marangozov's long-awaited malloc restructuring. · b18618da
      Guido van Rossum yazdı
      For more comments, read the patches@python.org archives.
      For documentation read the comments in mymalloc.h and objimpl.h.
      
      (This is not exactly what Vladimir posted to the patches list; I've
      made a few changes, and Vladimir sent me a fix in private email for a
      problem that only occurs in debug mode.  I'm also holding back on his
      change to main.c, which seems unnecessary to me.)
      b18618da