1. 24 Jun, 2019 6 commits
    • Steve Dower's avatar
    • Victor Stinner's avatar
      9bbf4d70
    • Jeroen Demeyer's avatar
    • Victor Stinner's avatar
      bpo-37359: Add --cleanup option to python3 -m test (GH-14332) · 47fbc4e4
      Victor Stinner authored
      * regrtest: Add --cleanup option to remove "test_python_*" directories
        of previous failed test jobs.
      * Add "make cleantest" to run "python3 -m test --cleanup".
      47fbc4e4
    • Gabe Appleton's avatar
      bpo-37345: Add formal UDPLITE support (GH-14258) · 2ac3bab2
      Gabe Appleton authored
      
      
      At the moment you can definitely use UDPLITE sockets on Linux systems, but it would be good if this support were formalized such that you can detect support at runtime easily.
      
      At the moment, to make and use a UDPLITE socket requires something like the following code:
      
      ```
      >>> import socket
      >>> a = socket.socket(socket.AF_INET, socket.SOCK_DGRAM, 136)
      >>> b = socket.socket(socket.AF_INET, socket.SOCK_DGRAM, 136)
      >>> a.bind(('localhost', 44444))
      >>> b.sendto(b'test'*256, ('localhost', 44444))
      >>> b.setsockopt(136, 10, 16)
      >>> b.sendto(b'test'*256, ('localhost', 44444))
      >>> b.setsockopt(136, 10, 32)
      >>> b.sendto(b'test'*256, ('localhost', 44444))
      >>> b.setsockopt(136, 10, 64)
      >>> b.sendto(b'test'*256, ('localhost', 44444))
      ```
      
      If you look at this through Wireshark, you can see that the packets are different in that the checksums and checksum coverages change.
      
      With the pull request that I am submitting momentarily, you could do the following code instead:
      
      ```
      >>> import socket
      >>> a = socket.socket(socket.AF_INET, socket.SOCK_DGRAM, socket.IPPROTO_UDPLITE)
      >>> b = socket.socket(socket.AF_INET, socket.SOCK_DGRAM, socket.IPPROTO_UDPLITE)
      >>> a.bind(('localhost', 44444))
      >>> b.sendto(b'test'*256, ('localhost', 44444))
      >>> b.set_send_checksum_coverage(16)
      >>> b.sendto(b'test'*256, ('localhost', 44444))
      >>> b.set_send_checksum_coverage(32)
      >>> b.sendto(b'test'*256, ('localhost', 44444))
      >>> b.set_send_checksum_coverage(64)
      >>> b.sendto(b'test'*256, ('localhost', 44444))
      ```
      
      One can also detect support for UDPLITE just by checking
      
      ```
      >>> hasattr(socket, 'IPPROTO_UDPLITE')
      ```
      
      
      https://bugs.python.org/issue37345
      2ac3bab2
    • Inada Naoki's avatar
      bpo-37348: optimize decoding ASCII string (GH-14283) · 770847a7
      Inada Naoki authored
      `_PyUnicode_Writer` is a relatively complex structure.  Initializing it is significant overhead when decoding short ASCII string.
      770847a7
  2. 23 Jun, 2019 1 commit
  3. 22 Jun, 2019 5 commits
  4. 21 Jun, 2019 10 commits
  5. 20 Jun, 2019 7 commits
  6. 19 Jun, 2019 11 commits