1. 22 Şub, 2018 1 kayıt (commit)
  2. 25 Ock, 2018 1 kayıt (commit)
  3. 24 Ock, 2018 1 kayıt (commit)
    • Paul Ganssle's avatar
      bpo-10381: Add timezone to datetime C API (#5032) · 04af5b1b
      Paul Ganssle yazdı
      * Add timezone to datetime C API
      
      * Add documentation for timezone C API macros
      
      * Add dedicated tests for datetime type check macros
      
      * Remove superfluous C API test
      
      * Drop support for TimeZoneType in datetime C API
      
      * Expose UTC singleton to the datetime C API
      
      * Update datetime C-API documentation to include links
      
      * Add reference count information for timezone constructors
      04af5b1b
  4. 23 Ock, 2018 1 kayıt (commit)
  5. 17 Ock, 2018 1 kayıt (commit)
  6. 04 Ock, 2018 1 kayıt (commit)
  7. 16 Ara, 2017 1 kayıt (commit)
  8. 29 Kas, 2017 1 kayıt (commit)
    • Victor Stinner's avatar
      bpo-32030: Rework memory allocators (#4625) · 5d39e042
      Victor Stinner yazdı
      * Fix _PyMem_SetupAllocators("debug"): always restore allocators to
        the defaults, rather than only caling _PyMem_SetupDebugHooks().
      * Add _PyMem_SetDefaultAllocator() helper to set the "default"
        allocator.
      * Add _PyMem_GetAllocatorsName(): get the name of the allocators
      * main() now uses debug hooks on memory allocators if Py_DEBUG is
        defined, rather than calling directly malloc()
      * Document default memory allocators in C API documentation
      * _Py_InitializeCore() now fails with a fatal user error if
        PYTHONMALLOC value is an unknown memory allocator, instead of
        failing with a fatal internal error.
      * Add new tests on the PYTHONMALLOC environment variable
      * Add support.with_pymalloc()
      * Add the _testcapi.WITH_PYMALLOC constant and expose it as
         support.with_pymalloc().
      * sysconfig.get_config_var('WITH_PYMALLOC') doesn't work on Windows, so
         replace it with support.with_pymalloc().
      * pythoninfo: add _testcapi collector for pymem
      5d39e042
  9. 11 Kas, 2017 1 kayıt (commit)
  10. 02 Kas, 2017 1 kayıt (commit)
    • Victor Stinner's avatar
      bpo-31784: Implement PEP 564: add time.time_ns() (#3989) · c29b585f
      Victor Stinner yazdı
      Add new time functions:
      
      * time.clock_gettime_ns()
      * time.clock_settime_ns()
      * time.monotonic_ns()
      * time.perf_counter_ns()
      * time.process_time_ns()
      * time.time_ns()
      
      Add new _PyTime functions:
      
      * _PyTime_FromTimespec()
      * _PyTime_FromNanosecondsObject()
      * _PyTime_FromTimeval()
      
      Other changes:
      
      * Add also os.times() tests to test_os.
      * pytime_fromtimeval() and pytime_fromtimeval() now return
        _PyTime_MAX or _PyTime_MIN on overflow, rather than undefined
        behaviour
      * _PyTime_FromNanoseconds() parameter type changes from long long to
        _PyTime_t
      c29b585f
  11. 31 Eki, 2017 1 kayıt (commit)
    • Victor Stinner's avatar
      bpo-18835: Cleanup pymalloc (#4200) · 9ed83c40
      Victor Stinner yazdı
      Cleanup pymalloc:
      
      * Rename _PyObject_Alloc() to pymalloc_alloc()
      * Rename _PyObject_FreeImpl() to pymalloc_free()
      * Rename _PyObject_Realloc() to pymalloc_realloc()
      * pymalloc_alloc() and pymalloc_realloc() don't fallback on the raw
        allocator anymore, it now must be done by the caller
      * Add "success" and "failed" labels to pymalloc_alloc() and
        pymalloc_free()
      * pymalloc_alloc() and pymalloc_free() don't update
        num_allocated_blocks anymore: it should be done in the caller
      * _PyObject_Calloc() is now responsible to fill the memory block
        allocated by pymalloc with zeros
      * Simplify pymalloc_alloc() prototype
      * _PyObject_Realloc() now calls _PyObject_Malloc() rather than
        calling directly pymalloc_alloc()
      
      _PyMem_DebugRawAlloc() and _PyMem_DebugRawRealloc():
      
      * document the layout of a memory block
      * don't increase the serial number if the allocation failed
      * check for integer overflow before computing the total size
      * add a 'data' variable to make the code easiler to follow
      
      test_setallocators() of _testcapimodule.c now test also the context.
      9ed83c40
  12. 26 Eki, 2017 1 kayıt (commit)
  13. 17 Eki, 2017 1 kayıt (commit)
  14. 08 Eki, 2017 1 kayıt (commit)
  15. 06 Eki, 2017 1 kayıt (commit)
  16. 07 Eyl, 2017 1 kayıt (commit)
  17. 29 Agu, 2017 1 kayıt (commit)
  18. 10 Agu, 2017 1 kayıt (commit)
    • Victor Stinner's avatar
      bpo-31173: Rewrite WSTOPSIG test of test_subprocess (#3055) · 7b7c6dcf
      Victor Stinner yazdı
      The current test_child_terminated_in_stopped_state() function test
      creates a child process which calls ptrace(PTRACE_TRACEME, 0, 0) and
      then crash (SIGSEGV). The problem is that calling os.waitpid() in the
      parent process is not enough to close the process: the child process
      remains alive and so the unit test leaks a child process in a
      strange state. Closing the child process requires non-trivial code,
      maybe platform specific.
      
      Remove the functional test and replaces it with an unit test which
      mocks os.waitpid() using a new _testcapi.W_STOPCODE() function to
      test the WIFSTOPPED() path.
      7b7c6dcf
  19. 10 Tem, 2017 1 kayıt (commit)
  20. 01 Tem, 2017 1 kayıt (commit)
  21. 20 Haz, 2017 1 kayıt (commit)
    • Victor Stinner's avatar
      bpo-30054: Expose tracemalloc C API (#1236) · 5ea4c067
      Victor Stinner yazdı
      * Make PyTraceMalloc_Track() and PyTraceMalloc_Untrack() functions
        public (remove the "_" prefix)
      * Remove the _PyTraceMalloc_domain_t type: use directly unsigned
        int.
      * Document methods
      
      Note: methods are already tested in test_tracemalloc.
      5ea4c067
  22. 09 Haz, 2017 1 kayıt (commit)
  23. 17 May, 2017 1 kayıt (commit)
    • Nathaniel J. Smith's avatar
      bpo-30039: Don't run signal handlers while resuming a yield from stack (#1081) · ab4413a7
      Nathaniel J. Smith yazdı
      If we have a chain of generators/coroutines that are 'yield from'ing
      each other, then resuming the stack works like:
      
      - call send() on the outermost generator
      - this enters _PyEval_EvalFrameDefault, which re-executes the
        YIELD_FROM opcode
      - which calls send() on the next generator
      - which enters _PyEval_EvalFrameDefault, which re-executes the
        YIELD_FROM opcode
      - ...etc.
      
      However, every time we enter _PyEval_EvalFrameDefault, the first thing
      we do is to check for pending signals, and if there are any then we
      run the signal handler. And if it raises an exception, then we
      immediately propagate that exception *instead* of starting to execute
      bytecode. This means that e.g. a SIGINT at the wrong moment can "break
      the chain" – it can be raised in the middle of our yield from chain,
      with the bottom part of the stack abandoned for the garbage collector.
      
      The fix is pretty simple: there's already a special case in
      _PyEval_EvalFrameEx where it skips running signal handlers if the next
      opcode is SETUP_FINALLY. (I don't see how this accomplishes anything
      useful, but that's another story.) If we extend this check to also
      skip running signal handlers when the next opcode is YIELD_FROM, then
      that closes the hole – now the exception can only be raised at the
      innermost stack frame.
      
      This shouldn't have any performance implications, because the opcode
      check happens inside the "slow path" after we've already determined
      that there's a pending signal or something similar for us to process;
      the vast majority of the time this isn't true and the new check
      doesn't run at all.
      ab4413a7
  24. 03 May, 2017 1 kayıt (commit)
  25. 13 Nis, 2017 1 kayıt (commit)
  26. 02 Mar, 2017 1 kayıt (commit)
  27. 16 Şub, 2017 1 kayıt (commit)
  28. 23 Ock, 2017 2 kayıt (commit)
  29. 20 Ara, 2016 2 kayıt (commit)
  30. 15 Ara, 2016 2 kayıt (commit)
  31. 06 Ara, 2016 1 kayıt (commit)
  32. 20 Kas, 2016 1 kayıt (commit)
  33. 16 Kas, 2016 1 kayıt (commit)
  34. 06 Kas, 2016 1 kayıt (commit)
  35. 09 Eki, 2016 1 kayıt (commit)
  36. 08 Eki, 2016 1 kayıt (commit)
  37. 02 Eki, 2016 1 kayıt (commit)