Skip to content

bdist_wininst fails on py3k #49326

Closed
Closed

Description

@mhammond
BPO 5076
Nosy @loewis, @mhammond
Files
  • wininst_py3k.patch: use wide strings when necessary on py3k
  • wininst_py3k.patch: updated patch targeting py3k only
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = 'https://github.com/mhammond'
    closed_at = <Date 2009-01-29.13:13:15.517>
    created_at = <Date 2009-01-27.06:03:13.520>
    labels = ['type-bug', 'library']
    title = 'bdist_wininst fails on py3k'
    updated_at = <Date 2009-01-29.19:20:08.028>
    user = 'https://github.com/mhammond'

    bugs.python.org fields:

    activity = <Date 2009-01-29.19:20:08.028>
    actor = 'loewis'
    assignee = 'mhammond'
    closed = True
    closed_date = <Date 2009-01-29.13:13:15.517>
    closer = 'mhammond'
    components = ['Distutils']
    creation = <Date 2009-01-27.06:03:13.520>
    creator = 'mhammond'
    dependencies = []
    files = ['12873', '12886']
    hgrepos = []
    issue_num = 5076
    keywords = ['patch']
    message_count = 8.0
    messages = ['80622', '80632', '80637', '80662', '80692', '80726', '80762', '80778']
    nosy_count = 2.0
    nosy_names = ['loewis', 'mhammond']
    pr_nums = []
    priority = 'high'
    resolution = 'fixed'
    stage = 'commit review'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue5076'
    versions = ['Python 3.0', 'Python 3.1']

    Activity

    1. mhammond commented on Jan 27, 2009

      @mhammond
      ContributorAuthor

      bdist_wininst installers created by py3k fail due to PySys_SetArgv and
      Py_SetProgramName both being passed 'char *' strings instead of wide
      strings.

      The patch is against the svn trunk as currently Python 2.x and 3.x share
      the same bdist_wininst stub. The patch doesn't change the behaviour on
      Python 2.x, and continues to allow the same executable stub to be
      shared, as the appropriate signature is determined at runtime based on
      the Python version.

      The patch does not include the 2 new stub executables required
      (wininst-9.0.exe and wininst-9.0-amd64.exe), but the patch *and* the new
      stub executables should be merged into whatever py3k branches are
      appropriate. I've tested (pywin32) installers based on the new stub on
      python 2.6 32bit, and python 3.0 32 and 64bit.

    2. self-assigned this
      on Jan 27, 2009
    3. added
      stdlibStandard Library Python modules in the Lib/ directory
      type-bugAn unexpected behavior, bug, or error
      on Jan 27, 2009
    4. loewis commented on Jan 27, 2009

      loewismannequin
      Mannequin

      Is it really useful to be have the same stub for 2.x and 3.x? I think it
      would be better if they mutually ignore each other, and be different.

    5. mhammond commented on Jan 27, 2009

      @mhammond
      ContributorAuthor

      Is it really useful to be have the same stub for 2.x and 3.x?
      I think it would be better if they mutually ignore each
      other, and be different.

      Good question!  I'm not really aware of the complexities involved in
      merging between the various branches, but given the fairly trivial
      nature of the patch I figured there were potential advantages in both
      identical source and stubs.  I'm happy to work the patch into either
      #ifdef based (ie, identical source, different stubs), or "unconditional"
      (both source and stubs different) if you prefer - and if so, which of
      those 2 do you prefer?

      On a related note, its obviously true that the same final installer will
      not be able to be shared between 2.x and 3.x, as is currently possible
      between pure-python installers between the 2.x series. However, this
      could be addressed in .py code at a later time while still allowing the
      same stub to be shared if that is desirable.

    6. loewis commented on Jan 27, 2009

      loewismannequin
      Mannequin

      Good question! I'm not really aware of the complexities involved in
      merging between the various branches, but given the fairly trivial
      nature of the patch I figured there were potential advantages in both
      identical source and stubs. I'm happy to work the patch into either
      #ifdef based (ie, identical source, different stubs), or "unconditional"
      (both source and stubs different) if you prefer - and if so, which of
      those 2 do you prefer?

      It's still possible to merge changes reasonably even if the "target"
      (i.e. py3k) differs slightly from the source. Therefore, I think the 3k
      version should unconditionally only support python3x.dlls. IOW, let
      the sources diverge (for sake of simplicity of each individual source).

    7. mhammond commented on Jan 28, 2009

      @mhammond
      ContributorAuthor

      Attaching an updated patch against the py3k branch which makes no
      attempt to work on py2k.

    8. loewis commented on Jan 28, 2009

      loewismannequin
      Mannequin

      This patch is fine, please apply.

      I wish it wouldn't be necessary to widen char*, but start off with
      wchar_t from the beginning. AFAICT, this would work fine for argv[1]
      (there are only two arguments, anyway), but might get complicated for
      argv[0].

    9. mhammond commented on Jan 29, 2009

      @mhammond
      ContributorAuthor

      Checked into py3k as r6998; merged to release30-maint as 69099. I hope
      I got that right!

    10. loewis commented on Jan 29, 2009

      loewismannequin
      Mannequin

      Checked into py3k as r6998; merged to release30-maint as 69099. I hope
      I got that right!

      If you ask whether checking into py3k was the right thing: yes, it was.

    11. transferred this issue fromon Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Assignees

    Labels

    stdlibStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions