diff-match-patch
diff-match-patch copied to clipboard
pypi release out of date
Hi, The version of diff-match-patch on pypi is pretty out of date (2012-2013): https://pypi.org/project/diff-match-patch/
Do you have the ability to update this?
Nope, never heard of that website before. Sorry.
pypi.org is the standard repository for Python libraries. You can find it linked from the top bar on https://www.python.org/ (it used to be pypi.python.org, that now redirects to pypi.org).
pypi.org is used by all the standard Python tools for packaging and installation (e.g. pip) - see the Python Packaging User Guide. So obviously it would be good if the Python diff-match-patch packages could be put there.
For this reason, quite a few years ago I packaged diff-match-patch for pypi - here - https://pypi.org/project/diff-match-patch/
Seeing as this project now seems to be active again, if the google/diff-match-patch team would like to take over packaging, I'd be very happy for them to do so, and give access to be able to push new releases to pypi.org. The setup.py file I wrote would be a good starting point: https://bitbucket.org/spookylukey/diff-match-patch/src/default/setup.py
This would make more sense than me doing it. Could we re-open this ticket?
@NeilFraser You must be joking
I'm not trying to be disrespectful, but hosting websites have a disturbingly short half-life. During the course of Diff Match Patch's life so far, we've seen the appearance and/or disappearance of PyPI, pip, PyPM, Py3k, npm, code.google.com, SourceForge, GitHub, Closure, Yarn, Bower, Ender, and dozens more. Nearly all my time on this project is devoted to trying to keep the current functionality from degrading as the languages we support and their respective environments shift over time.
If PyPI appears to be stable and healthy, I'll add it to the list of maintenance tasks.
PyPI is indeed stable and healthy. It has been around since shortly after 2002 (I can’t find the exact year/date) and has been the canonical Python package index for some time now.
It was recently was redesigned and moved from a python.org sub domain which may make it seem less familiar. It is now much better 😀
During the course of Diff Match Patch's life so far, we've seen the appearance and/or disappearance of PyPI, [...]
As far as I know PyPi actually predates diff-match-patch by a couple of years (going by the date 2006 in the readme).
It would be very helpful to at least add setup.py to the repository, so it could be easily installed with pip
@spookylukey
Maybe you should just repackage the new version and upload it? Or at least make all necessary changes to setup.py yourself and open a PR? Regardless of the fact that pypi is very old and very mainstream, it's still another hurdle for the author to jump through when updating this code and maybe he has no interest (this isn't a minor factor given the different languages supported in this repo).
@ApproximateIdentity
I'm very happy to upload a new version myself, or preferably to give PyPI permissions to someone who wants to take this on (I no longer actually use the library myself). I'm not going to submit a PR for a setup.py that won't be used or maintained, if @NeilFraser doesn't want to take that on (and that's fine) there is no point doing so.
However, before releasing to PyPI we'd need some clear idea of how versioning is going to work going forward. There used to be regular releases (when it was on code.google.com), using a date based timestamp as the version number. I'm unable to work out what the current version number is, or how it should be determined, if an actual release has been done etc.
I'm not trying to be disrespectful...
@NeilFraser Nope. You're being disrespectful and unhelpful too.
Unfortunately, Python packing isn't wonderfully straightforward, so perhaps @NeilFraser there's someone at Google who could lend you a hand? I know the Google Cloud team does a good job with getting their stuff onto PyPI (here's one example. And PyPI is indeed the place to be for Python packages; I was pretty surprised when I saw only the old unofficial package from @spookylukey.
Since I haven't seen any traction on this, and adding a proper setup.py is not tenable IMO given the directory structure in this repo, I created a new package dmp that repackages diff-match-patch for Python with proper structure, metadata, CI, etc. It also provides seamless support for both py2 and py3 use cases from the same package. The top level import is just dmp, to prevent collision with already-installed versions of diff_match_patch, but is otherwise available for use today with the same API.
PyPI link: https://pypi.org/project/dmp/ Repo: https://github.com/jreese/dmp
I'm open to suggestions on how to integrate this back into diff-match-patch, or in merging it into the existing diff-match-patch package on PyPI – feel free to open issues or PRs on the dmp repo as appropriate.
@jreese - AFAICS what you have done is equivalent to what I had already done in my version, which is hosted here - https://bitbucket.org/spookylukey/diff-match-patch/src I suspect most people using diff-match-patch are using this version I packaged for PyPI.
If you want to take over maintenance of this package, I'm very happy to give you PyPI permissions. The only discussion on this ticket was if Google wanted to take ownership of this package, which it seems like they don't. So, instead of making a new package on PyPI you can take ownership of the existing one. Feel free to use GitHub etc., maintain and package however you want, there is no need to maintain continuity with the existing bitbucket repo in any way, but a new PyPI name doesn't seem to achieve anything, I think?
@spookylukey that works for me. I created the new repo/package name just to get something working when I needed it for other projects, but would be more than happy to take over maintenance of the existing package instead. I'm "jreese" on pypi.org.
@jreese OK great, I've added you as an "Owner", I am no longer needed for anything on this project now. I'm assuming you do not need/want the repo on Bitbucket, please confirm this and I will delete it / make it point to the new repo. Please confirm what the name of that repo will be. For myself, I've usually found it best to create a new organisation for every new library/project I work on, in the knowledge that I often want to stop being maintainer at some point, and then it is easier to add collaborators and involves less link-churn if it is part of a non-personal organisation.
I created https://github.com/diff-match-patch-python/diff-match-patch and pushed my existing module there. I'll update it with the original module name and match the existing versioning scheme. Cheers!
@jreese Any chance of a new PyPI release to pick up the likes of ffe7c7be61a0? I'd have asked over on your new repo but I could not see where to open an issue (maybe I need some covid19 spectacles?).
@ShaheedHaque I'll try to get merge and get a new release out tonight or tomorrow. Looks like I turned issues off by accident when I meant to turn off the wiki 😅 so feel free to request new releases there in the future. Cheers!
Thanks. Perhaps after that this issue can be closed...
@jreese Thanks for the new release, I can confirm the warnings I reported are gone.