Movatterモバイル変換


[0]ホーム

URL:


homepage

Issue19711

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:add test for changed portions after reloading a namespace package
Type:Stage:resolved
Components:TestsVersions:Python 3.6
process
Status:closedResolution:fixed
Dependencies:Superseder:
Assigned To: eric.snowNosy List: Arfrever, brett.cannon, eric.snow, ncoghlan, python-dev
Priority:normalKeywords:patch

Created on2013-11-22 16:47 bybrett.cannon, last changed2022-04-11 14:57 byadmin. This issue is nowclosed.

Files
File nameUploadedDescriptionEdit
issue19711-test-case.differic.snow,2014-03-29 02:36review
issue19711-test_namespace_pkgs.differic.snow,2014-03-29 21:06Test case making use of test_namespace_pkgs instead of rolling own dynamic generation.review
Messages (10)
msg203805 -(view)Author: Brett Cannon (brett.cannon)*(Python committer)Date: 2013-11-22 16:47
http://bugs.python.org/msg202660
msg215079 -(view)Author: Eric Snow (eric.snow)*(Python committer)Date: 2014-03-28 21:55
A related addition (Lib/test/test_importlib/test_api.py - test_reload_namespace_changed):changeset:   86819:88c3a1a3c2ff3c3ab3f2bd77f0d5d5e5c1b37afaparent:      86816:13a05ed33cf7user:        Eric Snow <ericsnowcurrently@gmail.com>date:        Thu Oct 31 22:22:15 2013 -0600summary:     Issue#19413: Restore pre-3.3 reload() semantics of re-finding modules.
msg215108 -(view)Author: Eric Snow (eric.snow)*(Python committer)Date: 2014-03-29 02:36
Here's a patch that adds the test.  However, the test is failing and my gut's telling me it's a legitimate failure.  I'll verify as soon as I have a chance and open a new issue if it is legit (i.e. a regression in 3.4, albeit an unlikely corner case).  Thanks for suggesting the test, Nick!
msg215142 -(view)Author: Eric Snow (eric.snow)*(Python committer)Date: 2014-03-29 20:34
Well, the same patch (modulo adjusting to apply cleanly) fails in exactly the same way in 3.3.  So either the test isn't right or namespace packages have never supported reload in this way.  I'll keep investigating.
msg215144 -(view)Author: Eric Snow (eric.snow)*(Python committer)Date: 2014-03-29 21:06
Regarding this issue, keep in mind that namespace packages have a dynamic __path__ which already updates (effectively) when new portions are added to sys.path.  So we just need to make sure that reloading does not break that.To that end, here's a much simpler patch (with passing tests) that verifies thatPEP 451 did not break anything here.
msg222286 -(view)Author: Mark Lawrence (BreamoreBoy)*Date: 2014-07-04 14:34
Latest patch LGTM.  Can we have a patch review please as#18864 is dependent on this.
msg232568 -(view)Author: Brett Cannon (brett.cannon)*(Python committer)Date: 2014-12-12 17:37
Do we still need this patch, Eric?
msg236535 -(view)Author: Mark Lawrence (BreamoreBoy)*Date: 2015-02-24 19:47
To echo Brett's question, do we still need this patch, Eric?
msg265279 -(view)Author: Roundup Robot (python-dev)(Python triager)Date: 2016-05-10 21:33
New changesetc22ec7a45114 by Eric Snow in branch 'default':Fixes#19711: Add tests for reloading namespace packages.https://hg.python.org/cpython/rev/c22ec7a45114
msg265280 -(view)Author: Eric Snow (eric.snow)*(Python committer)Date: 2016-05-10 21:34
I've gone ahead and pushed the patch.
History
DateUserActionArgs
2022-04-11 14:57:54adminsetgithub: 63910
2016-05-12 16:37:08BreamoreBoysetnosy: -BreamoreBoy
2016-05-12 14:36:21eric.snowsetversions: + Python 3.6, - Python 3.5
2016-05-10 21:34:09eric.snowsetstatus: open -> closed
resolution: fixed
messages: +msg265280

stage: test needed -> resolved
2016-05-10 21:33:24python-devsetnosy: +python-dev
messages: +msg265279
2015-02-24 19:47:11BreamoreBoysetstatus: pending -> open

messages: +msg236535
2014-12-12 17:37:42brett.cannonsetstatus: open -> pending

messages: +msg232568
versions: + Python 3.5, - Python 3.4
2014-07-04 14:34:50BreamoreBoysetnosy: +BreamoreBoy
messages: +msg222286
2014-03-29 21:36:53eric.snowsetassignee:eric.snow
2014-03-29 21:06:37eric.snowsetfiles: +issue19711-test_namespace_pkgs.diff

messages: +msg215144
2014-03-29 20:34:15eric.snowsetmessages: +msg215142
2014-03-29 02:36:58eric.snowsetfiles: +issue19711-test-case.diff
keywords: +patch
messages: +msg215108
2014-03-28 21:55:27eric.snowsetmessages: +msg215079
2013-11-23 19:53:41Arfreversetnosy: +Arfrever
2013-11-22 16:47:16brett.cannonlinkissue18864 dependencies
2013-11-22 16:47:07brett.cannoncreate
Supported byThe Python Software Foundation,
Powered byRoundup
Copyright © 1990-2022,Python Software Foundation
Legal Statements

[8]ページ先頭

©2009-2026 Movatter.jp