Movatterモバイル変換


[0]ホーム

URL:


homepage

Issue31658

This issue trackerhas been migrated toGitHub, and is currentlyread-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title:xml.sax.parse won't accept path objects
Type:behaviorStage:resolved
Components:Library (Lib), XMLVersions:Python 3.8
process
Status:closedResolution:fixed
Dependencies:Superseder:
Assigned To:Nosy List: craigh, mcepl, pitrou, scoder
Priority:normalKeywords:patch

Created on2017-10-01 20:51 bycraigh, last changed2022-04-11 14:58 byadmin. This issue is nowclosed.

Pull Requests
URLStatusLinkedEdit
PR 8564mergedTiger-222,2018-07-30 12:43
Messages (4)
msg303490 -(view)Author: Craig Holmquist (craigh)Date: 2017-10-01 20:51
>>> import xml.sax>>> import pathlib[...]>>> xml.sax.parse(pathlib.Path('path/to/file'), handler)Traceback (most recent call last):  File "<stdin>", line 1, in <module>  File "/usr/lib/python3.6/xml/sax/__init__.py", line 33, in parse    parser.parse(source)  File "/usr/lib/python3.6/xml/sax/expatreader.py", line 105, in parse    source = saxutils.prepare_input_source(source)  File "/usr/lib/python3.6/xml/sax/saxutils.py", line 355, in prepare_input_source    if source.getCharacterStream() is None and source.getByteStream() is None:AttributeError: 'PosixPath' object has no attribute 'getCharacterStream'
msg340197 -(view)Author: Stefan Behnel (scoder)*(Python committer)Date: 2019-04-14 09:10
PR looks good to me. Doesn't look critical enough for a backport, though.
msg340198 -(view)Author: Stefan Behnel (scoder)*(Python committer)Date: 2019-04-14 09:17
New changeset929b70473829f04dedb8e802abcbd506926886e1 by Stefan Behnel (Mickaël Schoentgen) in branch 'master':bpo-31658: Make xml.sax.parse accepting Path objects (GH-8564)https://github.com/python/cpython/commit/929b70473829f04dedb8e802abcbd506926886e1
msg340199 -(view)Author: Stefan Behnel (scoder)*(Python committer)Date: 2019-04-14 09:18
Thanks for your contribution.
History
DateUserActionArgs
2022-04-11 14:58:53adminsetgithub: 75839
2019-04-14 09:18:33scodersetmessages: +msg340199
2019-04-14 09:18:08scodersetstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2019-04-14 09:17:12scodersetmessages: +msg340198
2019-04-14 09:10:24scodersetnosy: +scoder

messages: +msg340197
versions: - Python 3.6, Python 3.7
2019-01-14 18:45:07Tiger-222setversions: + Python 3.7, Python 3.8
2018-07-30 12:43:58Tiger-222setkeywords: +patch
stage: patch review
pull_requests: +pull_request8078
2018-03-05 00:37:50mceplsetnosy: +mcepl
2017-10-01 20:55:11rhettingersetnosy: +pitrou
2017-10-01 20:51:11craighcreate
Supported byThe Python Software Foundation,
Powered byRoundup
Copyright © 1990-2022,Python Software Foundation
Legal Statements

[8]ページ先頭

©2009-2026 Movatter.jp