[issue30814] Import dotted name as alias breaks with concurrency

2017-07-27 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- resolution: -> fixed status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue30814] Import dotted name as alias breaks with concurrency

2017-07-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 95b16a9705d6b4d31c016c014e59744fc33d53ea by Serhiy Storchaka in branch '3.6': [3.6] bpo-30814, bpo-30876: Add new import test files to projects. (GH-2851). (#2912) https://github.com/python/cpython/commit/95b16a9705d6b4d31c016c014e59744fc33d53e

[issue30814] Import dotted name as alias breaks with concurrency

2017-07-27 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- pull_requests: +2963 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://m

[issue30814] Import dotted name as alias breaks with concurrency

2017-07-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset d5ed47dea25e04a3a144eddf99a4ac4a29242dbc by Serhiy Storchaka in branch 'master': bpo-30814, bpo-30876: Add new import test files to projects. (#2851) https://github.com/python/cpython/commit/d5ed47dea25e04a3a144eddf99a4ac4a29242dbc --

[issue30814] Import dotted name as alias breaks with concurrency

2017-07-24 Thread STINNER Victor
STINNER Victor added the comment: I also opened https://github.com/python/devguide/issues/241 : "Document how to add a new file or a new directory". It's not the first time that we make such mistake. -- ___ Python tracker

[issue30814] Import dotted name as alias breaks with concurrency

2017-07-24 Thread STINNER Victor
STINNER Victor added the comment: Serhiy on PR 2851: > I forget to include directories with new test files in the list of the > library directories. This caused that these test files were not installed. Oh, too bad that Zach's "x86 Gentoo Installed with X 3.6" buildbot is offline. --

[issue30814] Import dotted name as alias breaks with concurrency

2017-07-24 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- pull_requests: +2900 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://m

[issue30814] Import dotted name as alias breaks with concurrency

2017-07-24 Thread Ned Deily
Ned Deily added the comment: > Which Git revisions are you testing? On master, do you have my latest commit > e72b1359f81d1dd42bd8a5c5cc2b3928b74f8023 ? Yes, this is with current top of trunk of both branches. Perhaps I wasn't clear about "installed location". The test does not fail if you r

[issue30814] Import dotted name as alias breaks with concurrency

2017-07-24 Thread STINNER Victor
STINNER Victor added the comment: > When running tests from installed location, test_import now fails on master > and 3.6 with: Which Git revisions are you testing? On master, do you have my latest commit e72b1359f81d1dd42bd8a5c5cc2b3928b74f8023 ? -- _

[issue30814] Import dotted name as alias breaks with concurrency

2017-07-24 Thread Ned Deily
Ned Deily added the comment: When running tests from installed location, test_import now fails on master and 3.6 with: == ERROR: test_concurrency (test.test_import.ImportTests) --

[issue30814] Import dotted name as alias breaks with concurrency

2017-07-21 Thread STINNER Victor
Changes by STINNER Victor : -- pull_requests: +2851 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mai

[issue30814] Import dotted name as alias breaks with concurrency

2017-07-10 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It is worth to backport the test to older versions. Just to be sure that this is a 3.6 regression. -- ___ Python tracker ___

[issue30814] Import dotted name as alias breaks with concurrency

2017-07-10 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- pull_requests: +2710 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://m

[issue30814] Import dotted name as alias breaks with concurrency

2017-07-10 Thread STINNER Victor
STINNER Victor added the comment: test_concurrency() of test_import fails randomly on Windows: see bpo-30891. -- nosy: +haypo resolution: fixed -> status: closed -> open ___ Python tracker

[issue30814] Import dotted name as alias breaks with concurrency

2017-07-08 Thread Brett Cannon
Brett Cannon added the comment: I just wanted to say thanks to everyone who helped to fix this bug. The locking situation in import is probably the trickiest part of it and has also been tweaked the most as of late and so solving these kinds of issues is tricky. -- ___

[issue30814] Import dotted name as alias breaks with concurrency

2017-07-07 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ _

[issue30814] Import dotted name as alias breaks with concurrency

2017-07-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 03b0e8374b2ea93adf8fb6a48db2916f3b0388cc by Serhiy Storchaka in branch '3.6': [3.6] bpo-30814: Fixed a race condition when import a submodule from a package. (GH-2580). (#2598) https://github.com/python/cpython/commit/03b0e8374b2ea93adf8fb6a48d

[issue30814] Import dotted name as alias breaks with concurrency

2017-07-05 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- pull_requests: +2666 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://m

[issue30814] Import dotted name as alias breaks with concurrency

2017-07-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset b4baacee1adc06edbe30ac7574d17a8cd168e2e0 by Serhiy Storchaka in branch 'master': bpo-30814: Fixed a race condition when import a submodule from a package. (#2580) https://github.com/python/cpython/commit/b4baacee1adc06edbe30ac7574d17a8cd168e2e0

[issue30814] Import dotted name as alias breaks with concurrency

2017-07-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I have came to the same conclusion. PR 2580 adds a double check in _bootstrap._find_and_load() (and also moves the locking into it). It also simplifies the C code by removing the fast path for the case sys.module[name] is None. -- stage: -> patch r

[issue30814] Import dotted name as alias breaks with concurrency

2017-07-04 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- pull_requests: +2650 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://m

[issue30814] Import dotted name as alias breaks with concurrency

2017-07-04 Thread Nick Coghlan
Nick Coghlan added the comment: Documenting explicitly what I believe the expected order of module lock acquisition would be in this case: Thread A acquires package.subpackage lock Thread B blocks on package.subpackage lock Thread A acquires package lock Thread A releases packag

[issue30814] Import dotted name as alias breaks with concurrency

2017-07-04 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- priority: normal -> high ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:/

[issue30814] Import dotted name as alias breaks with concurrency

2017-07-04 Thread Brett Cannon
Brett Cannon added the comment: My guess is the import of package has completed but package.submodule hasn't (I don't know what state it would be in, but obviously before the module is assigned as an attribute on the package), a context switch occurs, and then the assignment fails due to packa

[issue30814] Import dotted name as alias breaks with concurrency

2017-07-01 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- assignee: -> serhiy.storchaka keywords: +3.6regression versions: +Python 3.7 ___ Python tracker ___

[issue30814] Import dotted name as alias breaks with concurrency

2017-07-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: On other side, issue23203 fixed just a symptom. The issue is reproduced in master when replace "import foobar.submodule as foo" with "import foobar.submodule; foo = foobar.submodule". The regression may be related to issue22557. Either the optimization intro

[issue30814] Import dotted name as alias breaks with concurrency

2017-06-30 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: See also issue23203. This was fixed in master in issue30024. Maybe it is worth to backport that change to maintained versions? -- ___ Python tracker ___

[issue30814] Import dotted name as alias breaks with concurrency

2017-06-30 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- components: +Interpreter Core nosy: +brett.cannon, eric.snow, ncoghlan, serhiy.storchaka type: -> behavior ___ Python tracker ___ __

[issue30814] Import dotted name as alias breaks with concurrency

2017-06-30 Thread Frazer McLean
Changes by Frazer McLean : -- nosy: +RazerM ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python

[issue30814] Import dotted name as alias breaks with concurrency

2017-06-30 Thread Samuele Santi
New submission from Samuele Santi: I noticed this weird behavior in Python 3.6: Apparently ``import package.module as _alias`` fails in a threaded environment, sometimes raising an ``ImportError``, seemingly at random. Everything seems to be working perfectly fine: - On 3.5 and lower - When *