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

plistlib contains unescaped hex sequence in doc string #49682

Closed
jimcorreia mannequin opened this issue Mar 6, 2009 · 2 comments
Closed

plistlib contains unescaped hex sequence in doc string #49682

jimcorreia mannequin opened this issue Mar 6, 2009 · 2 comments
Labels
stdlib Python modules in the Lib dir

Comments

@jimcorreia
Copy link
Mannequin

jimcorreia mannequin commented Mar 6, 2009

BPO 5432
Nosy @birkenfeld

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 = None
closed_at = <Date 2009-04-05.15:14:40.794>
created_at = <Date 2009-03-06.18:53:39.972>
labels = ['library']
title = 'plistlib contains unescaped hex sequence in doc string'
updated_at = <Date 2009-04-05.15:14:40.792>
user = 'https://bugs.python.org/jimcorreia'

bugs.python.org fields:

activity = <Date 2009-04-05.15:14:40.792>
actor = 'georg.brandl'
assignee = 'none'
closed = True
closed_date = <Date 2009-04-05.15:14:40.794>
closer = 'georg.brandl'
components = ['Library (Lib)']
creation = <Date 2009-03-06.18:53:39.972>
creator = 'jim.correia'
dependencies = []
files = []
hgrepos = []
issue_num = 5432
keywords = []
message_count = 2.0
messages = ['83251', '85515']
nosy_count = 2.0
nosy_names = ['georg.brandl', 'jim.correia']
pr_nums = []
priority = 'normal'
resolution = 'fixed'
stage = None
status = 'closed'
superseder = None
type = None
url = 'https://bugs.python.org/issue5432'
versions = ['Python 2.6']

@jimcorreia
Copy link
Mannequin Author

jimcorreia mannequin commented Mar 6, 2009

The module doc string contains an example with hex escape sequences (see
below). They are converted to their literal values by pydoc, which
results in an unexpected encoding for the output of pydoc.

(raw string, or proper escaping solves the problem)

Relevant chunk of the file:

        anotherString="\<hello & hi there!\>",
        aUnicodeValue=u'M\\xe4ssig, Ma\\xdf',
        aTrueValue=True,
        aFalseValue=False,
    ),
    someData = Data("\<binary gunk\>"),
    someMoreData = Data("\<lots of binary gunk\>" * 10),
    aDate = 

datetime.datetime.fromtimestamp(time.mktime(time.gmtime())),
)
# unicode keys are possible, but a little awkward to use:
pl[u'\xc5benraa'] = "That was a unicode key."

@jimcorreia jimcorreia mannequin added the stdlib Python modules in the Lib dir label Mar 6, 2009
@birkenfeld
Copy link
Member

Fixed in r71243, thanks!

@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
stdlib Python modules in the Lib dir
Projects
None yet
Development

No branches or pull requests

1 participant