[Python-modules-commits] [python3-openid] 01/04: import python3-openid.orig.tar.gz

Barry Warsaw barry at moszumanska.debian.org
Tue Nov 10 02:23:25 UTC 2015


This is an automated email from the git hooks/post-receive script.

barry pushed a commit to branch master
in repository python3-openid.

commit bbf69423b63e79992b7a6ff11b34b493e1e39409
Author: Barry Warsaw <barry at python.org>
Date:   Mon Nov 9 21:20:04 2015 -0500

    import python3-openid.orig.tar.gz
---
 .gitignore                                         |    8 +
 .travis.yml                                        |   10 +
 CHANGES.md                                         |   43 +
 LICENSE                                            |  202 ++
 MANIFEST.in                                        |    7 +
 NEWS.md                                            |  239 +++
 README.md                                          |   53 +
 admin/builddiscover.py                             |   77 +
 admin/fixperms                                     |   10 +
 admin/gettlds.py                                   |   70 +
 admin/runtests                                     |  204 ++
 admin/setversion                                   |    7 +
 background-associations.txt                        |   96 +
 contrib/associate                                  |   47 +
 contrib/openid-parse                               |  151 ++
 contrib/upgrade-store-1.1-to-2.0                   |  170 ++
 dev-requirements.txt                               |    3 +
 examples/README                                    |   91 +
 examples/__init__.py                               |    0
 examples/consumer.py                               |  499 +++++
 examples/discover                                  |   46 +
 examples/djopenid/README                           |   54 +
 examples/djopenid/__init__.py                      |    0
 examples/djopenid/consumer/__init__.py             |    0
 examples/djopenid/consumer/models.py               |    3 +
 examples/djopenid/consumer/urls.py                 |    9 +
 examples/djopenid/consumer/views.py                |  226 ++
 examples/djopenid/manage.py                        |   11 +
 examples/djopenid/server/__init__.py               |    0
 examples/djopenid/server/models.py                 |    3 +
 examples/djopenid/server/tests.py                  |  103 +
 examples/djopenid/server/urls.py                   |   12 +
 examples/djopenid/server/views.py                  |  280 +++
 examples/djopenid/settings.py                      |   87 +
 examples/djopenid/templates/consumer/index.html    |  127 ++
 .../djopenid/templates/consumer/request_form.html  |    5 +
 examples/djopenid/templates/index.html             |   28 +
 examples/djopenid/templates/server/endpoint.html   |   15 +
 examples/djopenid/templates/server/idPage.html     |   14 +
 examples/djopenid/templates/server/index.html      |   51 +
 .../templates/server/pape_request_info.html        |   21 +
 examples/djopenid/templates/server/trust.html      |   51 +
 examples/djopenid/templates/xrds.xml               |   17 +
 examples/djopenid/urls.py                          |    8 +
 examples/djopenid/util.py                          |  153 ++
 examples/djopenid/views.py                         |   13 +
 examples/server.py                                 |  729 +++++++
 openid/__init__.py                                 |   46 +
 openid/association.py                              |  554 +++++
 openid/codecutil.py                                |   90 +
 openid/consumer/__init__.py                        |    6 +
 openid/consumer/consumer.py                        | 1919 +++++++++++++++++
 openid/consumer/discover.py                        |  471 +++++
 openid/consumer/html_parse.py                      |  277 +++
 openid/cryptutil.py                                |  154 ++
 openid/dh.py                                       |   47 +
 openid/extension.py                                |   50 +
 openid/extensions/__init__.py                      |    5 +
 openid/extensions/ax.py                            |  783 +++++++
 openid/extensions/draft/__init__.py                |    0
 openid/extensions/draft/pape2.py                   |  281 +++
 openid/extensions/draft/pape5.py                   |  477 +++++
 openid/extensions/sreg.py                          |  518 +++++
 openid/fetchers.py                                 |  503 +++++
 openid/kvform.py                                   |  129 ++
 openid/message.py                                  |  655 ++++++
 openid/oidutil.py                                  |  211 ++
 openid/server/__init__.py                          |    6 +
 openid/server/server.py                            | 1820 +++++++++++++++++
 openid/server/trustroot.py                         |  456 +++++
 openid/sreg.py                                     |    7 +
 openid/store/__init__.py                           |    8 +
 openid/store/filestore.py                          |  392 ++++
 openid/store/interface.py                          |  197 ++
 openid/store/memstore.py                           |  125 ++
 openid/store/nonce.py                              |   98 +
 openid/store/sqlstore.py                           |  518 +++++
 openid/test/__init__.py                            |  184 ++
 openid/test/cryptutil.py                           |  115 ++
 openid/test/data/accept.txt                        |  118 ++
 openid/test/data/example-xrds.xml                  |   14 +
 .../test/data/openid-1.2-consumer-sqlitestore.db   |  Bin 0 -> 7168 bytes
 openid/test/data/test1-discover.txt                |  137 ++
 openid/test/data/test1-parsehtml.txt               |  152 ++
 openid/test/data/test_discover/openid.html         |   11 +
 openid/test/data/test_discover/openid2.html        |   11 +
 openid/test/data/test_discover/openid2_xrds.xml    |   12 +
 .../test_discover/openid2_xrds_no_local_id.xml     |   11 +
 openid/test/data/test_discover/openid_1_and_2.html |   11 +
 .../data/test_discover/openid_1_and_2_xrds.xml     |   16 +
 .../openid_1_and_2_xrds_bad_delegate.xml           |   17 +
 .../test/data/test_discover/openid_and_yadis.html  |   12 +
 .../data/test_discover/openid_no_delegate.html     |   10 +
 openid/test/data/test_discover/unicode.html        |    9 +
 openid/test/data/test_discover/unicode3.html       |   17 +
 openid/test/data/test_discover/yadis_0entries.xml  |   12 +
 .../data/test_discover/yadis_2_bad_local_id.xml    |   15 +
 .../data/test_discover/yadis_2entries_delegate.xml |   22 +
 .../test/data/test_discover/yadis_2entries_idp.xml |   21 +
 .../data/test_discover/yadis_another_delegate.xml  |   14 +
 openid/test/data/test_discover/yadis_idp.xml       |   12 +
 .../test/data/test_discover/yadis_idp_delegate.xml |   13 +
 .../test/data/test_discover/yadis_no_delegate.xml  |   11 +
 openid/test/data/test_etxrd/README                 |   12 +
 .../data/test_etxrd/delegated-20060809-r1.xrds     |   34 +
 .../data/test_etxrd/delegated-20060809-r2.xrds     |   34 +
 .../test/data/test_etxrd/delegated-20060809.xrds   |   34 +
 openid/test/data/test_etxrd/no-xrd.xml             |    7 +
 openid/test/data/test_etxrd/not-xrds.xml           |    2 +
 openid/test/data/test_etxrd/prefixsometimes.xrds   |   34 +
 openid/test/data/test_etxrd/ref.xrds               |  109 +
 openid/test/data/test_etxrd/sometimesprefix.xrds   |   34 +
 openid/test/data/test_etxrd/spoof1.xrds            |   25 +
 openid/test/data/test_etxrd/spoof2.xrds            |   25 +
 openid/test/data/test_etxrd/spoof3.xrds            |   37 +
 openid/test/data/test_etxrd/status222.xrds         |    9 +
 openid/test/data/test_etxrd/subsegments.xrds       |   58 +
 .../test/data/test_etxrd/valid-populated-xrds.xml  |   39 +
 openid/test/data/trustroot.txt                     |  149 ++
 openid/test/datadriven.py                          |   37 +
 openid/test/dh.py                                  |   75 +
 openid/test/dhpriv                                 |   29 +
 openid/test/discoverdata.py                        |  134 ++
 openid/test/kvform.py                              |  182 ++
 openid/test/linkparse.py                           |  114 ++
 openid/test/linkparse.txt                          |  584 ++++++
 openid/test/n2b64                                  |  650 ++++++
 openid/test/oidutil.py                             |  197 ++
 openid/test/storetest.py                           |  400 ++++
 openid/test/support.py                             |   69 +
 openid/test/test_accept.py                         |  127 ++
 openid/test/test_association.py                    |  181 ++
 openid/test/test_association_response.py           |  351 ++++
 openid/test/test_auth_request.py                   |  212 ++
 openid/test/test_ax.py                             |  632 ++++++
 openid/test/test_codecutil.py                      |   21 +
 openid/test/test_consumer.py                       | 2151 ++++++++++++++++++++
 openid/test/test_discover.py                       |  844 ++++++++
 openid/test/test_etxrd.py                          |  202 ++
 openid/test/test_examples.py                       |  183 ++
 openid/test/test_extension.py                      |   36 +
 openid/test/test_fetchers.py                       |  336 +++
 openid/test/test_htmldiscover.py                   |   23 +
 openid/test/test_message.py                        | 1073 ++++++++++
 openid/test/test_negotiation.py                    |  271 +++
 openid/test/test_nonce.py                          |  104 +
 openid/test/test_openidyadis.py                    |  165 ++
 openid/test/test_pape.py                           |   10 +
 openid/test/test_pape_draft2.py                    |  217 ++
 openid/test/test_pape_draft5.py                    |  442 ++++
 openid/test/test_parsehtml.py                      |   89 +
 openid/test/test_rpverify.py                       |  246 +++
 openid/test/test_server.py                         | 2063 +++++++++++++++++++
 openid/test/test_services.py                       |   23 +
 openid/test/test_sreg.py                           |  495 +++++
 openid/test/test_symbol.py                         |   35 +
 openid/test/test_urinorm.py                        |   57 +
 openid/test/test_verifydisco.py                    |  275 +++
 openid/test/test_xri.py                            |  102 +
 openid/test/test_xrires.py                         |   40 +
 openid/test/test_yadis_discover.py                 |  183 ++
 openid/test/trustroot.py                           |   87 +
 openid/test/urinorm.txt                            |   87 +
 openid/urinorm.py                                  |  161 ++
 openid/yadis/__init__.py                           |   17 +
 openid/yadis/accept.py                             |  133 ++
 openid/yadis/constants.py                          |   13 +
 openid/yadis/discover.py                           |  167 ++
 openid/yadis/etxrd.py                              |  316 +++
 openid/yadis/filters.py                            |  207 ++
 openid/yadis/manager.py                            |  194 ++
 openid/yadis/parsehtml.py                          |  204 ++
 openid/yadis/services.py                           |   54 +
 openid/yadis/xri.py                                |  123 ++
 openid/yadis/xrires.py                             |  123 ++
 pylintrc                                           |   40 +
 run_tests.sh                                       |    6 +
 setup.cfg                                          |    3 +
 setup.py                                           |   55 +
 tox.ini                                            |   14 +
 180 files changed, 32139 insertions(+)

diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..2425b0a
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,8 @@
+*~
+*.pyc
+*.swp
+.tox
+MANIFEST
+dist/
+.envrc
+.direnv
diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 0000000..bdb9711
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,10 @@
+language: python
+
+python:
+  - 3.3
+  - 3.2
+
+install:
+  - pip install --use-mirrors Django==1.5
+  - python setup.py install
+script: ./run_tests.sh
diff --git a/CHANGES.md b/CHANGES.md
new file mode 100644
index 0000000..eb107a3
--- /dev/null
+++ b/CHANGES.md
@@ -0,0 +1,43 @@
+
+As of 3.0.0:
+
+* API changes
+  * SQLStore implementations no longer create or use a 'settings'
+    table
+  * SRegResponse.fromSuccessResponse returns None when no signed
+    arguments were found
+  * Added functions to generate request/response HTML forms with
+    auto-submission javascript
+      * Consumer (relying party) API: AuthRequest.htmlMarkup
+      * Server API: server.OpenIDResponse.toHTML
+  * PAPE (Provider Authentication Policy Extension) module
+      * Updated extension for specification draft 2
+      * Request.fromSuccessResponse returns None if PAPE response
+        arguments were not signed
+
+* New features
+  * Demo server now supports OP-driven identifier selection
+  * Demo consumer now has a "stateless" option
+  * Fetchers now only read/request first megabyte of response
+
+* Bug fixes
+  * NOT NULL constraints were added to SQLStore tables where
+    appropriate
+  * message.fromPostArgs: use query.items() instead of iteritems(),
+    fixes #161 (Affects Django users)
+  * check_authentication requests: copy entire response, not just
+    signed fields.  Fixes missing namespace in check_authentication
+    requests
+  * Consumer._verifyDiscoveryResults: fall back to OpenID 1.0 type if
+    1.1 endpoint cannot be found; fixes discovery verification bug for
+    certain OpenID 1 identifiers
+  * SQLStore._execSQL: convert unicode arguments to str to avoid
+    postgresql api bug with unicode objects (Thanks to Marek Kuziel.)
+  * MySQLStore: Use ENGINE instead of TYPE when creating tables
+  * server.OpenIDResponse.toFormMarkup: Use return_to from the
+    request, not the response fields (Not all responses (i.e. cancel,
+    setup_needed) include a return_to field.)
+  * server.AssociationRequest.answer: include session_type in
+    no-encryption assoc responses
+  * OpenIDServiceEndpoint.getDisplayIdentifier: Don't include the
+    fragment in display identifiers.
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..d645695
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,202 @@
+
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
diff --git a/MANIFEST.in b/MANIFEST.in
new file mode 100644
index 0000000..72957b5
--- /dev/null
+++ b/MANIFEST.in
@@ -0,0 +1,7 @@
+include LICENSE NOTICE CHANGELOG MANIFEST.in NEWS.md background-associations.txt
+graft admin
+graft contrib
+recursive-include examples README.md discover *.py *.html *.xml
+recursive-include openid/test *.txt dhpriv n2b64 *.py
+recursive-include openid/test/data *
+recursive-include doc *.css *.html
diff --git a/NEWS.md b/NEWS.md
new file mode 100644
index 0000000..f09bfa6
--- /dev/null
+++ b/NEWS.md
@@ -0,0 +1,239 @@
+What's New in Python3-OpenID 3.0.2
+=================================
+
+All the tests that require no more than the standard library pass -- however
+modules that depend on external packages (such as the pyCURL fetcher or the
+MySQL / PostgreSQL stores) haven't been updated and may not work.
+
+
+What's New in Python3-OpenID 3.0.1
+=================================
+
+This implementation of OpenID has been ported to Python 3 -- all but one test
+is known to pass.
+
+What's New in Python OpenID 2.1.0
+=================================
+
+This implementation of OpenID has been upgraded to support version 2.0
+of the OpenID Authentication specification.
+
+New in this version is:
+
+ * Verification of relying party return_to addresses, to screen out RPs
+   hiding behind open redirect relays.  Server code can invoke this with
+   the returnToVerified method on CheckIDRequest.
+
+ * Helper module for the Provider Authentication Policy Extension (PAPE) in
+   openid.extensions.pape.
+
+ * Helper module for Attribute Exchange in openid.extensions.ax.
+
+Bugfixes:
+
+ * Allow the use of lxml as an ElementTree implemenation.
+
+ * Provide compatability with a wider range of versions for SQL stores.
+
+
+Upgrading from 2.0.1
+--------------------
+
+The third argument to Consumer.complete() is required.
+
+The sreg module should be imported from openid.extensions.sreg instead of
+openid.sreg.
+
+The ax module should likewise be imported from openid.extensions.ax
+instead of openid.ax
+
+The openid.extensions.ax.FetchRequest.fromOpenIDRequest method now
+takes a CheckIDRequest object instead of a Message object
+
+The OpenID response (the result of Consumer.complete()) now has a
+getDisplayIdentifier() method which should be called instead of
+accessing response.identity_url.  The value of getDisplayIdentifier()
+will be the XRI i-name if XRI is used.  The value of
+response.identity_url SHOULD, however, be used as the application's
+database key for storing account information.
+
+What's New in Python OpenID 2.0
+===============================
+
+The big news here is compatibility with svn revision 313 of the OpenID 2.0
+draft specification.
+
+Highlights include:
+
+ * Simple Registration support in a new module openid.sreg.  (Those
+   previously using SuccessResponse.extensionResponse are advised to
+   look here.)
+ * OpenID provider-driven identifier selection.
+ * "Negotiators" allow you to define which association types to use.
+ * Examples for Django.
+
+Dependencies
+------------
+
+Python 2.5 is now supported.  Support for Python 2.2 discontinued.
+Seperate installation of yadis and urljr packages is no longer
+required; they have been included in this package.
+
+
+Upgrading from 1.1 or 1.2
+-------------------------
+
+One of the additions to the OpenID protocol was a specified nonce
+format for one-way nonces.  As a result, the nonce table in the store
+has changed.  You'll need to run contrib/upgrade-store-1.1-to-2.0 to
+upgrade your store, or you'll encounter errors about the wrong number
+of columns in the oid_nonces table.
+
+If you've written your own custom store or code that interacts directly with it,
+you'll need to review the change notes in openid.store.interface.
+
+Consumers should now pass an additional parameter to Consumer.complete()
+to defend against return_to tampering.
+
+
+What's New in Python OpenID 1.1.2
+=================================
+
+i-name Support
+--------------
+
+This version of the library allows the use of XRI as OpenID identifiers,
+allowing users to log in with their i-names.  For full XRI compatibility,
+relying parties integrating this library should take note of the user's
+CanonicalID, as described in the "Identifying the End User" section of the
+OpenID 2.0 specification.
+
+Bug Fixes
+---------
+
+A variety of bug fixes were included in this release, mostly relating to
+international issues such as dealing with other character sets, Unicode,
+incorrectly flagging certain Norwegian trust roots as suspect, and operation
+of the filesystem-backed store on exotic platforms.
+
+Dependencies
+------------
+
+ * urljr 1.0.1
+ * yadis 1.1.0
+
+
+What's New in Python OpenID 1.1.0
+=================================
+
+Version 1.1 of the Python OpenID library implements recent changes to
+the OpenID specification as well as making API changes that should
+make integration with applications easier.
+
+Yadis Support
+-------------
+
+One of the major changes to OpenID since the last release has been the
+approval of Yadis discovery as the preferred way to specify the OpenID
+metadata for an identity URL instead of using <link> tags in
+HTML. This library does Yadis discovery, and if that fails, it falls
+back to old-style discovery.
+
+Some advantages of Yadis support are:
+
+ * Support for fallback if your primary OpenID provider is not available
+
+ * Support for load-balancing between OpenID servers
+
+ * Easy interoperability for different identity services
+
+For more information about Yadis, see http://yadis.org/
+
+Extension Support
+-----------------
+
+OpenID also has formalized support for extensions. Extensions are a
+mechanism for transferring information from the consumer to the server
+and from the server to the consumer in the process of performing
+OpenID authentication. Extensions are implemented as additional
+namespaced query arguments that go along with standard OpenID requests
+and responses. This library provides a simple API for adding extension
+arguments to requests and extracting extension responses from replies.
+
+Dependencies
+------------
+
+These dependencies should be available from wherever you acquired the
+OpenID library.
+
+ * urljr - The fetcher abstraction from the previous OpenID library
+   has been extended and is also used for the Yadis library. Because
+   the Yadis library is useful without the OpenID library, the HTTP
+   fetching code has been rolled into its own package. Additionally,
+   the library now has the concept of a default fetcher to make APIs
+   simpler.
+
+ * yadis - The Yadis library provides a general discovery layer that
+   has been adopted by OpenID as well as other identity-related
+   protocols. Most OpenID identity URLs will work without the Yadis
+   library, but as time goes on, this library will be more and more
+   important.
+
+Consumer API
+------------
+
+The consumer API has been changed for more natural use as well as to
+support extension arguments.
+
+ * OpenIDConsumer(store, [fetcher], [immediate]) is now
+   Consumer(session, store)
+
+  - The session object is a dictionary-like object that should be
+    tied to the requesting HTTP agent, for example, using a session
+    ID cookie. It is used for Yadis fallback and holding the state
+    of the OpenID transaction between the redirect to the server
+    and the response. The values that are placed in the session are
+    namespaced, so there should not be a conflict with other uses
+    of the same session. The session namespace is an attribute of
+    the Consumer object.
+
+  - Because the consumer object now does session management, it is
+    necessary to construct a new consumer object for every
+    request. Creating consumer objects is light-weight.
+
+ * OpenIDConsumer.beginAuth(user_url) is now Consumer.begin(user_url)
+   and either returns an AuthRequest object or raises an
+   exception. There is no more tuple unpacking or status codes.
+
+ * OpenIDConsumer.constructRedirect(authreq, return_to, trust_root) is
+   now AuthRequest.redirectURL(trust_root, return_to, [immediate]).
+
+ * OpenIDConsumer.completeAuth(token, query) is now
+   Consumer.complete(query). It no longer returns a tuple. Instead it
+   returns an object that has a status code and additional information
+   about the response. See the API documentation for more information.
+
+Server API
+----------
+
+The server API has been changed for greater extensibility.  Instead
+of taking an "is_authorized" callback, processing happens in several
+stages, allowing you to insert extension data into the response
+before it is signed and returned.  See the documentation for the
+openid.server.server module.
+
+Fetcher API
+-----------
+
+ * fetcher was openid.consumer.fetchers.OpenIDHTTPFetcher, is now
+   urljr.fetchers.HTTPFetcher.  get() and post() have been replaced by
+   fetch(), see urljr.fetchers for details.
+
+Upgrading from 1.0
+------------------
+
+The server changed the way it indexes associations in the store, so if
+you're upgrading a server installation, we recommend you clear the old
+records from your store when you do so.  As a consequence, consumers
+will re-establish associations with your server a little sooner than
+they would have otherwise.
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..a1691c8
--- /dev/null
+++ b/README.md
@@ -0,0 +1,53 @@
+*NOTE*: This started out as a fork of the Python OpenID library, with changes
+to make it Python 3 compatible. It's now a port of that library, including
+cleanups and updates to the code in general.
+
+[![Build Status](https://travis-ci.org/necaris/python3-openid.png?branch=master)](https://travis-ci.org/necaris/python3-openid)
+
+# REQUIREMENTS
+
+ - Python 3.x (tested on 3.2, 3.3, 3.4)
+
+# INSTALLATION
+
+The recommended way is to install from PyPI with `pip`:
+
+    pip install python3-openid
+
+Alternatively, you can run the following command:
+
+    python setup.py install
+
+
+# GETTING STARTED
+
+The library should follow the existing `python-openid` API as closely as possible.
+
+*NOTE*: documentation will be auto-generated as soon as I can figure out how to update the documentation tools.
+
+*NOTE*: The examples directory includes an example server and consumer
+implementation.  See the README file in that directory for more
+information on running the examples.
+
+# LOGGING
+
+This library offers a logging hook that will record unexpected
+conditions that occur in library code. If a condition is recoverable,
+the library will recover and issue a log message. If it is not
+recoverable, the library will raise an exception. See the
+documentation for the `openid.oidutil` module for more on the logging
+hook.
+
+# DOCUMENTATION
+
+The documentation in this library is in Epydoc format, which is
+detailed at:
+
+  http://epydoc.sourceforge.net/
+
+# CONTACT
+
+Going forward, the plan is to maintain this library on GitHub, so any bug
+reports, suggestions, and feature requests should be raised [here](issues).
+
+There are also the `#python-openid` and `#openid` channels on FreeNode IRC.
diff --git a/admin/builddiscover.py b/admin/builddiscover.py
new file mode 100755
index 0000000..2837d76
--- /dev/null
+++ b/admin/builddiscover.py
@@ -0,0 +1,77 @@
+#!/usr/bin/env python3
+"""
+Build a set of YADIS identity URL / service discovery files in
+the format for Apache mod_asis -- simple text files containing their
+own HTTP headers.
+
+These can then be used as a basis for testing.
+"""
+
+import sys
+import os.path
+import urllib.parse
+
+from openid.test import discoverdata
+
+manifest_header = """\
+# This file contains test cases for doing YADIS identity URL and
+# service discovery. For each case, there are three URLs. The first
+# URL is the user input. The second is the identity URL and the third
+# is the URL from which the XRDS document should be read.
+#
+# The file format is as follows:
+# User URL <tab> Identity URL <tab> XRDS URL <newline>
+#
+# blank lines and lines starting with # should be ignored.
+#
+# To use this test:
+#
+# 1. Run your discovery routine on the User URL.
+#
+# 2. Compare the identity URL returned by the discovery routine to the
+#    identity URL on that line of the file. It must be an EXACT match.
+#
+# 3. Do a regular HTTP GET on the XRDS URL. Compare the content that
+#    was returned by your discovery routine with the content returned
+#    from that URL. It should also be an exact match.
+
+"""
+
+def buildDiscover(base_url, out_dir):
+    """
+    Convert all files in a directory to apache mod_asis files in
+    another directory.
+    """
+    test_data = discoverdata.readTests(discoverdata.default_test_file)
+
+    def writeTestFile(test_name):
+        """Helper to generate an output data file for a given test name."""
+        template = test_data[test_name]
+
+        data = discoverdata.fillTemplate(
+            test_name, template, base_url, discoverdata.example_xrds)
+
+        out_file_name = os.path.join(out_dir, test_name)
+        out_file = open(out_file_name, 'w', encoding="utf-8")
+        out_file.write(data)
+
+    manifest = [manifest_header]
+    for success, input_name, id_name, result_name in discoverdata.testlist:
+        if not success:
+            continue
+        writeTestFile(input_name)
+
+        input_url = urllib.parse.urljoin(base_url, input_name)
+        id_url = urllib.parse.urljoin(base_url, id_name)
+        result_url = urllib.parse.urljoin(base_url, result_name)
+
+        manifest.append('\t'.join((input_url, id_url, result_url)))
+        manifest.append('\n')
+
+    manifest_file_name = os.path.join(out_dir, 'manifest.txt')
+    with open(manifest_file_name, 'w', encoding="utf-8") as manifest_file:
+        for chunk in manifest:
+            manifest_file.write(chunk)
+
+if __name__ == '__main__':
+    buildDiscover(*sys.argv[1:])
diff --git a/admin/fixperms b/admin/fixperms
new file mode 100755
index 0000000..d0303e1
--- /dev/null
+++ b/admin/fixperms
@@ -0,0 +1,10 @@
+#!/usr/bin/env bash
+cat - <<EOF | xargs chmod +x
+admin/builddiscover.py
+admin/fixperms
+admin/makechangelog
+admin/pythonsource
+admin/runtests
+admin/setversion
+admin/tagrelease
+EOF
\ No newline at end of file
diff --git a/admin/gettlds.py b/admin/gettlds.py
new file mode 100644
index 0000000..579b133
--- /dev/null
+++ b/admin/gettlds.py
@@ -0,0 +1,70 @@
+#!/usr/bin/env python3
+"""
+Fetch the current TLD list from the IANA Web site, parse it, and print
+an expression suitable for direct insertion into each library's trust
+root validation module.
+
+Usage:
+  python gettlds.py (php|python|ruby)
+
+Then cut-n-paste.
+"""
+
+import urllib.request
+import sys
+
+LANGS = {
+    'php': (
+        r"'/\.(",  # prefix
+        "'",  # line prefix
+        "|",  # separator
+        "|' .",  # line suffix
+        r")\.?$/'" # suffix
+    ),
+    'python': (
+        "['",
+        "'",
+        "', '",
+        "',",
+        "']"
+    ),
+    'ruby': (
+        "%w'",
+        "",
+        " ",
+        "",
+        "'"
+    ),
+}
+
+if __name__ == '__main__':
+
+    lang = sys.argv[1]
+    prefix, line_prefix, separator, line_suffix, suffix = LANGS[lang]
+
+    iana_url = 'http://data.iana.org/TLD/tlds-alpha-by-domain.txt'
+
+    with urllib.request.urlopen(iana_url) as iana_resource:
+        tlds = []
+        output_line = ""  # initialize a line of output
+
+        for input_line in iana_resource:
+            if input_line.startswith(b'#'):  # skip comments
+                continue
+
+            tld = input_line.decode("utf-8").strip().lower()
+            nxt_output_line = output_line + prefix + tld  # update current line
+
+            if len(nxt_output_line) > 60:
+                # Long enough -- print it and reinitialize to only hold the
+                # most recent TLD
+                print(output_line + line_suffix)
+                output_line = line_prefix + tld
+            else:
+                # Not long enough, so update it to the concatenated version
+                output_line = nxt_output_line
+
+            prefix = separator
+
+    # Print the final line of remaining output
+    print(output_line + suffix)
diff --git a/admin/runtests b/admin/runtests
new file mode 100755
index 0000000..b2a3a79
--- /dev/null
+++ b/admin/runtests
@@ -0,0 +1,204 @@
+#!/usr/bin/env python
+import os.path, sys, warnings
+
+test_modules = [
+    'cryptutil',
+    'oidutil',
+    'dh',
+    ]
+
+def fixpath():
+    try:
+        d = os.path.dirname(__file__)
+    except NameError:
+        d = os.path.dirname(sys.argv[0])
+    parent = os.path.normpath(os.path.join(d, '..'))
+    if parent not in sys.path:
+        print "putting %s in sys.path" % (parent,)
+        sys.path.insert(0, parent)
+
+def otherTests():
+    failed = []
+    for module_name in test_modules:
+        print 'Testing %s...' % (module_name,) ,
+        sys.stdout.flush()
+        module_name = 'openid.test.' + module_name
+        try:
... 32393 lines suppressed ...

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/python3-openid.git



More information about the Python-modules-commits mailing list