Closed fredericojordan closed 3 years ago
Thanks for this PR
It's my pleasure to contribute 😄
is it going to be released? @olucurious I almost add the same PR, because its still on develop not master.
@Rogalek it's breaking in some environments, can you please help do more testing and share results
@olucurious https://github.com/olucurious/PyFCM/pull/288 - this works for me.
(venv) rogal@rogal-Legion-Y540-15IRH-PG0:~/Documents/repo/PyFCM$ python -m pytest
========================================================================================================================== test session starts ===========================================================================================================================
platform linux -- Python 3.8.6, pytest-6.2.4, py-1.10.0, pluggy-0.13.1
rootdir: /home/rogal/Documents/repo/PyFCM
collected 17 items
tests/test_baseapi.py ......... [ 52%]
tests/test_fcm.py ........ [100%]
=========================================================================================================================== 17 passed in 1.65s ===========================================================================================================================```
@Rogalek
What is your urllib3
version?
I think this only breaks for versions prior to 1.26.0
@fredericojordan I use your latest version and I am getting warnings all the time.
>>> import pyfcm
>>> pyfcm.__version__
'1.5.1'
and the latest version of the urllib3
Python 3.8.0 (default, Nov 23 2019, 05:36:56)
[GCC 8.3.0] on linux
import urllib3
urllib3.__version__
'1.26.5'
@Rogalek Yes, this is because the changes on this PR were reverted on v1.5.1, (see #283).
So v1.5.1 won't have the changes on this PR and should be giving warnings again.
Also, urllib3
is over 1.26.0
, so they already have the new ALLOWED_METHODS options, so they won't break.
If you want to reproduce the issue that had to revert this PR, I guess you'd have to do something like this (haven't tested):
pip install PyFCM==1.5.0
pip install urllib3==1.25.11
python -m pytest
@fredericojordan yes, I understand but I already proposed another solution and it is merged to develop, tests are working if you check my comment with test results.
Oh, I missed #288.
I see that you forced urllib3==1.26.5
, which should solve the problem (maybe urllib3>=1.26.0
could've been an option also).
In this case, develop
should have a working solution, which removes the deprecation warning.
We just need a new release then?
1.5.2 is live https://pypi.org/project/pyfcm/
Thanks for your contributions gentlemen 🙏🏻
@olucurious maybe his version of urllib3 is deprecated? he should check python version and urllib3 version.
I am using the current pyfcm version and everything works perfectly. Warnings not occurs anymore
Python 3.8.0 (default, Nov 23 2019, 05:36:56)
[GCC 8.3.0] on linux
import pyfcm
pyfcm.__version__
'1.5.2'
@olucurious
I haven't been able to fully test it, but I think this might work: #291
This forces urllib3
to be at least 1.26.0
when installing PyFCM, which is the minimum version that contains the option DEFAULT_ALLOWED_METHODS
.
@olucurious I think this should help
Starting on
v1.26.0
, urllib3 has deprecatedRetry(method_whitelist=...)
andRetry.DEFAULT_METHOD_WHITELIST
.