GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — With invalid FD, os.device_encoding() returns None under Linux but raises an error under Windows · Issue #49802 · python/cpython

With invalid FD, os.device_encoding() returns None under Linux but raises an error under Windows #49802

New issue
Copy link
New issue
Copy link
Closed
Closed
With invalid FD, os.device_encoding() returns None under Linux but raises an error under Windows#49802
Copy link
Labels
interpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

Description

@pitrou
pitrou
opened on Mar 24, 2009
Issue body actions
BPO 5552
Nosy @pitrou, @kristjanvalur

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-24.14:18:52.082>
created_at = <Date 2009-03-24.13:42:04.236>
labels = ['interpreter-core', 'type-bug']
title = 'With invalid FD, os.device_encoding() returns None under Linux but raises an error under Windows'
updated_at = <Date 2009-03-24.14:18:52.080>
user = 'https://github.com/pitrou'

bugs.python.org fields:

activity = <Date 2009-03-24.14:18:52.080>
actor = 'pitrou'
assignee = 'none'
closed = True
closed_date = <Date 2009-03-24.14:18:52.082>
closer = 'pitrou'
components = ['Interpreter Core']
creation = <Date 2009-03-24.13:42:04.236>
creator = 'pitrou'
dependencies = []
files = []
hgrepos = []
issue_num = 5552
keywords = []
message_count = 5.0
messages = ['84079', '84080', '84083', '84085', '84086']
nosy_count = 2.0
nosy_names = ['pitrou', 'kristjan.jonsson']
pr_nums = []
priority = 'normal'
resolution = 'fixed'
stage = None
status = 'closed'
superseder = None
type = 'behavior'
url = 'https://bugs.python.org/issue5552'
versions = ['Python 3.0', 'Python 3.1']

Activity

  1. pitrou commented on Mar 24, 2009

    @pitrou
    pitrou
    on Mar 24, 2009
    MemberAuthor
    More actions

    This is a potentially annoying incompatibility between platforms.
    Under Linux:

    >>> import os
    >>> print(os.device_encoding(1000))
    None
  2. pitrou
    added
    interpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)
    type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
    on Mar 24, 2009
  3. pitrou commented on Mar 24, 2009

    @pitrou
    pitrou
    on Mar 24, 2009
    MemberAuthor
    More actions

    And under Windows:

    >>> print(os.device_encoding(1000))
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
    OSError: [Errno 9] Bad file descriptor
  4. pitrou commented on Mar 24, 2009

    @pitrou
    pitrou
    on Mar 24, 2009
    MemberAuthor
    More actions

    This may be related to the following lines in posixmodule.c:

    if (!_PyVerify_fd(fd))
    return posix_error();

  5. kristjanvalur commented on Mar 24, 2009

    @kristjanvalur
    kristjanvalurmannequin
    on Mar 24, 2009
    Mannequin
    More actions

    Right, None is clearly the right result. Fixed in revision 70581

  6. pitrou commented on Mar 24, 2009

    @pitrou
    pitrou
    on Mar 24, 2009
    MemberAuthor
    More actions

    Thanks!

  7. pitrou
    closed this as completedon Mar 24, 2009
  8. ezio-melotti
    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

    interpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.