GithubHelp home page GithubHelp logo

Comments (4)

hayne avatar hayne commented on May 3, 2024

I hadn't realized that the form submission software was using some sort of markup - it changed the double underscores in my reference to the version attribute to make it bold instead.

from markupsafe.

mitsuhiko avatar mitsuhiko commented on May 3, 2024

You can get the version from pgk_resources.

from markupsafe.

hayne avatar hayne commented on May 3, 2024

Perhaps you could explain more fully how to get the version number using 'pkg_resources'.
As far as I can see, 'pkg_resources' is useful for getting info about a package that is about to be installed.

But what I need is a way to find out the version number of the currently installed 'markupsafe'
so I can indicate to the user if it is necessary to update to a more recent version.

It would be nice if 'markupsafe' would provide a 'version' string attribute - this is done by almost all Python modules. (underscore underscore version underscore underscore)

from markupsafe.

kevinchabreck avatar kevinchabreck commented on May 3, 2024

It would be nice if 'markupsafe' would provide a 'version' string attribute - this is done by almost all Python modules. (underscore underscore version underscore underscore)

Seconded. A call to markupsafe.__version__ should return the version of markupsafe. This is explicitly mentioned in the version bookkeeping section section of the PEP 8 style guide for Python code:

Version Bookkeeping

If you have to have Subversion, CVS, or RCS crud in your source file, do it as follows.

__version__ = "$Revision: 2132f8d8bcb4 $"
# $Source$

These lines should be included after the module's docstring, before any other code, separated by a blank line above and below.

from markupsafe.

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.