eerohele / sublime-lxml

Package Control lxml dependency
MIT License
5 stars 2 forks source link

Tag versions out-of-sync with lxml version #10

Open writeml opened 5 years ago

writeml commented 5 years ago

It seems to be an unwritten, and only half-followed, convention for Package Control dependencies to be tagged with the module's version number... but doing so can be really beneficial. Take this page, for example: https://packagecontrol.github.io/

It shows each dependency's tag and the current PyPI version side-by-side, so it's easy to tell how far behind any given dependency is (or isn't) from its PyPI module... But of course that only works if the dependency's tag was the version number for the module at the time of the release...

Also, it's clear that the readme for https://github.com/packagecontrol/requests has done the same thing (by including both tags side-by-side in the same way), and many other dependencies' readme files have followed its example...

I'm not saying anything needs to be changed -- but if you update this dependency anytime soon (the current PyPI version is now 4.4.1), can you consider changing to this tagging convention?

Thanks!

eerohele commented 5 years ago

Interesting, thanks for the information!

I don't really use Sublime Text all that much these days, so updating this dependency has admittedly fallen by the wayside. Updating the Windows and 32-bit Linux versions in particular is quite a hassle.

If I get around to it, I'll definitely take this tagging convention into use.

writeml commented 5 years ago

Ignore that branch above -- I accidentally referenced this issue instead of https://github.com/eerohele/sublime-lxml/issues/9 in the commit notes :P I've now updated that work to a new branch with the correct link...

Anyway, thank you for the response! I really appreciate it, and I also completely understand :)

I wonder if I could ask a favor? I've opened a pull-request to add the python-docx module (which I've hosted here: https://github.com/writeml/sublime-docx) as a dependency to Package Control, and that module itself has a dependency on lxml... And your lxml dependency is working just fine for now, but may need to be updated at some unknown point in the future... And I'm willing to take-over maintenance if that need ever arises, but I wouldn't know how...

Is there any chance you can post the instructions here (or possibly in a README in the repo) for how to update this package? Or is there a resource already available online somewhere that explains what I'd need to know, that you can link me to? Even if the steps aren't complete, or are outdated, or are just a summary... any knowledge you could provide would at least point me in the right direction to get started...

Again it may not ever be necessary -- but in the case that it is needed, I would be grateful for the help :) Thanks!

eerohele commented 5 years ago

Thanks for the offer! I'd certainly be happy to give you commit rights to this repository if you're up for it.

The thing is that I've dealt myself a bad hand here and haven't documented the process of updating this package properly. It's been such a long time since the last time I did it that I've forgotten the details.

Luckily, @deathaxe left a valuable comment in this commit. It indicates that downloading the releases from PyPI and dropping them into this repo might be enough. @deathaxe: if you're still around, can you comment whether I'm on the right track, or whether there was more you needed to do?

If the process is that simple, we could probably even come up with a simple script that automates the whole thing.

In any case, I'm certainly willing to figure out the best way to update these dependencies and keep them updated. Any help is much appreciated.

eerohele commented 5 years ago

I think another thing to consider here is that Sublime Text comes bundled with Python 3.3.6:

>>> import sys
>>> sys.version
'3.3.6 (default, Mar 30 2018, 11:14:15) \n[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.57)]'

We therefore have to use an lxml version targeted to that Python version. In practice, that means downloading lxml packages with cp33 in their names. A quick glance suggests that lxml version 4.3 no longer supports Python 3.3, so 4.2.x is probably the newest version we can use. Feel free to double-check that, though.

It might be possible to compile lxml ourselves against Python 3.3.6 (at least for some platforms), but I recall struggling with that for a long time and having to give up in the end.

keith-hall commented 5 years ago

Note that it seems likely that the next Dev build of ST3 - which may be released soon - will have a Python 3.8 environment which plugins can opt into. So plugins wanting to use newer lxml versions may be able to do so without anyone needing to undertake the hassle of compiling lxml manually...

writeml commented 5 years ago

@eerohele @keith-hall That's all really great info -- thanks for being so responsive! :D

Since there's no pressing need ATM for an update here (and in fact it sounds like there's a benefit to waiting a bit, to see if/when ST updates to a newer version of Python) then we can probably just sit on this for now... But it's really reassuring to know that we should be able to move on this pretty easily in the future, as needed...

Thanks again!

eerohele commented 5 years ago

@keith-hall: thanks for the info! I haven't kept up with ST3 development lately, so that's very good to know.

we can probably just sit on this for now

Yeah, I agree. It might not be worth putting a lot of effort into updating lxml until a stable version of ST3 with Python 3.8 is out.

writeml commented 8 months ago

Latest update: There's a new version of Package Control (v4) now, and a new version of the JSON schema for listing packages/dependencies, but the official Package Control site (https://packagecontrol.io) doesn't support the new schema yet, and as a result the documentation there hasn't been updated yet...

Anyway, the most relevant new features to this discussion are:

In fact, you can see this now in the lxml entry that was ported over to the new 'channel/repository.json' (link, and I've included it as a code snippet below)... Which again, isn't the version being shipped by https://packagecontrol.io yet, but can be used manually by following the instructions here: https://github.com/packagecontrol/channel

{
    "name": "lxml",
    "description": "lxml",
    "author": "eerohele",
    "issues": "https://github.com/eerohele/sublime-lxml/issues",
    "releases": [
        {
            "base": "https://github.com/eerohele/sublime-lxml",
            "platforms": ["osx-x64","linux","windows"],
            "python_versions": ["3.3"],
            "tags": true
        },
        {
            "base": "https://pypi.org/project/lxml",
            "asset": "lxml-*-cp38-cp38-macosx_10_15_x86_64.whl",
            "platforms": ["osx-x64"],
            "python_versions": ["3.8"]
        },
        {
            "base": "https://pypi.org/project/lxml",
            "asset": "lxml-*-cp38-cp38-manylinux_2_17_x86_64*.whl",
            "platforms": ["linux-x64"],
            "python_versions": ["3.8"]
        },
        {
            "base": "https://pypi.org/project/lxml",
            "asset": "lxml-*-cp38-cp38-manylinux_2_17_aarch64*.whl",
            "platforms": ["linux-arm64"],
            "python_versions": ["3.8"]
        },
        {
            "base": "https://pypi.org/project/lxml",
            "asset": "lxml-*-cp38-cp38-win_amd64.whl",
            "platforms": ["windows-x64"],
            "python_versions": ["3.8"]
        },
        {
            "base": "https://pypi.org/project/lxml",
            "asset": "lxml-*-cp38-cp38-win32.whl",
            "platforms": ["windows-x32"],
            "python_versions": ["3.8"]
        }
    ]
},