@jayvdb I think it's the same as T101682
Applicable grants: High-volume editing, Edit existing pages, Make changes to pages, View your watchlist, Edit your watchlist
@jayvdb done.
I can confirm that it's not a bug in mwoauth. It about how oauthlib and requests-oauth deal with it.
Our login request with OAuth will end up to the following branch in requests-oauthlib:
The description mentions 'several patches under review'. What are those patches?
@jayvdb Done
This is solved by PS17 of T102602.
Thank you @Halfak! I just proposed a new OAuth client. And the old one could be disabled :)
@Addshore, it looks like the OAuth client lacks the two permissions about watch list:
https://travis-ci.org/VcamX/pywikibot-core/jobs/74042992#L743
https://travis-ci.org/VcamX/pywikibot-core/jobs/74042992#L804
Sorry for my careless. I proposed a new client, also the old one could be disabled or expired. Thank you! :)
@jayvdb, for python 2.7.6, it doesn't work.
With respect to T104764, This is the configuration of OAuth client on the beta cluster: http://deployment.wikimedia.beta.wmflabs.org/w/index.php?title=Special:OAuthListConsumers/view/6ad8150a40735dac98d4f07826061cd1&name=&publisher=&stage=0
Thanks @hashar!
The tests seem to work well on the beta cluster :D
It looks more like to be the problem of orain.org... Does it have possibility that requests lib can't adapt to orain.org or the TLS configuration of orain.org?
@Tgr I think you're right.
@jayvdb Only 2.7.0 2.7.0, 2.7.1, 2.7.2
The version (0.8.0) of unittest2 we specify for python 2.6 will work well. So I'd like to use unittest2 0.8.0.
In T106512#1487590, @VcamX wrote:What happened on Python 2.7.0 is so weird.
https://github.com/wikimedia/pywikibot-core/blob/master/tests/namespace_tests.py#L222self.assertEqual(Namespace.resolve([6]), [file_ns])The first argument is what Namespace.resolve([6]) returns, that's a list only containing a Namespace object. The second argument is a list only containing file_ns, that's also a Namespace object.
These two object should be equal:
__eq__ of Namespace: https://github.com/wikimedia/pywikibot-core/blob/master/pywikibot/site.py#L332
[file_ns]: https://ci.appveyor.com/project/VcamX/pywikibot-core/build/1.0.96#L4553
Namespace.resolve([6]): https://ci.appveyor.com/project/VcamX/pywikibot-core/build/1.0.94#L4516If we just test self.assertEqual(Namespace.resolve([6])[0], file_ns), that will be fine.
If we wrap them inside a list, they're not equal.
@hashar, it looks like the OAuth client lacks the two permissions about watch list:
https://travis-ci.org/VcamX/pywikibot-core/jobs/73185512#L741
https://travis-ci.org/VcamX/pywikibot-core/jobs/73185512#L800
Sorry for my careless. I proposed a new client, also the old one could be disabled. Thank you! :)
It seems that the version of OAuth extension on Orain isn't compatible with the latest mwoauth 0.2.4:
https://travis-ci.org/VcamX/pywikibot-core/jobs/73185509#L417
@jayvdb A problem: there is no memcached on toollabs. But memcached is necessary. OAuth relies on memcached for temporary tokens and sessions.
@jayvdb the problem of pip has been fixed by using virtualenv, only test on python 2.7.0 failed.
https://ci.appveyor.com/project/VcamX/pywikibot-core/build/1.0.116
What happened on Python 2.7.0 is so weird.
https://github.com/wikimedia/pywikibot-core/blob/master/tests/namespace_tests.py#L222
self.assertEqual(Namespace.resolve([6]), [file_ns])
The first argument is what Namespace.resolve([6]) returns, that's a list only containing a Namespace object. The second argument is a list only containing file_ns, that's also a Namespace object.
These two object should be equal:
__eq__ of Namespace: https://github.com/wikimedia/pywikibot-core/blob/master/pywikibot/site.py#L332
[file_ns]: https://ci.appveyor.com/project/VcamX/pywikibot-core/build/1.0.96#L4553
Namespace.resolve([6]): https://ci.appveyor.com/project/VcamX/pywikibot-core/build/1.0.94#L4516
Yes. Pip supports environment markers since 6.0 but the pre-installed version in some tests is <6.0.
Reference: https://pip.pypa.io/en/latest/news.html
@Addshore and @jayvdb, I proposed an OAuth consumer on Orain. It'll be used for Pywikibot's OAuth test.
@hashar Thanks! Th new consumer is proposed. I think the old one could be set to disabled or expired.
Hi @hashar. After discussion with @jayvdb, we'd like to use Pywikibot-oauth as an official account for OAuth testing. Could you help me to assign this account to group of Confirmed users so I could propose a new OAuth client? Thank you!
@jayvdb, I think Orain Meta acts as deployment for T104764. It's the cental wiki and has OAuth consumer registration enabled.
@hashar I've proposed a consumer. The callback url of the previous one I proposed is wrong so it could be rejected.
@Ladsgroup I think I'm in tools project now. Can you try to add me to tools.pywikibot-testwiki group again? Thank you!
@XZise Okay, I'll send a new patch for that.
@jayvdb Thanks for your explain! I was stuck in the C implementation of SSLError. It helps me a lot! :D
@jayvdb, 2.7.8 works well, 2.7.10 has the same problem.
@jayvdb @Halfak I submitted a new proposal. The permission requested should be enough for the two basic tests decribed in T74065:
I think it's a platform-specific bug for ssl.SSLError, or a misuse of ssl.SSLError.
I executed the following commands on different platforms:
>>> import ssl >>> class AError(Exception): pass >>> str(ssl.SSLError('a', AError('b')))
and got different results: