GithubHelp home page GithubHelp logo

pypi / warehouse Goto Github PK

View Code? Open in Web Editor NEW
3.5K 110.0 935.0 359.41 MB

The Python Package Index

Home Page: https://pypi.org

License: Apache License 2.0

JavaScript 2.71% Makefile 0.11% Python 77.49% Mako 0.03% HTML 15.59% Shell 0.19% Dockerfile 0.18% SCSS 3.69% Procfile 0.01%
package-registry package-repository pypi pypi-source python

warehouse's Introduction

Warehouse

Warehouse is the software that powers PyPI. See our development roadmap, documentation, and architectural overview.

Getting Started

You can run Warehouse locally in a development environment using docker. See Getting started documentation for instructions on how to set it up.

The canonical deployment of Warehouse is in production at pypi.org.

Discussion

You can find help or get involved on:

  • Github issue tracker for reporting issues
  • IRC: on Libera, channel #pypa for general packaging discussion and user support, and #pypa-dev for discussions about development of packaging tools
  • The PyPA Discord for live discussions
  • The Packaging category on Discourse for discussing new ideas and community initiatives

Testing

Read the running tests and linters section of our documentation to learn how to test your code. For cross-browser testing, we use an open source account from BrowserStack. If your pull request makes any change to the user interface, it will need to be tested to confirm it works in our supported browsers.

BrowserStackImg_

Code of Conduct

Everyone interacting in the Warehouse project's codebases, issue trackers, chat rooms, and mailing lists is expected to follow the PSF Code of Conduct.

warehouse's People

Contributors

alex avatar berkerpeksag avatar brainwane avatar demianbrecht avatar dependabot[bot] avatar di avatar divbzero avatar domenkozar avatar dstufft avatar ewdurbin avatar ewjoachim avatar facutuesca avatar ghickman avatar github-actions[bot] avatar hugovk avatar lgh2 avatar miketheman avatar nlhkabu avatar patelneel55 avatar pradyunsg avatar pypi-combine-prs[bot] avatar pyup-bot avatar ristomcgehee avatar sterbo avatar trishankkarthik avatar waseem18 avatar webknjaz avatar weblate avatar wlonk avatar woodruffw 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  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

warehouse's Issues

Port Existing XMLRPC API

  • list_packages
  • package_releases
  • release_urls
  • release_data
  • search
  • browse
  • updated_releases
  • changelog
  • changelog_last_serial
  • changelog_since_serial
  • changed_packages
  • release_downloads
  • package_roles
  • user_packages
  • package_hosting_mode
  • top_packages
  • list_packages_with_serial

Deduplicate Mainainers

If a user has both the maintainer and the owner role for a package they will show up twice in the Maintainers list. This should be set to be a distinct query so that they only show up once.

Ensure usernames are case insensitive

This is a current issue on PyPI. Usernames are case sensitive so I can have dstufft, Dstufft, etc.

We need to both make sure this cannot happen in Warehouse, and figure out what sort of transition plan we will use.

Implement OpenID Logins

PyPI allows logging in via OpenID, we need to either implement this or deprecate it and provide a migration path.

Implement a Fastly Utility Decorator

Copy and Pasting the Surrogate-Key handling code all over the place is far from optimal, we should figure out how to turn it into a decorator (ideally) or at the very least make it a utility function that can be called.

Implement a UI

The current PyPI UI is pretty horrible. Crate tried to improve on this but while it's an improvement it's not all that great itself. Perhaps we can find a really great designer/ux person to contribute?

Here's a list of UI centric routes from the current PyPI to give an idea of what sort of views we need.

  • home
  • browse
  • index
  • search
  • display_pkginfo
  • remove_pkg
  • pkg_edit
  • submit_form
  • display
  • register_form
  • user
  • user_form
  • forgotten_password_form, forgotten_password
  • password_reset, pw_reset, pw_reset_change
  • role, role_form
  • list_classifiers
  • login, logout
  • files
  • urls
  • show_md5
  • addkey, delkey
  • about
  • /mirrors
  • /security

Existing Package Upload APIs

  • submit - Submit metadata
  • submit_pkg_info - Submit metadata as a PKG-INFO file
  • file_upload - Upload a File
  • doc_upload - Upload documentation

Switch to South

Once models settle down a bit and it makes sense to, we need to switch from syncdb to using South for migrations.

Prevent cacading deletes in the packaging app

Cascading deletes make it easier to programatically delete whole packages (or releases). While this is convenient it does mean that that we must protect against the case where we don't want to allow cascaded deletes.

On the other hand if we prevent cascading deletes that forces people to be explicit by default if they want to delete whole chunks of data and that seems like a better option to me.

Implement CSP

Ideally the entire site will be protected by a CSP policy. However because of the admin we might need to exclude /admin from that, at least until the Django admin no longer uses inline javascript or CSS.

X-Powered-By Headers

It'd be useful to add a X-Powered-By header to enable easily checking to see what version of Warehouse is running.

Figure out an assest pipeline

For development ease css & js will be in multiple files and unoptimized. Figured out a decent asset pipeline to use to handle both development and production.

Clean database of UNKNOWN and validates against it

Currently the database is littered with "UNKNOWN". This "helpfully" comes from distutils who will fill it in for a missing required value. We should strip these from the database and strip it from new incoming data.

Implement OpenID Provider

PyPI offers the ability to be an OpenID provider, we need to add this feature to Warehouse or deprecate it from PyPI itself.

Logging configuration

There's already some logging being done by the app - the web requests. There will be more logging done explicitly by code as users do things (dumb things or good things).

I'm going to add a new section to the configuration file called logging which will have the following structure (closely mirroring the standard logging configuration file structure, but not requiring us to actually have a separate INI syntax file).

logging:
    formatters:
        simpleFormater:
            format: '%(asctime)s - %(levelname)s: %(message)s'
            datefmt: '%Y/%m/%d %H:%M:%S'

    handlers:
        console:
            class: logging.StreamHandler
            formatter: simpleFormater
            level: DEBUG
            stream: ext://sys.stdout
        file:
            class : logging.FileHandler
            formatter: simpleFormater
            level: WARNING
            filename: output.log

    loggers:
        clogger:
            level: DEBUG
            handlers: [console]
        flogger:
            level: WARNING
            handlers: [file]

    root:
        level: DEBUG
        handlers: [console, file]

This example is way more complex than I imagine any given configuration would actually be.

This configuration is then loaded with some code like:

# config = loaded yaml config
logging_conf = config['logging']
logging_conf.setdefault('version', 1)
logging.config.dictConfig(logging_conf)

For a more concrete dev configuration I anticipate something like:

logging:
    handlers:
        console:
            class: logging.StreamHandler
            level: DEBUG
            stream: ext://sys.stdout

    root:
        level: DEBUG
        handlers: [console]

(which will hopefully work; actual results may vary of course given it's the logging module we're talking about)

Inform Users of Latest Version

When the users are manually on a page other than the latest version, they should get a link/message telling them that and pointing them to the latest version.

Port Existing APIs to Warehouse

  • The "Simple" API (/simple/)
  • The Package URLs (/packages/)
  • The daytime URL (/daytime) (Is this something we need?)
  • XMLRPC #59
  • JSON (/pypi/<packagename>/json)
  • RSS (Includes "Last Hour", and "Packages")
  • DOAP (Is this something we need?)
  • Explicit URLs (Do we need a legacy copy of this?)
  • Package Upload APIs #57

Verify ownership of GPG key

Currently there's no verification that a person owns the GPG key they claim they do. We should verify this before allowing this key.

Show reverse dependencies on the package page

When using wheel and twine to upload a package, PyPI and Warehouse will have information about the dependencies of said package. It would be very nice to be able to look up the reverse relationship, the dependents, on the package's listing in Warehouse.

Handle the case where there is no long_description

Long description can be None instead of "". Right now this cases an exception.

Stacktrace (most recent call last):

  File "raven/middleware.py", line 31, in __call__
    iterable = self.application(environ, start_response)
  File "site-packages/guard.py", line 62, in __call__
    return self.application(environ, _start_response)
  File "warehouse/middleware.py", line 28, in __call__
    return self.app(environ, _start_response)
  File "werkzeug/wsgi.py", line 40, in <lambda>
    return update_wrapper(lambda *a: f(*a)(*a[-2:]), f)
  File "warehouse/application.py", line 260, in wsgi_app
    return view(self, request, **kwargs)
  File "warehouse/utils.py", line 90, in wrapper
    resp = fn(app, request, *args, **kwargs)
  File "warehouse/utils.py", line 173, in wrapper
    resp = fn(app, request, *args, **kwargs)
  File "warehouse/packaging/views.py", line 78, in project_detail
    description_html = htmlize(release["description"])
  File "recliner/renderer.py", line 152, in htmlize
    html = render(text)
  File "recliner/renderer.py", line 108, in render
    settings_overrides=settings,
  File "docutils/core.py", line 448, in publish_parts
    enable_exit_status=enable_exit_status)
  File "docutils/core.py", line 662, in publish_programmatically
    output = pub.publish(enable_exit_status=enable_exit_status)
  File "docutils/core.py", line 217, in publish
    self.settings)
  File "docutils/readers/__init__.py", line 71, in read
    self.input = self.source.read()
  File "docutils/io.py", line 426, in read
    return self.decode(self.source)
  File "docutils/io.py", line 99, in decode
    data_encoding = self.determine_encoding_from_data(data)
  File "docutils/io.py", line 142, in determine_encoding_from_data
    if data.startswith(start_bytes):

Resolving this issue should resolve https://app.getsentry.com/pypi/warehouse/group/9475461/ as well.

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.