Coder Social home page Coder Social logo

stallion's People

Contributors

msabramo avatar perone avatar pyos avatar simongreenhill avatar stumpylog avatar thgcode avatar thomasleveil avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

stallion's Issues

HTTP Proxy Support

Stallion fails to update packages under proxy, defined with http_proxy and https_proxy env vars. Both easy_install and pip work well with these vars.

Split plp from stallion

plp should be in its own package for those who want the colourful terminal interface but don't want the web interface.

Explicit port is ignored

Hi, Stallion works fine on the default port (5000), but if I try a different one, say 5005 (via "-p 5005"), the server still runs on port 5000, contrary to the program output: "Running on http://127.0.0.1:5005/". Cheers.

Stallion in mac

Traceback (most recent call last):
File "/usr/local/bin/stallion", line 9, in
load_entry_point('Stallion==0.4', 'console_scripts', 'stallion')()
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 357, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 2394, in load_entry_point
return ep.load()
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 2108, in load
entry = import(self.module_name, globals(),globals(), ['name'])
File "/Library/Python/2.7/site-packages/Stallion-0.4-py2.7.egg/stallion/main.py", line 26, in
from docutils.core import publish_parts
File "/Library/Python/2.7/site-packages/docutils-0.12-py2.7.egg/docutils/core.py", line 20, in
from docutils import frontend, io, utils, readers, writers
File "/Library/Python/2.7/site-packages/docutils-0.12-py2.7.egg/docutils/frontend.py", line 41, in
import docutils.utils
File "/Library/Python/2.7/site-packages/docutils-0.12-py2.7.egg/docutils/utils/init.py", line 20, in
import docutils.io
File "/Library/Python/2.7/site-packages/docutils-0.12-py2.7.egg/docutils/io.py", line 18, in
from docutils.utils.error_reporting import locale_encoding, ErrorString, ErrorOutput
File "/Library/Python/2.7/site-packages/docutils-0.12-py2.7.egg/docutils/utils/error_reporting.py", line 47, in
locale_encoding = locale.getlocale()[1] or locale.getdefaultlocale()[1]
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/locale.py", line 511, in getdefaultlocale
return _parse_localename(localename)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/locale.py", line 443, in _parse_localename
raise ValueError, 'unknown locale: %s' % localename
ValueError: unknown locale: UTF-8
Johns-MacBook-Pro:~ john$ plp [--help]
Traceback (most recent call last):
File "/usr/local/bin/plp", line 9, in
load_entry_point('Stallion==0.4', 'console_scripts', 'plp')()
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 357, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 2394, in load_entry_point
return ep.load()
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 2108, in load
entry = import(self.module_name, globals(),globals(), ['name'])
File "/Library/Python/2.7/site-packages/Stallion-0.4-py2.7.egg/stallion/console.py", line 12, in
from stallion.main import get_shared_data, get_pkg_res
File "/Library/Python/2.7/site-packages/Stallion-0.4-py2.7.egg/stallion/main.py", line 26, in
from docutils.core import publish_parts
File "/Library/Python/2.7/site-packages/docutils-0.12-py2.7.egg/docutils/core.py", line 20, in
from docutils import frontend, io, utils, readers, writers
File "/Library/Python/2.7/site-packages/docutils-0.12-py2.7.egg/docutils/frontend.py", line 41, in
import docutils.utils
File "/Library/Python/2.7/site-packages/docutils-0.12-py2.7.egg/docutils/utils/init.py", line 20, in
import docutils.io
File "/Library/Python/2.7/site-packages/docutils-0.12-py2.7.egg/docutils/io.py", line 18, in
from docutils.utils.error_reporting import locale_encoding, ErrorString, ErrorOutput
File "/Library/Python/2.7/site-packages/docutils-0.12-py2.7.egg/docutils/utils/error_reporting.py", line 47, in
locale_encoding = locale.getlocale()[1] or locale.getdefaultlocale()[1]
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/locale.py", line 511, in getdefaultlocale
return _parse_localename(localename)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/locale.py", line 443, in _parse_localename
raise ValueError, 'unknown locale: %s' % localename
ValueError: unknown locale: UTF-8

Unicode error

djngo-search package causes UnicodeDecodeError as its author has ñ in its name

Error when using plp show with various packages

When I run plp show pywin32 I get the following:

pywin32 218 - Python for Window Extensions
License: PSF
Author: Mark Hammond (et al)
Metadata-version: 1.0
Home-page: http://sourceforge.net/projects/pywin32/
Author-email: [email protected]

Location: c:\tools\programs\python27\lib\site-packages
Requires: none
Traceback (most recent call last):
File "C:\tools\programs\Python27\Scripts\plp-script.py", line 9, in
load_entry_point('Stallion==0.4', 'console_scripts', 'plp')()
File "c:\tools\programs\Python27\lib\site-packages\stallion\console.py", line
333, in run_main
cmd_show(arguments)
File "c:\tools\programs\Python27\lib\site-packages\stallion\console.py", line
173, in cmd_show
print get_field_formatted(distinfo, 'classifier')
File "c:\tools\programs\Python27\lib\site-packages\stallion\console.py", line
92, in get_field_formatted
text = get_kv_colored(key, field)
File "c:\tools\programs\Python27\lib\site-packages\stallion\console.py", line
57, in get_kv_colored
text += Fore.WHITE + Style.NORMAL + value
TypeError: cannot concatenate 'str' and 'NoneType' objects

I looked through console.py and it seems that lines 171 and 172 in the, cmd_show function, could be replaced with these three lines:

if classifier != None:
    distinfo['classifier'] = classifier
    print get_field_formatted(distinfo, 'classifier')

In line 134 classifier is set to None, followed by an If block that checks for the existence of the 'classifier' key in distinfo, if the key is not found when Python gets to line 171 it sets distinfo['classifier'] to none which causes the code to error when it calls the get_kv_colored function later.

Another possible fix that may be nicer looking would be to add the following at line 85 in the recursive_dict function:
if field == None:
field = "none"

This would have the output still print Classifier: with a value of none

Over all this seems to be a real handy tool, I will enjoy using it.

Thank you!
Osye Pritchett

Add support for local repositories

Instead of having just the hardcoded PYPI_XMLRPC, it would be awesome if we could specify an optional local repository to search in first.

Update screenshots

We need to update the current screenshots, they're from the old bootstrap version.

Can't locate jinja templates

I installed stallion with pip.
From my home directory, I ran the command listed in the README:
python -m stallion.main
I opened http://localhost:5000/ in my browser.
All I saw was "500 internal server error".
I killed the process.
I re-ran it with -d -v
python -m stallion.main -d -v
Here's your traceback:

Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/Flask-0.9_devdev_20120525-py2.7.egg/flask/app.py", line 1701, in __call__
    return self.wsgi_app(environ, start_response)
  File "/usr/local/lib/python2.7/dist-packages/Flask-0.9_devdev_20120525-py2.7.egg/flask/app.py", line 1689, in wsgi_app
    response = self.make_response(self.handle_exception(e))
  File "/usr/local/lib/python2.7/dist-packages/Flask-0.9_devdev_20120525-py2.7.egg/flask/app.py", line 1687, in wsgi_app
    response = self.full_dispatch_request()
  File "/usr/local/lib/python2.7/dist-packages/Flask-0.9_devdev_20120525-py2.7.egg/flask/app.py", line 1360, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/usr/local/lib/python2.7/dist-packages/Flask-0.9_devdev_20120525-py2.7.egg/flask/app.py", line 1358, in full_dispatch_request
    rv = self.dispatch_request()
  File "/usr/local/lib/python2.7/dist-packages/Flask-0.9_devdev_20120525-py2.7.egg/flask/app.py", line 1344, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/usr/local/lib/python2.7/dist-packages/stallion/main.py", line 185, in index
    return render_template('system_information.html', **data)
  File "/usr/local/lib/python2.7/dist-packages/Flask-0.9_devdev_20120525-py2.7.egg/flask/templating.py", line 124, in render_template
    return _render(ctx.app.jinja_env.get_or_select_template(template_name_or_list),
  File "/usr/local/lib/python2.7/dist-packages/Jinja2-2.6-py2.7.egg/jinja2/environment.py", line 758, in get_or_select_template
    return self.get_template(template_name_or_list, parent, globals)
  File "/usr/local/lib/python2.7/dist-packages/Jinja2-2.6-py2.7.egg/jinja2/environment.py", line 719, in get_template
    return self._load_template(name, self.make_globals(globals))
  File "/usr/local/lib/python2.7/dist-packages/Jinja2-2.6-py2.7.egg/jinja2/environment.py", line 693, in _load_template
    template = self.loader.load(self, name, globals)
  File "/usr/local/lib/python2.7/dist-packages/Jinja2-2.6-py2.7.egg/jinja2/loaders.py", line 115, in load
    source, filename, uptodate = self.get_source(environment, name)
  File "/usr/local/lib/python2.7/dist-packages/Flask-0.9_devdev_20120525-py2.7.egg/flask/templating.py", line 61, in get_source
    raise TemplateNotFound(template)
TemplateNotFound: system_information.html

Package version reported is the oldest when multiple eggs exist

I have downloaded and installed the "base distribution" collection from http://www.lfd.uci.edu/~gohlke/pythonlibs/ a couple of times now, once during my initial Python set up and subsequently to update some packages. This process left duplicates of some packages cluttering site-packages. For example, I now have

Mako-0.4.1-py2.7egg-info
Mako-0.5.0-py2.7.egg-info

When I run Stallion, it lists Mako-0.4.1 as the version. But, the newest version is in fact 0.5.0, which I can confirm my importing the package. So , I am guessing that Stallion scans site-packages and gets a unique list, which may result in the older (smaller version number) package always being listed as the current one.

Add compatibility for PyPy

PyPy 1.7 already supports Stallion 0.1, we need to add that compatibility, as well Python 2.6 and 2.7 into the readme section. We also use new trove classifiers.

Add jinja2 2.6 dependency

Using jinja2 2.5 version causes the following traceback (reported by Liquid_Fire on Reddit):

Traceback (most recent call last):
  File "C:\Python27\lib\site-packages\flask\app.py", line 1518, in __call__
    return self.wsgi_app(environ, start_response)
  File "C:\Python27\lib\site-packages\flask\app.py", line 1506, in wsgi_app
    response = self.make_response(self.handle_exception(e))
  File "C:\Python27\lib\site-packages\flask\app.py", line 1504, in wsgi_app
    response = self.full_dispatch_request()
  File "C:\Python27\lib\site-packages\flask\app.py", line 1264, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "C:\Python27\lib\site-packages\flask\app.py", line 1262, in full_dispatch_request
    rv = self.dispatch_request()
  File "C:\Python27\lib\site-packages\flask\app.py", line 1248, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "C:\Python27\lib\site-packages\stallion\main.py", line 118, in index
    return render_template('system_information.html', **data)
  File "C:\Python27\lib\site-packages\flask\templating.py", line 123, in render_template
    context, ctx.app)
  File "C:\Python27\lib\site-packages\flask\templating.py", line 107, in _render
    rv = template.render(context)
  File "C:\Python27\lib\site-packages\jinja2-2.5.5-py2.7.egg\jinja2\environment.py", line 891, in render
    return self.environment.handle_exception(exc_info, True)
  File "C:\Python27\lib\site-packages\stallion\templates\system_information.html", line 1, in top-level template code
    {% extends "main.html" %}
  File "C:\Python27\lib\site-packages\stallion\templates\main.html", line 33, in top-level template code
    {% for dist in distributions|sort(attribute="project_name") %}
TypeError: do_sort() got an unexpected keyword argument 'attribute'

Installs simplejson even though not needed.

My machine has Python 2.7.
I installed stallion with pip.
It installed simplejson, even though Python 2.6 and 2.7 have json in the standard library.
It appears stallion doesn't even import json, but uses json indirectly via flask jsonify.
You should consider fixing the dependencies to not install simplejson unless Python 2.5 is detected.

Support Virtual Environments

Provide the ability to choose the virtual environment from the file system. This should respect --no-site-packages

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.