Giter Site home page Giter Site logo

python 3 support about pepper HOT 9 CLOSED

saltstack avatar saltstack commented on August 9, 2024
python 3 support

from pepper.

Comments (9)

whiteinge avatar whiteinge commented on August 9, 2024

No work yet but many thoughts. Python 3 support would be very cool and probably not too much work. It will also easily allow concurrent operations that aren't easily done in Python 2. I've written an asyncio function to consume the HTTP stream from salt-api and something like that would be a great addition to Pepper. It would allow us to display live minion returns on the Pepper CLI as they come in to Salt in addition to all the programmatic utility of watching the event stream via libpepper.

from pepper.

sijis avatar sijis commented on August 9, 2024

@whiteinge I'm gonna be poking around the libpepper.py file as i currently have a dependency on it right now. I briefly tried but setup.py flipped out about the version not being compliant.

the asyncio stuff sounds fantastic.

You should see some hack/attempt in the next day or so from me.

from pepper.

sijis avatar sijis commented on August 9, 2024

I'm still having some issues with setup.py, as the version isn't pep-0440 compliant (I probably have to do something with git tag/describe).

I'll probably submit another PR or two as i work through this.

from pepper.

whiteinge avatar whiteinge commented on August 9, 2024

from pepper.

sijis avatar sijis commented on August 9, 2024

The exception here https://github.com/saltstack/pepper/blob/master/pepper/__init__.py seems to gather version details post-install. It's just looking for the version.json file.

The simplest thing I can think of is manually adding the version to the json fie, including the project metadata you want added.

Moving the git hash would definitely help.

from pepper.

whiteinge avatar whiteinge commented on August 9, 2024

The idea is:

  1. If you're running Pepper out of the Git repo directly (for development) that file calls out to git describe on request by calling into the setup.py file.
  2. If you run setup.py sdist for PyPI or to make an installer it runs git describe and stores the result in version.json.

We could keep that same workflow with the following changes:

  1. Look to see if -g exists in the git describe output. If so,

  2. Break the output of git describe into it's constituent parts:

    >>> re.search('(?P<version>.*)-(?P<num_commits>[0-9]+)-g(?P<sha>[0-9a-fA-F]+)', '0.3.0-22-g867a264').groupdict()
    {'num_commits': '22', 'sha': '867a264', 'version': '0.3.0'}
  3. Modify the setup.py file to only put sha into the setup_kwargs metadata maybe as git_hash and assemble the actual version number with the pep-recommended "dev" text and use the number of commits as the incrementer. E.g., 0.3.0-dev22.

Do you think that would work?

from pepper.

sijis avatar sijis commented on August 9, 2024

I think its a solid idea.

from pepper.

whiteinge avatar whiteinge commented on August 9, 2024

Added!

from pepper.

whiteinge avatar whiteinge commented on August 9, 2024

Per fbe6886 and #64 let's declare Python 3 support a thing and any problems from here on out will be considered bugs.

from pepper.

Related Issues (20)

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.