Details

    • Type: New Feature New Feature
    • Status: Closed Closed
    • Priority: Minor - P4 Minor - P4
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.2
    • Labels:
      None
    • Environment:
      Python3
    • Backward Breaking:
      Rarely
    • # Replies:
      39
    • Last comment by Customer:
      false

      Description

      Hi there

      This is my fork for Python3: http://wiki.github.com/sovnarkom/mongo-python3-driver

        Issue Links

          Activity

          Hide
          Bernie Hackett
          added a comment -

          I'm guessing you're getting errors when distutils tries to build the C extensions. I'm seeing the same thing in ActiveState Python. Should be able to fix it. You can install without the extensions for now as a work-around:

          \path\to\activestate-python setup.py --no_ext install

          Please note that after running install you have to change directories out of the pymongo source directory before starting the python shell to try out pymongo. We use 2to3 during the build and the module python will try to import from the source directory won't have been converted yet.

          Show
          Bernie Hackett
          added a comment - I'm guessing you're getting errors when distutils tries to build the C extensions. I'm seeing the same thing in ActiveState Python. Should be able to fix it. You can install without the extensions for now as a work-around: \path\to\activestate-python setup.py --no_ext install Please note that after running install you have to change directories out of the pymongo source directory before starting the python shell to try out pymongo. We use 2to3 during the build and the module python will try to import from the source directory won't have been converted yet.
          Hide
          Bernie Hackett
          added a comment - - edited

          @Bob Grommes: Quick update on this. If the exception you got during the build process looked like this:

          building 'bson._cbson' extension
          Traceback (most recent call last):
            File "setup.py", line 288, in <module>
              **extra_opts
            File "C:\Python27\lib\distutils\core.py", line 152, in setup
              dist.run_commands()
            File "C:\Python27\lib\distutils\dist.py", line 953, in run_commands
              self.run_command(cmd)
            File "C:\Python27\lib\distutils\dist.py", line 972, in run_command
              cmd_obj.run()
            File "C:\Python27\lib\distutils\command\build.py", line 127, in run
              self.run_command(cmd_name)
            File "C:\Python27\lib\distutils\cmd.py", line 326, in run_command
              self.distribution.run_command(command)
            File "C:\Python27\lib\distutils\dist.py", line 972, in run_command
              cmd_obj.run()
            File "setup.py", line 147, in run
              build_ext.run(self)
            File "C:\Python27\lib\distutils\command\build_ext.py", line 340, in run
              self.build_extensions()
            File "C:\Python27\lib\distutils\command\build_ext.py", line 449, in build_extensions
              self.build_extension(ext)
            File "setup.py", line 171, in build_extension
              build_ext.build_extension(self, ext)
            File "C:\Python27\lib\distutils\command\build_ext.py", line 499, in build_extension
              depends=ext.depends)
            File "C:\Python27\lib\distutils\msvc9compiler.py", line 473, in compile
              self.initialize()
            File "C:\Python27\lib\distutils\msvc9compiler.py", line 383, in initialize
              vc_env = query_vcvarsall(VERSION, plat_spec)
            File "C:\Python27\lib\distutils\msvc9compiler.py", line 299, in query_vcvarsall
              raise ValueError(str(list(result.keys())))
          ValueError: [u'path']
          

          Make sure you have installed Visual Studio 2008 (the full version, express won't work on 64bit) and checked "x64 Compilers and Tools" under Visual C++. CPython and ActiveState Python are built against Visual Studio 2008 and require it to build C extensions. Once you install the 64bit compiler the C extensions build under CPython and ActiveState python.

          ActivePython 3.2.2.3 (ActiveState Software Inc.) based on
          Python 3.2.2 (default, Sep  8 2011, 10:55:13) [MSC v.1500 64 bit (AMD64)] on win32
          Type "help", "copyright", "credits" or "license" for more information.
          >>> import pymongo
          >>> pymongo.has_c()
          True
          
          Show
          Bernie Hackett
          added a comment - - edited @Bob Grommes: Quick update on this. If the exception you got during the build process looked like this: building 'bson._cbson' extension Traceback (most recent call last): File "setup.py", line 288, in <module> **extra_opts File "C:\Python27\lib\distutils\core.py", line 152, in setup dist.run_commands() File "C:\Python27\lib\distutils\dist.py", line 953, in run_commands self.run_command(cmd) File "C:\Python27\lib\distutils\dist.py", line 972, in run_command cmd_obj.run() File "C:\Python27\lib\distutils\command\build.py", line 127, in run self.run_command(cmd_name) File "C:\Python27\lib\distutils\cmd.py", line 326, in run_command self.distribution.run_command(command) File "C:\Python27\lib\distutils\dist.py", line 972, in run_command cmd_obj.run() File "setup.py", line 147, in run build_ext.run(self) File "C:\Python27\lib\distutils\command\build_ext.py", line 340, in run self.build_extensions() File "C:\Python27\lib\distutils\command\build_ext.py", line 449, in build_extensions self.build_extension(ext) File "setup.py", line 171, in build_extension build_ext.build_extension(self, ext) File "C:\Python27\lib\distutils\command\build_ext.py", line 499, in build_extension depends=ext.depends) File "C:\Python27\lib\distutils\msvc9compiler.py", line 473, in compile self.initialize() File "C:\Python27\lib\distutils\msvc9compiler.py", line 383, in initialize vc_env = query_vcvarsall(VERSION, plat_spec) File "C:\Python27\lib\distutils\msvc9compiler.py", line 299, in query_vcvarsall raise ValueError(str(list(result.keys()))) ValueError: [u'path'] Make sure you have installed Visual Studio 2008 (the full version, express won't work on 64bit) and checked "x64 Compilers and Tools" under Visual C++. CPython and ActiveState Python are built against Visual Studio 2008 and require it to build C extensions. Once you install the 64bit compiler the C extensions build under CPython and ActiveState python. ActivePython 3.2.2.3 (ActiveState Software Inc.) based on Python 3.2.2 (default, Sep 8 2011, 10:55:13) [MSC v.1500 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import pymongo >>> pymongo.has_c() True
          Hide
          Alex Grönholm
          added a comment -

          The driver needs to be marked with the "Programming Languge :: Python :: 3" specifier to show up correctly in the "Python 3 packages list" in PyPI, and also to get green light on the "Python 3 Wall of Shame". It'd be a nice final touch.

          Show
          Alex Grönholm
          added a comment - The driver needs to be marked with the "Programming Languge :: Python :: 3" specifier to show up correctly in the "Python 3 packages list" in PyPI, and also to get green light on the "Python 3 Wall of Shame". It'd be a nice final touch.
          Hide
          Bernie Hackett
          added a comment -

          I've already talked to Brett about "Who's on Python 3". The "Wall of shame" will pick up the 3.1 and 3.2 specifier according to its source.

          You're right about the "Python 3 packages list". I may upload an edited PKG-INFO to fix that.

          Show
          Bernie Hackett
          added a comment - I've already talked to Brett about "Who's on Python 3". The "Wall of shame" will pick up the 3.1 and 3.2 specifier according to its source. You're right about the "Python 3 packages list". I may upload an edited PKG-INFO to fix that.
          Hide
          Bernie Hackett
          added a comment -

          I updated the trove classifiers and uploaded a modified PKG-INFO to pypi. PyMongo shows up in the "Python 3 Packages" list now. It's also properly listed in "Who's on Python 3". The "Python 3 Wall of Shame" seems to only update every few days.

          Show
          Bernie Hackett
          added a comment - I updated the trove classifiers and uploaded a modified PKG-INFO to pypi. PyMongo shows up in the "Python 3 Packages" list now. It's also properly listed in "Who's on Python 3". The "Python 3 Wall of Shame" seems to only update every few days.

            People

            • Votes:
              49 Vote for this issue
              Watchers:
              33 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Days since reply:
                1 year, 51 weeks, 2 days ago
                Date of 1st Reply: