Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow backslashreplace error handler to be used on input #66482

Closed
ncoghlan opened this issue Aug 27, 2014 · 9 comments
Closed

Allow backslashreplace error handler to be used on input #66482

ncoghlan opened this issue Aug 27, 2014 · 9 comments
Assignees
Labels
extension-modules C modules in the Modules dir type-feature A feature request or enhancement

Comments

@ncoghlan
Copy link
Contributor

BPO 22286
Nosy @ncoghlan, @vstinner, @bitdancer, @vadmium, @serhiy-storchaka, @zooba
Dependencies
  • bpo-22470: Possible integer overflow in error handlers
  • Files
  • backslashreplace_decode.patch
  • backslashreplace_decode_2.patch
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = 'https://github.com/serhiy-storchaka'
    closed_at = <Date 2015-01-27.08:54:56.094>
    created_at = <Date 2014-08-27.10:50:20.603>
    labels = ['extension-modules', 'type-feature']
    title = 'Allow backslashreplace error handler to be used on input'
    updated_at = <Date 2015-01-27.08:54:56.094>
    user = 'https://github.com/ncoghlan'

    bugs.python.org fields:

    activity = <Date 2015-01-27.08:54:56.094>
    actor = 'serhiy.storchaka'
    assignee = 'serhiy.storchaka'
    closed = True
    closed_date = <Date 2015-01-27.08:54:56.094>
    closer = 'serhiy.storchaka'
    components = ['Extension Modules']
    creation = <Date 2014-08-27.10:50:20.603>
    creator = 'ncoghlan'
    dependencies = ['22470']
    files = ['36697', '37274']
    hgrepos = []
    issue_num = 22286
    keywords = ['patch', 'needs review']
    message_count = 9.0
    messages = ['225966', '227352', '231655', '234144', '234607', '234691', '234694', '234706', '234784']
    nosy_count = 8.0
    nosy_names = ['ncoghlan', 'vstinner', 'Arfrever', 'r.david.murray', 'python-dev', 'martin.panter', 'serhiy.storchaka', 'steve.dower']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue22286'
    versions = ['Python 3.5']

    @ncoghlan
    Copy link
    Contributor Author

    In the discussion on bpo-18814, Antoine pointed out that in a Python 3 world, using backslashescape during decoding actually makes sense - it lets you accurately report arbitrary bytes in the sequence, without needing surrogateescape or surrogatepass to be used when encoding later.

    @ncoghlan ncoghlan added the type-feature A feature request or enhancement label Aug 27, 2014
    @serhiy-storchaka
    Copy link
    Member

    Here is a patch.

    @serhiy-storchaka serhiy-storchaka added the extension-modules C modules in the Modules dir label Sep 23, 2014
    @serhiy-storchaka
    Copy link
    Member

    Synchronized with the tip (resolved conflicts with bpo-22470 and bpo-19676).

    @serhiy-storchaka serhiy-storchaka self-assigned this Nov 25, 2014
    @serhiy-storchaka
    Copy link
    Member

    Could you make a review Nick to get this feature in the first alpha.

    @ncoghlan
    Copy link
    Contributor Author

    +1 from me for merging, although I suspect you'll need to adjust the codecs.rst changes first.

    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented Jan 25, 2015

    New changeset dd8a03e98158 by Serhiy Storchaka in branch 'default':
    Issue bpo-22286: The "backslashreplace" error handlers now works with
    https://hg.python.org/cpython/rev/dd8a03e98158

    @bitdancer
    Copy link
    Member

    Looks like the buildbots aren't happy with this change.

    @serhiy-storchaka
    Copy link
    Member

    Yes, I see. The patch exposed existing bug in decoding error handing. See bpo-23321 for this.

    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented Jan 26, 2015

    New changeset 1e8937861ee3 by Victor Stinner in branch 'default':
    Issue bpo-22286, bpo-23321: Fix failing test on Windows code page 932
    https://hg.python.org/cpython/rev/1e8937861ee3

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    extension-modules C modules in the Modules dir type-feature A feature request or enhancement
    Projects
    None yet
    Development

    No branches or pull requests

    3 participants