{"id":2519,"date":"2017-05-27T14:38:31","date_gmt":"2017-05-27T12:38:31","guid":{"rendered":"http:\/\/blog.gocept.com\/?p=2519"},"modified":"2017-12-05T08:20:28","modified_gmt":"2017-12-05T07:20:28","slug":"move-documentation-from-pythonhosted-org-to-readthedocs-io","status":"publish","type":"post","link":"https:\/\/blog.gocept.com\/2017\/05\/27\/move-documentation-from-pythonhosted-org-to-readthedocs-io\/","title":{"rendered":"Move documentation from pythonhosted.org to readthedocs.io"},"content":{"rendered":"

Today we migrated the documentation of zodb.py3migrate<\/a>\u00a0from\u00a0pythonhosted.org<\/a>\u00a0to\u00a0zodbpy3migrate.readthedocs.io<\/a>.<\/p>\n

This requires a directory \u2013 for this example I name it redir<\/em>\u00a0\u2013 containing a file named index.html<\/em> with the following content:<\/p>\n

<html>\n<head>\n <title>zodb.py3migrate<\/title>\n <meta http-equiv=\"refresh\"\n       content=\"0; url=http:\/\/zodbpy3migrate.rtfd.io\" \/>\n<\/head>\n<body>\n  <p>\n    <a href=\"http:\/\/zodbpy3migrate.rtfd.io\">\n      Redirect to zodbpy3migrate.rtfd.io\n    <\/a>\n  <\/p>\n<\/body>\n<\/html><\/pre>\n

To upload it to\u00a0pythonhosted.org<\/a>\u00a0I called:<\/p>\n

py27 setup.py upload_docs --upload-dir=redir<\/pre>\n

Now\u00a0pythonhosted.org\/zodb.py3migrate<\/a>\u00a0points to read the docs.<\/p>\n

Credits: The HTML was taken from the\u00a0Trello board of the avocado-framework<\/a>.<\/p>\n

UPDATE: <\/strong>The approach described here no longer works as the required API has been shut down. See\u00a0pypa\/warehouse#582<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"

Today we migrated the documentation of zodb.py3migrate\u00a0from\u00a0pythonhosted.org\u00a0to\u00a0zodbpy3migrate.readthedocs.io. This requires a directory \u2013 for this example I name it redir\u00a0\u2013 containing a file named index.html with the following content: <html> <head> <title>zodb.py3migrate<\/title> <meta http-equiv=”refresh” content=”0; url=http:\/\/zodbpy3migrate.rtfd.io” \/> <\/head> <body> <p> <a href=”http:\/\/zodbpy3migrate.rtfd.io”&gt<\/a>; Redirect to zodbpy3migrate.rtfd.io <\/a> <\/p> <\/body> <\/html> To upload it to\u00a0pythonhosted.org\u00a0I called: py27 setup.py … Continue reading “Move documentation from pythonhosted.org to readthedocs.io”<\/span><\/a><\/p>\n","protected":false},"author":15344399,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_coblocks_attr":"","_coblocks_dimensions":"","_coblocks_responsive_height":"","_coblocks_accordion_ie_support":"","advanced_seo_description":"","jetpack_seo_html_title":"","jetpack_seo_noindex":false,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_newsletter_tier_id":0,"footnotes":"","jetpack_publicize_message":"","jetpack_is_tweetstorm":false,"jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false}}},"categories":[10221],"tags":[19551,1158,832,63218474,925995,581],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_likes_enabled":true,"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/pFP3y-ED","jetpack-related-posts":[{"id":1540,"url":"https:\/\/blog.gocept.com\/2016\/09\/02\/zodb-py3migrate-1\/","url_meta":{"origin":2519,"position":0},"title":"zodb.py3migrate: Migrate an existing ZODB Data.fs to be used with Python 3","author":"Michael Howitz","date":"September 2, 2016","format":false,"excerpt":"At\u00a0Berlin Strategic sprint 2016\u00a0we\u00a0developed a tool to analyze a ZODB Filestorage to find\u00a0Python 2 string objects. If\u00a0they are in an encoding besides ASCII this is\u00a0preventing using this Filestorage with Python 3 because of decoding errors arising on loading the pickles. The tool is even able to convert those strings either\u2026","rel":"","context":"In "en"","block_context":{"text":"en","link":"https:\/\/blog.gocept.com\/category\/en\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":3229,"url":"https:\/\/blog.gocept.com\/2018\/06\/07\/migrate-a-zope-zodb-data-fs-to-python-3\/","url_meta":{"origin":2519,"position":1},"title":"Migrate a Zope ZODB Data.fs to Python 3","author":"Michael Howitz","date":"June 7, 2018","format":false,"excerpt":"TL;DR Use\u00a0zodbupdate. Problem A ZODB\u00a0Data.fs\u00a0which was created under Python 2 cannot be opened under Python 3. This is prevented by using a different magic code in the first bytes of the file. This is done on purpose because str\u00a0has a different meaning for the two Python versions: Under Python 2\u2026","rel":"","context":"In "en"","block_context":{"text":"en","link":"https:\/\/blog.gocept.com\/category\/en\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/blog.gocept.com\/wp-content\/uploads\/2018\/06\/spring-3383890_1280.jpg?fit=1200%2C797&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/blog.gocept.com\/wp-content\/uploads\/2018\/06\/spring-3383890_1280.jpg?fit=1200%2C797&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/blog.gocept.com\/wp-content\/uploads\/2018\/06\/spring-3383890_1280.jpg?fit=1200%2C797&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/blog.gocept.com\/wp-content\/uploads\/2018\/06\/spring-3383890_1280.jpg?fit=1200%2C797&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/blog.gocept.com\/wp-content\/uploads\/2018\/06\/spring-3383890_1280.jpg?fit=1200%2C797&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":1558,"url":"https:\/\/blog.gocept.com\/2016\/09\/05\/zope-in-the-python-3-wonderland\/","url_meta":{"origin":2519,"position":2},"title":"Zope in the Python 3 wonderland","author":"Michael Howitz","date":"September 5, 2016","format":false,"excerpt":"A little tale Once upon the time there was the\u00a0big mighty Zope II. It was one of the leaders in the Python land. It had mighty features like TTW (trough the web) development\u00a0and its own object oriented database. Many\u00a0people liked Zope II and trusted it to be the basis for\u2026","rel":"","context":"In "en"","block_context":{"text":"en","link":"https:\/\/blog.gocept.com\/category\/en\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":2632,"url":"https:\/\/blog.gocept.com\/2017\/09\/22\/earl-zope-ii-is-dead-long-live-earl-zope\/","url_meta":{"origin":2519,"position":3},"title":"Earl Zope II is dead, long live Earl Zope","author":"Michael Howitz","date":"September 22, 2017","format":false,"excerpt":"Zope 4.0b1 released","rel":"","context":"In "en"","block_context":{"text":"en","link":"https:\/\/blog.gocept.com\/category\/en\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/blog.gocept.com\/wp-content\/uploads\/2017\/09\/pexels-photo-68806-e1506067407549.jpg?fit=1200%2C832&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/blog.gocept.com\/wp-content\/uploads\/2017\/09\/pexels-photo-68806-e1506067407549.jpg?fit=1200%2C832&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/blog.gocept.com\/wp-content\/uploads\/2017\/09\/pexels-photo-68806-e1506067407549.jpg?fit=1200%2C832&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/blog.gocept.com\/wp-content\/uploads\/2017\/09\/pexels-photo-68806-e1506067407549.jpg?fit=1200%2C832&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/blog.gocept.com\/wp-content\/uploads\/2017\/09\/pexels-photo-68806-e1506067407549.jpg?fit=1200%2C832&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":120,"url":"https:\/\/blog.gocept.com\/2011\/11\/03\/assertion-helper-for-zope-testbrowser-and-unittest\/","url_meta":{"origin":2519,"position":4},"title":"Assertion helper for zope.testbrowser and unittest","author":"","date":"November 3, 2011","format":false,"excerpt":"zope.testbrowser is a valuable tool for integration tests. Historically,\u00a0 the Zope community used to write quite a lot of doctests, but we at gocept have found them to be rather clumsy and too often yielding neither good tests nor good documentation. That's why we don't use doctest much anymore, and\u2026","rel":"","context":"In "en"","block_context":{"text":"en","link":"https:\/\/blog.gocept.com\/category\/en\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":2789,"url":"https:\/\/blog.gocept.com\/2017\/10\/25\/testing-zope-4beta2\/","url_meta":{"origin":2519,"position":5},"title":"Migrating from Zope 2.13 to 4.0b2","author":"Michael Howitz","date":"October 25, 2017","format":false,"excerpt":"Beta-Testing Zope 4 together with PerFact Innovation","rel":"","context":"In "en"","block_context":{"text":"en","link":"https:\/\/blog.gocept.com\/category\/en\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"_links":{"self":[{"href":"https:\/\/blog.gocept.com\/wp-json\/wp\/v2\/posts\/2519"}],"collection":[{"href":"https:\/\/blog.gocept.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.gocept.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.gocept.com\/wp-json\/wp\/v2\/users\/15344399"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.gocept.com\/wp-json\/wp\/v2\/comments?post=2519"}],"version-history":[{"count":25,"href":"https:\/\/blog.gocept.com\/wp-json\/wp\/v2\/posts\/2519\/revisions"}],"predecessor-version":[{"id":3203,"href":"https:\/\/blog.gocept.com\/wp-json\/wp\/v2\/posts\/2519\/revisions\/3203"}],"wp:attachment":[{"href":"https:\/\/blog.gocept.com\/wp-json\/wp\/v2\/media?parent=2519"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.gocept.com\/wp-json\/wp\/v2\/categories?post=2519"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.gocept.com\/wp-json\/wp\/v2\/tags?post=2519"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}