Code Monkey home page Code Monkey logo

Comments (10)

nikolas avatar nikolas commented on June 18, 2024 1

@eli-schwartz I have fixed the problem reported by @abulte: version 0.8.0 doesn't work on Mac OS.

Sorry everyone about the namespace confusion, I was holding off on pushing out this change because I was afraid of breaking everything, but basically here's where we're at:

  • Use commonmark 0.7.x if you rely on CommonMark package name.
  • Use commonmark >=0.8.1 if you're relying on the commonmark package name, which will be the norm from here on out.

Open specific tickets if you have any suggestions, but I'm closing this one because it looks like the package is working on Mac OS again, as of 0.8.1.

from commonmark.py.

kislyuk avatar kislyuk commented on June 18, 2024

We are facing the same problem.

It seems that the package namespace was rearranged and the API has changed in a breaking way. When this happens, it's best practice to update the major version. Ideally commonmark 0.x.x should retain the old API, while commonmark 1.x.x should incorporate the breaking namespace changes.

from commonmark.py.

abulte avatar abulte commented on June 18, 2024

More info after a few tests: if I clone the repo and install the package with pip install ., the package is correctly installed in site-packages/commonmark and import commonmark will work OK. Apparently this bug only happens if you install from pypi.

from commonmark.py.

nikolas avatar nikolas commented on June 18, 2024

Thanks for the report, and apologies for the problem.

The intention here was to maintain some backwards compatibility by making the CommonMark directory a symlink to commonmark. It looks like this isn't necessary, isn't working correctly with python packaging mechanisms, and also breaks compatibility with case-insensitive filesystems (biolab/orange3#3234, though.... what filesystem is case-insensitive? :P)

I will just remove the CommonMark symlink for good - we should only be relying on commonmark for simplicity.

from commonmark.py.

nikolas avatar nikolas commented on June 18, 2024

I've released a new 0.8.1 version of this package. I'm using Linux so I can't tell whether the problem with macOS is fixed.

One thing I still need to fix: on PyPI's website, the package name is still CommonMark, even if you try to visit the lower-cased version here: https://pypi.org/project/commonmark/

However, the version that I just uploaded on test.pypi.org is correct: https://test.pypi.org/project/commonmark/

I don't see a setting for this in PyPI's interface, so I'm going to contact them and see how I can change this. I've created an issue for this problem here: pypi/warehouse#4679

from commonmark.py.

edmorley avatar edmorley commented on June 18, 2024

Our Read the docs builds have just started failing (using commonmark 0.8.1), with:

Traceback (most recent call last):
  File "/home/docs/checkouts/readthedocs.org/user_builds/treeherder/envs/latest/local/lib/python2.7/site-packages/sphinx/config.py", line 161, in __init__
    execfile_(filename, config)
  File "/home/docs/checkouts/readthedocs.org/user_builds/treeherder/envs/latest/local/lib/python2.7/site-packages/sphinx/util/pycompat.py", line 150, in execfile_
    exec_(code, _globals)
  File "/home/docs/checkouts/readthedocs.org/user_builds/treeherder/envs/latest/local/lib/python2.7/site-packages/six.py", line 709, in exec_
    exec("""exec _code_ in _globs_, _locs_""")
  File "<string>", line 1, in <module>
  File "conf.py", line 2, in <module>
    from recommonmark.parser import CommonMarkParser
  File "/home/docs/checkouts/readthedocs.org/user_builds/treeherder/envs/latest/src/recommonmark/recommonmark/parser.py", line 9, in <module>
    from CommonMark import Parser
ImportError: No module named CommonMark

Please can this breaking change be reverted and released in a point release, then the change relanded for a new major version bump?

from commonmark.py.

abulte avatar abulte commented on June 18, 2024

Thanks 🙇 for taking care of this @nikolas. I can confirm that 0.8.1is 👌 on my environment.

I also agree with @edmorley that this change (alias removal) should be introduced in a new major.

from commonmark.py.

anthraxx avatar anthraxx commented on June 18, 2024

@nikolas the symlink removal broke every Linux distro packaging and the PEP complience change actually ruined compatibility with anything that depends on the modules (like python-recommonmark)

What is your plan for the situation, commit to PEP complience without symlinks and force all depending packages to be fixed? This would be important to know before pinging such libraries to fix the import and at the end you maybe revert to cammel case module and depending packages need to revert as well.
Please clarify the situation with the module names so we can either start pinging people or just chill out until its back to the old one... either way a final decision is what i'm looking for.

from commonmark.py.

eli-schwartz avatar eli-schwartz commented on June 18, 2024

Thanks for the report, and apologies for the problem.

But... you're not fixing the problem?

The intention here was to maintain some backwards compatibility by making the CommonMark directory a symlink to commonmark. It looks like this isn't necessary, isn't working correctly with python packaging mechanisms, and also breaks compatibility with case-insensitive filesystems (biolab/orange3#3234, though.... what filesystem is case-insensitive? :P)

What is a symlink supposed to do in the first place? How is it not necessary to provide compatibility anyway?

I will just remove the CommonMark symlink for good - we should only be relying on commonmark for simplicity.

But then you completely break API in a point release which is not fixing things.

It's not exactly challenging to provide a module under two names. Since I guess Arch Linux won't be foolish enough to update to new versions of commonmark any time soon, I can trivially get the intention of your whole change, simply by creating a new, toplevel module called "commonmark.py" containing the following import:

from CommonMark import *

And unlike CommonMark 0.8.1 it works.

Please unbreak your everything.

Also, camelcase is not really offensive to me and I don't understand the original feature request in the first place... but it's unquestionably failed to do anything it intended at all. Instead you're seeing projects pin the old version or simply remove commonmark support at all due to intolerably working nowhere.

from commonmark.py.

nikolas avatar nikolas commented on June 18, 2024

@anthraxx yeah - the idea is if you're depending on the old CommonMark namespace then just stay at version 0.7.x.

from commonmark.py.

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.