Merge pull request #2532 from xonsh/moveback

this never should have been moved
This commit is contained in:
Gil Forsyth 2017-11-11 12:17:37 -05:00 committed by GitHub
commit 3aa7c4769d
Failed to generate hash of commit
2 changed files with 20 additions and 3 deletions

15
news/moveback.rst Normal file
View file

@ -0,0 +1,15 @@
**Added:** None
**Changed:**
* Moved the lazy ``pkg_resources`` package back to its original
place. The will hopefully address some of the slowdown issues
experiances on some platforms.
**Deprecated:** None
**Removed:** None
**Fixed:** None
**Security:** None

View file

@ -8,8 +8,13 @@ import builtins
from collections import ChainMap
from collections.abc import MutableMapping
# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
# DO NOT MOVE
# must come before pygments imports
from xonsh.lazyasd import load_module_in_background
load_module_in_background('pkg_resources', debug='XONSH_DEBUG',
replacements={'pygments.plugin': 'pkg_resources'})
# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
from pygments.lexer import inherit, bygroups, include
from pygments.lexers.agile import PythonLexer
@ -30,9 +35,6 @@ from xonsh.style_tools import norm_name
from xonsh.lazyimps import terminal256
from xonsh.platform import os_environ
load_module_in_background('pkg_resources', debug='XONSH_DEBUG',
replacements={'pygments.plugin': 'pkg_resources'})
def _command_is_valid(cmd):
try: