Skip to content
Permalink
main
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Commits on Dec 25, 2022

  1. gh-100519: simplification to eff_request_host in cookiejar.py (#99588)

    `IPV4_RE` includes a `.`, and the `.find(".") == -1` included here is already testing to make sure there's no dot, so this part of the expression is tautological. Instead use more modern `in` syntax to make it clear what the check is doing here. The simplified implementation more clearly matches the wording in RFC 2965.
    
    Co-authored-by: hauntsaninja <hauntsaninja@gmail.com>
    glyph and hauntsaninja committed Dec 25, 2022

Commits on Dec 24, 2022

  1. [Minor PR] Quotes in documentation changed into code blocks (#99536)

    Minor formatting fix in documentation
    
    Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
    bartbroere and hauntsaninja committed Dec 24, 2022
  2. gh-100428: Make float documentation more accurate (#100437)

    Previously, the grammar did not accept `float("10")`.
    Also implement mdickinson's suggestion of removing the indirection.
    hauntsaninja committed Dec 24, 2022
  3. gh-100474: Fix handling of dirs named index.html in http.server (GH-1…

    …00475)
    
    If you had a directory called index.html or index.htm within a directory, it would cause http.server to return a 404 Not Found error instead of the directory listing. This came about due to not checking that the index was a regular file.
    
    I have also added a test case for this situation.
    
    Automerge-Triggered-By: GH:merwok
    Fraetor committed Dec 24, 2022
  4. gh-99908: Tutorial: Modernize the 'data-record class' example (#100499)

    Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
    JosephSBoyle and AlexWaygood committed Dec 24, 2022
  5. GH-91166: Implement zero copy writes for SelectorSocketTransport in…

    … asyncio (#31871)
    
    Co-authored-by: Guido van Rossum <gvanrossum@gmail.com>
    kumaraditya303 and gvanrossum committed Dec 24, 2022
  6. GH-91166: Implement zero copy writes for SelectorSocketTransport in…

    … asyncio (#31871)
    
    Co-authored-by: Guido van Rossum <gvanrossum@gmail.com>
    kumaraditya303 and gvanrossum committed Dec 24, 2022
  7. gh-77771: Add enterabs example in sched (#92716)

    Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
    slateny and hauntsaninja committed Dec 24, 2022
  8. gh-100268: Add is_integer method to int (#100439)

    This improves the lives of type annotation users of `float` - which type checkers implicitly treat as `int|float` because that is what most code actually wants. Before this change a `.is_integer()` method could not be assumed to exist on things annotated as `: float` due to the method not existing on both types.
    hauntsaninja committed Dec 24, 2022

Commits on Dec 23, 2022

  1. gh-68320, gh-88302 - Allow for private pathlib.Path subclassing (GH…

    …-31691)
    
    Users may wish to define subclasses of `pathlib.Path` to add or modify
    existing methods. Before this change, attempting to instantiate a subclass
    raised an exception like:
    
        AttributeError: type object 'PPath' has no attribute '_flavour'
    
    Previously the `_flavour` attribute was assigned as follows:
    
        PurePath._flavour        = xxx not set!! xxx
        PurePosixPath._flavour   = _PosixFlavour()
        PureWindowsPath._flavour = _WindowsFlavour()
    
    This change replaces it with a `_pathmod` attribute, set as follows:
    
        PurePath._pathmod        = os.path
        PurePosixPath._pathmod   = posixpath
        PureWindowsPath._pathmod = ntpath
    
    Functionality from `_PosixFlavour` and `_WindowsFlavour` is moved into
    `PurePath` as underscored-prefixed classmethods. Flavours are removed.
    
    Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
    Co-authored-by: Brett Cannon <brett@python.org>
    Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
    Co-authored-by: Eryk Sun <eryksun@gmail.com>
    5 people committed Dec 23, 2022
  2. bpo-40447: accept all path-like objects in compileall.compile_file (#…

    …19883)
    
    Signed-off-by: Filipe Laíns <lains@archlinux.org>
    Signed-off-by: Filipe Laíns <lains@riseup.net>
    Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
    Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
    3 people committed Dec 23, 2022
  3. gh-94155: Reduce hash collisions for code objects (#100183)

    * Uses a better hashing algorithm to get better dispersion and remove commutativity.
    
    * Incorporates `co_firstlineno`, `Py_SIZE(co)`, and bytecode instructions.
    
    * This is now the entire set of criteria used in `code_richcompare`, except for `_PyCode_ConstantKey` (which would incorporate the types of `co_consts` rather than just their values).
    sweeneyde committed Dec 23, 2022
  4. gh-99110: Initialize frame->previous in init_frame to fix segmentat…

    …ion fault when accessing `frame.f_back` (#100182)
    byllyfish committed Dec 23, 2022
  5. gh-76963: PEP3118 itemsize of an empty ctypes array should not be 0 (G…

    …H-5576)
    
    The itemsize returned in a memoryview of a ctypes array is now computed from the item type, instead of dividing the total size by the length and assuming that the length is not zero.
    eric-wieser committed Dec 23, 2022
Older