Skip to content

load pyc file with mbcs file system in update_compiled_module #49672

Closed

Description

@joexo
mannequin
BPO 5422
Superseder
  • bpo-5273: 3.0.1 crashes in unicode path
  • 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 = None
    closed_at = <Date 2009-03-05.13:46:30.314>
    created_at = <Date 2009-03-05.12:14:36.846>
    labels = ['build', 'OS-windows']
    title = 'load pyc file with mbcs file system in update_compiled_module'
    updated_at = <Date 2009-03-05.13:47:12.438>
    user = 'https://bugs.python.org/joexo'

    bugs.python.org fields:

    activity = <Date 2009-03-05.13:47:12.438>
    actor = 'ocean-city'
    assignee = 'none'
    closed = True
    closed_date = <Date 2009-03-05.13:46:30.314>
    closer = 'ocean-city'
    components = ['Windows']
    creation = <Date 2009-03-05.12:14:36.846>
    creator = 'joexo'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 5422
    keywords = []
    message_count = 4.0
    messages = ['83190', '83191', '83192', '83196']
    nosy_count = 2.0
    nosy_names = ['ocean-city', 'joexo']
    pr_nums = []
    priority = 'normal'
    resolution = 'duplicate'
    stage = None
    status = 'closed'
    superseder = '5273'
    type = 'compile error'
    url = 'https://bugs.python.org/issue5422'
    versions = ['Python 3.0']

    Activity

    1. joexo commented on Mar 5, 2009

      joexomannequin
      MannequinAuthor

      py3k 3.01

      static int
      update_compiled_module(PyCodeObject *co, char *pathname)
      {
      	PyObject *oldname, *newname;
      if (!PyUnicode_CompareWithASCIIString(co-\>co_filename, 
      

      pathname))
      return 0;

      /* string pathname related with FILE SYSTEM !!!

      • old code is :
      • newname = PyUnicode_FromString(pathname);
        */
        newname = PyUnicode_DecodeFSDefault(pathname);
        if (newname == NULL)
        return -1;
      	oldname = co->co_filename;
      	Py_INCREF(oldname);
      	update_code_filenames(co, oldname, newname);
      	Py_DECREF(oldname);
      	Py_DECREF(newname);
      	return 1;
      }
    2. joexo commented on Mar 5, 2009

      joexomannequin
      MannequinAuthor

      if directory have chinese word under windows system
      load .py is passed
      load .pyc get the utf-8 codec error...

      i modified this code
      wish this is helpful...

    3. ocean-city commented on Mar 5, 2009

      ocean-citymannequin
      Mannequin

      I believe this issue is duplicate of bpo-5273, and fixed yesterday. Can
      you try latest svn checkout?

    4. joexo commented on Mar 5, 2009

      joexomannequin
      MannequinAuthor

      Oh... yes
      this is fixed
      thx a lot for u check out

    5. 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

    No one assigned

      Labels

      OS-windowsbuildThe build process and cross-build

      Projects

      No projects

        Milestone

        No milestone

        Relationships

        None yet

        Development

        No branches or pull requests

        Issue actions