peterbe / premailer

Turns CSS blocks into style attributes
https://premailer.io
BSD 3-Clause "New" or "Revised" License
1.06k stars 188 forks source link

Add allow_insecure_ssl option for request.get() on external URLs #232

Closed majortom731 closed 4 years ago

majortom731 commented 4 years ago

Added a new option and cmdline switch called 'allow_insecure_ssl' which, when enabled, will cause request.get() to be called with verify=False as additional parameter.

coveralls commented 4 years ago

Coverage Status

Coverage remained the same at 100.0% when pulling 4f1be99caf897b39ae07d2d84f7a471308c1f185 on majortom731:master into 9a0480470fd389b8477e69eab5b0015fe1190395 on peterbe:master.

majortom731 commented 4 years ago

Hi! Glad you like it!

Well, insecure is what it is...The idea is taken from the curl commandline tool, where it is called "--insecure". But I can change it to "--skip-verify" if you like that better...

Github's travis CI reports a failed build because the py34 test env uses an incompatible libxml or something. Is that important?

peterbe commented 4 years ago

Any idea how to solve (in a separate issue or PR) the problem of the lxml install in tox?

majortom731 commented 4 years ago

Hmm... I found out here that python 3.4 support was dropped in version 4.4.0 of lxml. So I tried to force tox to use the lxml version before 4.4.0 for the py34 env like this (in tox.ini): [testenv:py34] deps = lxml<=4.3.5 Seems to work...

peterbe commented 4 years ago

If you prefer the name allow_insecure_ssl I'm not going to block. Go for it.

However, what you need to do is to add a mention of this on the README (in two places!)

Also, in the CHANGES.rst can you add a new section with the headline called dev. Then, when I make a release next I'll replace the word dev with the next number.

dev
-----

* Write your change here...
majortom731 commented 4 years ago

Had to fiddle around with git a little, but now I think it's ready, all in 1 commit.

The tox.ini change is in #233

peterbe commented 4 years ago

You don't need to squash your commits. I'll do that when I merge. But you'll now need to rebase so the tests don't fail.

majortom731 commented 4 years ago

Sorry, I'm still new to this. :) Now ok?

peterbe commented 4 years ago

I'll make a new release for this See https://github.com/peterbe/premailer/pull/234