GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — PEP 594: uuencode codec and binascii functions apparently not properly deprecated or documented as such · Issue #92613 · python/cpython

PEP 594: uuencode codec and binascii functions apparently not properly deprecated or documented as such #92613

New issue
Copy link
New issue
Copy link
Open
Open
PEP 594: uuencode codec and binascii functions apparently not properly deprecated or documented as such#92613
Copy link
Assignees
CAM-Gerlach
Labels
docsDocumentation in the Doc dirDocumentation in the Doc dirstdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytopic-email

Description

@CAM-Gerlach
CAM-Gerlach
opened on May 10, 2022
Issue body actions

As referred to in #92611 , PEP 594 (PEP-594) states that the uuencode/decode-related functions in the binascii module, as well as the uu codec will be deprecated in Python 3.11 and removed in Python 3.13:

The uu module provides uuencode format, an old binary encoding format for email from 1980. The uu format has been replaced by MIME. The uu codec is provided by the binascii module. There’s also encodings/uu_codec.py which is a codec for the same encoding; it should also be deprecated.

However, as far as I can tell, those deprecations are neither implemented with warnings in uu_codec.py or binascii (although I'm not sure what a deprecation warning at the C level that should appear at the Python level is actually supposed to look like) nor are they documented in the respective uu codec or binascii documentation sections.

Is this intentional. If not, shouldn't we get these in for 3.11?

@brettcannon @tiran

  • PR: gh-92613: Deprecate other uuencode functionality per PEP 594 & document as such #92758

Activity

Next
  1. CAM-Gerlach
    added
    docsDocumentation in the Doc dirDocumentation in the Doc dir
    stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directory
    on May 10, 2022
  2. brettcannon commented on May 11, 2022

    @brettcannon
    brettcannon
    on May 11, 2022
    Member
    More actions

    Probably just an oversight, although not a critical one.

  3. CAM-Gerlach
    self-assigned this
    on May 12, 2022
  4. CAM-Gerlach commented on May 12, 2022

    @CAM-Gerlach
    CAM-Gerlach
    on May 12, 2022
    MemberAuthor
    More actions

    Still, one that should be corrected, since per PEP 387 (PEP-387), in order to be removed, any APIs must raise a deprecation warning (and be documented as such) for at least two releases, and their deprecation is also explicitly specified per PEP 594.

    Raising a DeprecationWarning on use of the codec is straightforward (since it can use the same function as the rest, presumably), as are the docs changes, but what about the two binascii functions are part of an extension module written in C? I'm not familiar with standard practice there, and I wasn't able to easily find existing examples or devguide guidance on this issue, (though its entirely possible I missed it), so I'd appreciate your advice on this.

    Also, I presume this can still get landed in 3.11, since otherwise they would block uu's removal for another release, but can/should the docs deprecation notices also be backported like the module-level ones (presumably without the version), or no?

  5. hugovk commented on May 12, 2022

    @hugovk
    hugovk
    on May 12, 2022
    Member
    More actions

    Raising a DeprecationWarning on use of the codec is straightforward (since it can use the same function as the rest, presumably), as are the docs changes, but what about the two binascii functions are part of an extension module written in C?

    Here's an example from https://github.com/python/cpython/pull/91846/files:

    PyMODINIT_FUNC
    PyInit_spwd(void)
    {
        if (PyErr_WarnEx(PyExc_DeprecationWarning,
                         "'spwd' is deprecated and slated for removal in "
                         "Python 3.13",
                         7)) {
            return NULL;
        }

    Some more:

    • https://github.com/python/cpython/pull/91846/files
    • https://github.com/python/cpython/pull/91641/files
    • https://github.com/python/cpython/pull/91606/files
    • https://github.com/python/cpython/pull/32392/files
    Reacted by C.A.M. Gerlach
  6. brettcannon commented on May 12, 2022

    @brettcannon
    brettcannon
    on May 12, 2022
    Member
    More actions

    Still, one that should be corrected

    Yep, I'm just saying I don't have the time to do it myself.

    since per PEP 387 (PEP-387), in order to be removed, any APIs must raise a deprecation warning (and be documented as such) for at least two releases

    As co-author of the PEP, I'm aware. 😉

    Also, I presume this can still get landed in 3.11, since otherwise they would block uu's removal for another release

    That's a question for @pablogsal

    but can/should the docs deprecation notices also be backported like the module-level ones (presumably without the version), or no?

    No as it's too small of a deprecation.

  7. CAM-Gerlach commented on May 12, 2022

    @CAM-Gerlach
    CAM-Gerlach
    on May 12, 2022
    MemberAuthor
    More actions

    I'm partway through implementing this (most of the work is just silencing the warnings in the tests).

    BTW, I noticed one other minor use of uu too small to be noted in the PEP—its not mentioned in the documentation, but the uu decode function is also called to decode uuencoded attachments of (ancient, pre-MIME) emails, so a DeprecationWarning and docs note can be added there as well, to identify any unexpected user impacts.

    Yep, I'm just saying I don't have the time to do it myself.

    Yep, I assumed you'd have more important things to do, heh, so I assigned myself here.

    As co-author of the PEP, I'm aware. 😉

    I'd almost said "your PEP 387", but double-checked and noticed you were the PEP-Delegate, not an author (which would be a COI)

    That's a question for @pablogsal

    Is there something specific I need to do to apply for/justify an exception on this, or do we just wait for Pablo to respond here? I know release managers are very busy people...

    No as it's too small of a deprecation.

    👍

  8. 45 remaining items

  9. CAM-Gerlach
    added a commit that references this issue on Aug 11, 2022

    pythongh-92613: Add News entry for uuencode deprecations

    1c29ff2
  10. CAM-Gerlach
    added 11 commits that reference this issue on Nov 8, 2022

    pythongh-92613: Deprecate the uuencode codec in codecs

    e2fd5f6

    pythongh-92613: Silence uu-codec-related deprecation warnings in tests

    ef6af61

    pythongh-92613: Add deprecation note to codecs docs for uuencode codec

    9b28da8

    pythongh-92613: Deprecate built-in decoding support for uuencode in e…

    87b9035

    pythongh-92613: Silence uuencode deprecation warnings in email tests

    b42a4db

    pythongh-92613: Add deprecation note for uuencode payloads to email.m…

    c6516ea

    pythongh-92613: Add deprecation warning for binascii uuencode functions

    4511286

    pythongh-92613: Silence depr warnings for binascii uuencode that alre…

    c10fd87

    pythongh-92613: Suppress binascii uuencode deprecation warnings in tests

    ec15dc6

    pythongh-92613: Add deprecation note for uuencode functions to binasc…

    aabe333

    pythongh-92613: Add News entry for uuencode deprecations

    b3ce329
  11. vadmium commented on Feb 7, 2024

    @vadmium
    vadmium
    on Feb 7, 2024
    Member
    More actions

    Is binascii.b2a_uu deprecated? If so, it would be nice to see this when reading the documentation. I recently wrote a script that will use it, without being aware of this push for deprecation. The PEP does not say any binascii functions will be deprecated; it only mentions deprecating the uu module, and encodings/uu_codec.py.

  12. hugovk commented on Feb 7, 2024

    @hugovk
    hugovk
    on Feb 7, 2024
    Member
    More actions

    It's not yet formally deprecated.

    #92758 plans to add docs and deprecation warnings, but it's been open for nearly two years...

    If it is merged before May (in Python 3.13) then it could he removed in October 2026 (in 3.15).

  13. brettcannon commented on Jul 6, 2024

    @brettcannon
    brettcannon
    on Jul 6, 2024
    Member
    More actions

    @warsaw should we move forward w/ this deprecation or drop it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @CAM-Gerlach
    CAM-Gerlach

Labels

docsDocumentation in the Doc dirDocumentation in the Doc dirstdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytopic-email

Projects

  • Codecs and encodings issues
    Status
    No status
    Show more project fields

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.