D2854: hgweb: use our forked wsgiheaders module instead of stdlib one

2018-04-12 Thread durin42 (Augie Fackler)
This revision was automatically updated to reflect the committed changes.
Closed by commit rHGda84e26d85ed: hgweb: use our forked wsgiheaders module 
instead of stdlib one (authored by durin42, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D2854?vs=8074&id=8076

REVISION DETAIL
  https://phab.mercurial-scm.org/D2854

AFFECTED FILES
  mercurial/hgweb/request.py

CHANGE DETAILS

diff --git a/mercurial/hgweb/request.py b/mercurial/hgweb/request.py
--- a/mercurial/hgweb/request.py
+++ b/mercurial/hgweb/request.py
@@ -8,7 +8,6 @@
 
 from __future__ import absolute_import
 
-import wsgiref.headers as wsgiheaders
 #import wsgiref.validate
 
 from ..thirdparty import (
@@ -289,6 +288,7 @@
 if k.startswith('HTTP_'):
 headers.append((k[len('HTTP_'):].replace('_', '-'), v))
 
+from . import wsgiheaders # avoid cycle
 headers = wsgiheaders.Headers(headers)
 
 # This is kind of a lie because the HTTP header wasn't explicitly
@@ -378,6 +378,7 @@
 self._startresponse = startresponse
 
 self.status = None
+from . import wsgiheaders # avoid cycle
 self.headers = wsgiheaders.Headers([])
 
 self._bodybytes = None



To: durin42, #hg-reviewers, indygreg
Cc: indygreg, mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


D2854: hgweb: use our forked wsgiheaders module instead of stdlib one

2018-04-12 Thread durin42 (Augie Fackler)
durin42 updated this revision to Diff 8074.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D2854?vs=8009&id=8074

REVISION DETAIL
  https://phab.mercurial-scm.org/D2854

AFFECTED FILES
  mercurial/hgweb/request.py

CHANGE DETAILS

diff --git a/mercurial/hgweb/request.py b/mercurial/hgweb/request.py
--- a/mercurial/hgweb/request.py
+++ b/mercurial/hgweb/request.py
@@ -8,7 +8,6 @@
 
 from __future__ import absolute_import
 
-import wsgiref.headers as wsgiheaders
 #import wsgiref.validate
 
 from ..thirdparty import (
@@ -289,6 +288,7 @@
 if k.startswith('HTTP_'):
 headers.append((k[len('HTTP_'):].replace('_', '-'), v))
 
+from . import wsgiheaders # avoid cycle
 headers = wsgiheaders.Headers(headers)
 
 # This is kind of a lie because the HTTP header wasn't explicitly
@@ -378,6 +378,7 @@
 self._startresponse = startresponse
 
 self.status = None
+from . import wsgiheaders # avoid cycle
 self.headers = wsgiheaders.Headers([])
 
 self._bodybytes = None



To: durin42, #hg-reviewers, indygreg
Cc: indygreg, mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


D2854: hgweb: use our forked wsgiheaders module instead of stdlib one

2018-04-12 Thread indygreg (Gregory Szorc)
indygreg requested changes to this revision.
indygreg added a comment.
This revision now requires changes to proceed.


  This one caused an import cycle: `Import cycle: mercurial.hgweb.__init__ -> 
mercurial.hgweb.hgweb_mod -> mercurial.hgweb.request -> 
mercurial.hgweb.__init__`

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D2854

To: durin42, #hg-reviewers, indygreg
Cc: indygreg, mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


D2854: hgweb: use our forked wsgiheaders module instead of stdlib one

2018-04-11 Thread durin42 (Augie Fackler)
durin42 updated this revision to Diff 8009.
durin42 edited the summary of this revision.
durin42 retitled this revision from "hgweb: str/bytes followups after 
indygreg's refactoring" to "hgweb: use our forked wsgiheaders module instead of 
stdlib one".

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D2854?vs=7020&id=8009

REVISION DETAIL
  https://phab.mercurial-scm.org/D2854

AFFECTED FILES
  mercurial/hgweb/request.py

CHANGE DETAILS

diff --git a/mercurial/hgweb/request.py b/mercurial/hgweb/request.py
--- a/mercurial/hgweb/request.py
+++ b/mercurial/hgweb/request.py
@@ -8,7 +8,6 @@
 
 from __future__ import absolute_import
 
-import wsgiref.headers as wsgiheaders
 #import wsgiref.validate
 
 from ..thirdparty import (
@@ -19,6 +18,9 @@
 pycompat,
 util,
 )
+from . import (
+wsgiheaders,
+)
 
 class multidict(object):
 """A dict like object that can store multiple values for a key.



To: durin42, #hg-reviewers, indygreg
Cc: indygreg, mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel