Git Product home page Git Product logo

Comments (13)

EstevanTH avatar EstevanTH commented on September 22, 2024 16

Hi, I have been able to build Python 2.7.15 with tracemalloc on Windows x86-64. The build worked on x86-32 as well, but I have not tested it.

The Windows version of ctypes.cdll.LoadLibrary() does not accept None as an argument. Instead, you have to specify "python27.dll".

Besides I had to build _tracemalloc.pyd by hand but the issue is unlikely to be caused by the setup script. (It did not find vcvarsall.bat and kept messing up after my workarounds.)

BTW I do not appreciate how this issue has turned out. 😟 I'm not trying to be nasty, but I program in Python for customers, and if they do not pay for a migration then my boss cannot allow my team to spend time to switch from Python2 to Python3. And frameworks and libraries being so obscure, what else can I do when the gc does not show anything big? 😭

PS: I'm open for contact (if you ever need my builds).

from pytracemalloc.

vstinner avatar vstinner commented on September 22, 2024 10

BTW I do not appreciate how this issue has turned out. worried

I'm maintaining this project in my free time. Since I created it, I got exactly 0€ for it. See the "No Maintenance Intended" banner on the homepage: http://unmaintained.tech/ What did you expect?

from pytracemalloc.

vstinner avatar vstinner commented on September 22, 2024 3

The Windows version of ctypes.cdll.LoadLibrary() does not accept None as an argument. Instead, you have to specify "python27.dll".

If you propose a PR, I will likely merge it.

from pytracemalloc.

vstinner avatar vstinner commented on September 22, 2024

Hi,

File "setup.py", line 55, in main
pythonapi = ctypes.cdll.LoadLibrary(None)

This code is only needed to display a message, you can simply remove it from setup.py: remove these lines:

    pythonapi = ctypes.cdll.LoadLibrary(None)
    if not hasattr(pythonapi, 'PyMem_SetAllocator'):
        print("WARNING: PyMem_SetAllocator: missing, %s has not been patched" % sys.executable)
    else:
        print("PyMem_SetAllocator: present")

I never tested pytracemalloc on Windows, but tracemalloc works perfectly well in Python 3: it's a builtin module since Python 3.4!
https://docs.python.org/dev/library/tracemalloc.html

Why not using Python 3? ;-)

from pytracemalloc.

sapnads avatar sapnads commented on September 22, 2024

from pytracemalloc.

vstinner avatar vstinner commented on September 22, 2024

from pytracemalloc.

sapnads avatar sapnads commented on September 22, 2024

from pytracemalloc.

vstinner avatar vstinner commented on September 22, 2024

from pytracemalloc.

sapnads avatar sapnads commented on September 22, 2024

from pytracemalloc.

vstinner avatar vstinner commented on September 22, 2024

from pytracemalloc.

vstinner avatar vstinner commented on September 22, 2024

No news for one year. I close the issue, sorry.

BREAKING NEWS: Python 3 is out. Maybe you can give it a try?

from pytracemalloc.

vstinner avatar vstinner commented on September 22, 2024

It's not a good practice to comment closed issues. Please open a new issue. (But don't expect anything, No Maintenance Intended.)

from pytracemalloc.

EstevanTH avatar EstevanTH commented on September 22, 2024

Okay I will do this! 😉 Now I have a better opinion of this issue! 😁

from pytracemalloc.

Related Issues (7)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.