https://bz.mercurial-scm.org/show_bug.cgi?id=6689

            Bug ID: 6689
           Summary: hgWeb installed via PIP on IIS breaks when updating to
                    Python 3.x
           Product: Mercurial
           Version: 6.1.1
          Hardware: PC
                OS: Windows
            Status: UNCONFIRMED
          Severity: feature
          Priority: wish
         Component: hgweb
          Assignee: bugzi...@mercurial-scm.org
          Reporter: leonha...@fosber.com
                CC: mercurial-devel@mercurial-scm.org
    Python Version: ---

Created attachment 2139
  --> https://bz.mercurial-scm.org/attachment.cgi?id=2139&action=edit
Screencap of the error message received

Environment:

* Windows Server 2019 or 2022 with IIS Role installed.
** CGI and ISAPI restrictions role features are installed
* Python 2.7.18 installed to directory c:\Python27
* Python 3.10.4 installed to directory c:\Python310
* Mercurial package installed via "pip install mercurial" for the appropriate
Python version
* hgweb.cgi file taken from repository, only modifications are the "shebang"
line on top to point to the Python executables (which doesn't seem to do
anything in IIS) and the config path.

Background:

I have a Mercurial version 6.1.1 site running on Python 2.7 that is serving
repositories as expected. To upgrade the Python version, I expected to be able
to install Python 3.10 , navigate to c:\python310\scripts, run the command "pip
install mercurial", and update my web.config and hgweg.cgi files to point to
the new Python version's executable.

This procedure to upgrade the Python version (minus the web.config part) works
when using ApacheLounge to host the content. When I try it in IIS, I receive
this error message:

**********
The specified CGI application misbehaved by not returning a complete set of
HTTP headers. The headers it did return are "Traceback (most recent call
last):File "C:\inetpub\HGWEB_FOSBERSPE\hgweb.cgi", line 22, in
<module>wsgicgi.launch(application)File
"c:\Python310\lib\site-packages\mercurial\hgweb\wsgicgi.py", line 24, in
launchprocutil.setbinary(procutil.stdin)File
"c:\Python310\lib\site-packages\mercurial\windows.py", line 316, in setbinaryif
fno is not None and fno() >= 0: io.UnsupportedOperation: fileno ".
**********

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Reply via email to