Commit Graph

1168 Commits

Author SHA1 Message Date
Erol Keskin 0852ee0f38
Merge pull request #460 from TheOneandOnlyJakfrost/develop
Update about.rst
2022-10-04 20:05:26 +03:00
Stephen Snow d4b30ef536
Update about.rst
fedmsg link was incorrect and needed updating
2022-10-03 21:27:41 -04:00
mscherer f7d845c207
Merge pull request #452 from mscherer/add_ignore_coverage
Add ignore coverage
2021-09-24 14:33:38 +02:00
Michael Scherer 7e676b2450 Ignore coverage data
Seems to be generated by sphinx
2021-09-24 14:24:42 +02:00
mscherer b61f63f832
Merge pull request #439 from mscherer/fix_500_rss
Fix URL generation for RSS
2021-09-09 17:45:25 +02:00
mscherer 344c5db880
Merge pull request #446 from mairin/develop
Updating with the new Fedora logo
2021-09-09 17:44:30 +02:00
mscherer 307cf5f81d
Merge pull request #448 from mscherer/add_default_value_cookie
Add a default value for secure cookie
2021-09-09 17:44:04 +02:00
mscherer 97a430ae23
Merge pull request #449 from mscherer/remove_fedmenu
Remove fedmenu, fix #445
2021-09-09 17:43:43 +02:00
Michael Scherer 45a56a4202 Fix URL generation for RSS
We have a bunch of 500 errors since URL like generate
a link to user/misc?history_limit=42/rss, which in turn cause trouble
since 42/rss can't be turned into a int, generating a traceback:

    File "/usr/lib/python2.7/site-packages/pyramid/", line 163, in handle_request
      response = view_callable(context, request)
    File "/usr/lib/python2.7/site-packages/pyramid/config/", line 355, in rendered_view
      result = view(context, request)
    File "/usr/lib/python2.7/site-packages/pyramid/config/", line 501, in _requestonly_view
      response = view(request)
    File "/usr/lib/python2.7/site-packages/tahrir/", line 1042, in user
      history_limit = int(request.params.get('history_limit', 10))
  ValueError: invalid literal for int() with base 10: '42/rss'
2021-09-09 17:43:24 +02:00
Michael Scherer 2c4078cf17 Remove fedmenu, fix #445 2021-09-09 17:35:54 +02:00
Michael Scherer 1580e7557a Add a default value for secure cookie 2021-09-09 17:35:39 +02:00
mscherer c6ee2a1b0b
Merge pull request #450 from mscherer/github_action
Add github actions tests
2021-09-09 17:34:17 +02:00
Michael Scherer 3e235746c3 Port to new version of zope.sqlalchemy
inspired by
2021-09-09 17:08:57 +02:00
Michael Scherer d72f516162 Get tahrir-api from git 2021-09-09 17:01:03 +02:00
Michael Scherer 7719b49940 Make the code work on Pyramid >= 1.10
UnencryptedCookieSessionFactoryConfig was deprecated in 1.10, and
removed on 2.0
2021-09-09 16:10:38 +02:00
Michael Scherer 30f2bb966f Add github actions tests 2021-09-09 15:51:28 +02:00
Máirín Duffy 0dda8a80c5 Updating with the new Fedora logo 2021-07-22 15:48:29 -04:00
heis2201 30a9789d63
Update footer.rst (#442)
Trying to make clear which one is the issue tracker for content (the actual badges)
2020-05-28 13:09:19 -04:00
Xavier Lamien 5b46b23c6d
Merge pull request #432 from fedora-infra/bugfix/#430
Update OpenBadge Issuer API script url
2019-10-17 13:26:27 +02:00
Xavier Lamien 769325b10b Update OpenBadge Issuer API script url 2019-10-04 03:07:20 +02:00
Adam Williamson 17841107c0 Initial Python 3 port
This does enough Python 3 porting to make Tahrir run and do some
basic stuff under Python 3 - I've tested creating badges and
series, issuing badges, clicking around in Leaderboard and
Explore, looking at RSS and JSON views of things. This does not
break Python 2 compatibility - I'd rather not do that yet so we
can test things easily both ways and identify any differences.
We could remove Python 2 compat later.

Most of the changes are based on 2to3 suggestions and are pretty
self-explanatory. Some less obvious ones:

* The str_to_bytes and dogpile stuff: well, see . The
`sha1_mangle_key` mangler that we're using, which is provided by
dogpile, needs input as a bytestring. This is pretty awkward. It
obviously caused *some* problems even in Python 2 (as this app
explicitly uses unicodes in some places), but in Python 3 it's
worse; everywhere you see `str_to_bytes` being called is a place
where I found a crash because we wound up sending a non-encoded
`str` to `sha1_mangle_key` (or, in the case of `email_md5` and
`email_sha1`, to hashlib directly).

* map moved in Python 3; 2to3 suggests handling it with a six
move, but I preferred just replacing all the `map` uses with

* 2to3 recommended a change to strip_tags, but I noticed it is
not actually used any more. It was used to sanitize HTML input
to the admin route back when it was added, but the admin route
was entirely rewritten later and the use of strip_tags was taken
out. So I just removed strip_tags and its supporting players.

* merge_dicts is used in places where we were merging two dicts
in a single expression by converting them to lists, combining
the lists, and turning the combined list back into a dict again.
You can still do this in Python 3 but you have to add extra
`list()` calls and it gets really ugly. Per
it's also not resource-efficient, so this seems like a better
approach - it's informed by the code in that SO question but I
wrote the function myself rather than taking one from that page
to avoid technically having a tiny bit of CC-BY-SA code in this
AGPL project.

Signed-off-by: Adam Williamson <>
2019-08-12 21:53:39 +02:00
Adam Williamson ab7e22621b Port feed generation from webhelpers to feedgen
webhelpers is abandoned and doesn't work on Python 3.

Signed-off-by: Adam Williamson <>
2019-08-12 21:53:39 +02:00
Adam Williamson a3b98164c7 Drop unused import of foafutils
The code that used it was removed long ago, this wasn't.

Signed-off-by: Adam Williamson <>
2019-08-12 21:53:39 +02:00
Adam Williamson 9d091544b9 Remove weberror from requires
We stopped using it long ago, but didn't remove it here.

Signed-off-by: Adam Williamson <>
2019-08-12 21:53:39 +02:00
Michael Scherer 86145748f8
Merge pull request #429 from mscherer/remove_gplus
Remove gplus integration
2019-08-10 17:45:04 +02:00
Michael Scherer c5963d71b5 Remove gplus integration
G+ is closed since 4 month now
2019-08-10 17:35:21 +02:00
Brian 'Redbeard' Harrington 57c58b60ab docs: Update Open Badges links
Update all links to move from the mozilla wiki to

Additionally, add a historic note and (since the link to the mozilla
wiki is in danger of being purged) changing it to a specific revision in
the history.

In tandem this page was put in the Wayback machine hosted by the
Internet Archive in the event of link rot:

Resolves #424

Signed-off-by: Brian 'Redbeard' Harrington <>
2019-04-18 20:45:00 +02:00
Clement Verna ab42d0fb26 Use the develop branch in the README links
Signed-off-by: Clement Verna <>
2019-02-01 20:40:11 +01:00
Clement Verna 5ee82ffa31 Update Vagrant environment
Signed-off-by: Clement Verna <>
2019-02-01 20:29:10 +01:00
Clement Verna ee6da348d6 Drop support for foaf format.
Foaf format is not very popular and dropping support
removes quite a bit of code from tahrir

Signed-off-by: Clement Verna <>
2019-02-01 20:23:18 +01:00
Clement Verna 1e05796cfa Update the contribution guidelines.
Fixes #392

Signed-off-by: Clement Verna <>
2019-02-01 20:22:51 +01:00
Randy Barlow 72480d5fb5 Add a .cico.pipeline file.
This commit adds the file that CentOS CI will look for to add CI
testing on Tahrir pull requests.

Signed-off-by: Randy Barlow <>
2019-01-21 08:34:57 -05:00
Randy Barlow 21d4b8f4a1 Add tox as a test runner.
This commit adds tox as the Tahrir test runner. It ensures that
the unit tests pass, that new code has test coverage, and that the
docs build.

Signed-off-by: Randy Barlow <>
2019-01-21 08:34:57 -05:00
Randy Barlow 99ce3f042f Add a test suite.
Tahrir did not have a test suite. This commit adds a single test
to get Tahrir started on the road to glory.

Signed-off-by: Randy Barlow <>
2019-01-21 08:34:57 -05:00
Randy Barlow 0bfca2ac54 Fix some Sphinx documentation warnings.
Sphix emits a warning if two links use the same target name. For
example, prior to this commit there was a Sphinx warning:

docs/index.rst:2:Duplicate explicit target name: "here".

This commit makes it so there are no Sphinx warnings in the docs

Signed-off-by: Randy Barlow <>
2019-01-21 08:34:57 -05:00
Sayan Chowdhury 4578b98e53
Merge pull request #385 from ralphbean/prelim-python3
Some preliminary python3 changes.
2018-04-11 22:25:09 +05:30
Sayan Chowdhury 82253543cd
Merge pull request #386 from ralphbean/excise-tw2
Exorcise tw2.
2018-04-11 22:19:26 +05:30
Sayan Chowdhury b8bbfdf36a
Merge pull request #384 from ralphbean/excise-moksha-wsgi
Exorcise moksha.wsgi.
2018-04-11 11:30:57 +05:30
Ralph Bean 84c1373497 Exorcise tw2.
This includes the work to get rid of moksha.wsgi from #384, but additionally gets rid of tw2.
2018-04-05 00:06:42 -04:00
Ralph Bean 32dc707951 Exorcise moksha.wsgi.
The backend bits of moksha are py3 ready, but the moksha.wsgi piece is not, plus it has some hairy deps that still need to be ported:

Let's retire it.  Removing it here to facilitate that.
2018-04-05 00:04:50 -04:00
Ralph Bean 6b8e9f2d3c Some preliminary python3 changes. 2018-04-04 23:37:53 -04:00
Patrick Uiterwijk 6049939e62
Merge pull request #377 from fedora-infra/optionalasserts
Don't calculate badge stats when getting user badges
2018-01-16 21:49:07 +01:00
Patrick Uiterwijk 4ddba0ac90 Don't calculate badge stats when getting user badges
For people with many badges, this brings down the user json generation
from >50 seconds to <4 seconds.

Signed-off-by: Patrick Uiterwijk <>
2018-01-16 21:19:08 +01:00
Sayan Chowdhury 2cc7edc814 Merge branch 'release/0.9.2' into develop 2017-11-21 22:58:19 +05:30
Sayan Chowdhury 163b359351 0.9.2 2017-11-21 22:55:28 +05:30
Peter Oliver 5ea5ae7dc9 Site went away, so update links. 2017-11-09 10:54:39 +01:00
Sayan Chowdhury 7c68b9b221 Merge pull request #368 from fmarier/patch-1
Fix for CSRF errors on
2017-07-29 12:23:55 +05:30
Francois Marier 97ab9d09fd Fix for CSRF errors on
See for the details.
2017-07-27 09:28:06 -07:00
Sayan Chowdhury 28fa434fd5 Merge branch 'release/0.9.1' into develop 2017-04-11 17:56:02 +05:30
Sayan Chowdhury 7076dfdf56 0.9.1 2017-04-11 17:55:13 +05:30