text:
Debian 10 won't run this module

Here's some context:
debian@bgw00000000:~/prototypeF$ nvm --version
0.38.0
debian@bgw00000000:~/prototypeF$ node --version
v14.17.3
debian@bgw00000000:~/prototypeF$ npm --version
7.20.0
debian@bgw00000000:~/prototypeF$ lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux 10 (buster)
Release:        10
Codename:       buster
debian@bgw00000000:~/prototypeF$ cat /proc/cpuinfo
processor       : 0
model name      : ARMv7 Processor rev 2 (v7l)
BogoMIPS        : 995.32
Features        : half thumb fastmult vfp edsp thumbee neon vfpv3 tls vfpd32
CPU implementer : 0x41
CPU architecture: 7
CPU variant     : 0x3
CPU part        : 0xc08
CPU revision    : 2

Hardware        : Generic AM33XX (Flattened Device Tree)
Revision        : 0000
Serial          : BBGW16055134
debian@bgw00000000:~/prototypeF$

On a new, small express sample project I npm install mdns --save
debian@bgw00000000:~/prototypeF$ npm list mdns
prototypef@1.0.0 /home/debian/prototypeF
└── mdns@2.7.2

Then I write a simple piece of server side code in a class to broadcast that I have a web server on port 80, which looks something like this:
createmDNSAdvertisement() {
    let port = process.env.NODE_PORT || 80
    const httpAd = mdns.createAdvertisement(mdns.tcp('http'), parseInt(port))
    httpAd.start()
  }

But when I npm start, I get the following:
debian@bgw00000000:~/prototypeF$ npm start

> prototypef@1.0.0 start
> export $(cat .env | xargs) && nodemon main.js

[nodemon] 1.19.4
[nodemon] to restart at any time, enter `rs`
[nodemon] watching dir(s): *.*
[nodemon] watching extensions: js,mjs,json
[nodemon] starting `node main.js`
*** WARNING *** The program 'node' uses the Apple Bonjour compatibility layer of Avahi.
*** WARNING *** Please fix your application to use the native API of Avahi!
*** WARNING *** For more information see <http://0pointer.de/blog/projects/avahi-compat.html>
*** WARNING *** The program 'node' called 'DNSServiceRegister()' which is not supported (or only supported partially) in the Apple Bonjour compatibility layer of Avahi.
*** WARNING *** Please fix your application to use the native API of Avahi!
*** WARNING *** For more information see <http://0pointer.de/blog/projects/avahi-compat.html>
         -- mDNS: mDNS Advertising as MintonTech
/home/debian/prototypeF/node_modules/mdns/lib/advertisement.js:56
  dns_sd.DNSServiceRegister(self.serviceRef, flags, ifaceIdx, name,
         ^

Error: dns service error: unknown
    at new Advertisement (/home/debian/prototypeF/node_modules/mdns/lib/advertisement.js:56:10)
    at Object.create [as createAdvertisement] (/home/debian/prototypeF/node_modules/mdns/lib/advertisement.js:64:10)
    at MulticastDNSService.createmDNSAdvertisement (/home/debian/prototypeF/service-mdns.js:31:25)
    at new MulticastDNSService (/home/debian/prototypeF/service-mdns.js:24:10)
    at Object.<anonymous> (/home/debian/prototypeF/main.js:67:12)
    at Module._compile (internal/modules/cjs/loader.js:1085:14)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
    at Module.load (internal/modules/cjs/loader.js:950:32)
    at Function.Module._load (internal/modules/cjs/loader.js:790:14)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:76:12)
    at internal/main/run_main_module.js:17:47 {
  errorCode: -65537
}
[nodemon] app crashed - waiting for file changes before starting...

So line 31 of my service-mdns.js looks like this:
const httpAd = mdns.createAdvertisement(mdns.tcp('http'), parseInt(port))
I've read some projects which claim that lines starting with *** WARNING *** The program 'node' uses the Apple Bonjour compatibility layer of Avahi. is normal and to just ignore it. But as you can see, I can't simply ignore it. I've installed previous versions, like 5.2.1. I've tried installing/updating everything from my build tools to the avahi library installed on my system.
I'm assuming it's an issue with the npm package, but I'm not certain. Is anyone else having similar issues? If so, what fixed it for you? Or is this package being phased out as some claim?
Thanks
PS. My package.json file:
{
    "name": "prototypef",
    "version": "1.0.0",
    "description": "PrototypeF for use with PrototypeA",
    "main": "main.js",
    "dependencies": {
      "bluebird": "^3.5.1",
      "body-parser": "^1.18.2",
      "bonescript": "^0.7.4-beta1",
      "cors": "^2.8.5",
      "dotenv": "^4.0.0",
      "express": "^4.16.2",
      "mdns": "^2.7.2",
      "moment": "^2.24.0",
      "node-fetch": "^2.6.1",
      "pm2": "^4.2.1",
      "ramda": "^0.17.1",
      "request-promise": "^2.0.1",
      "socket.io": "^2.3.0",
      "socket.io-client": "^2.3.0",
      "sqlite3": "^5.0.2",
      "uuid": "^8.3.1"
    },
    "optionalDependencies": {
      "fsevents": "^2.3.2"
    },
    "devDependencies": {
      "nodemon": "^1.7.3"
    },
    "keywords": [
      "prototype"
    ],
    "author": "John",
    "license": "MIT",
    "bugs": {
      "url": ""
    },
    "homepage": "",
    "scripts": {
      "start": "export $(cat .env | xargs) && nodemon main.js",
      "tracewarnings": "export $(cat .env | xargs) && node --trace-warnings main.js",
      "startpm2": "pm2 start main.js",
      "restartpm2": "pm2 restart all"
    }
  }

Following the advice from https://github.com/homebridge/homebridge/issues/613:
sudo apt-get install avahi-daemon avahi-discover libnss-mdns libavahi-compat-libdnssd-dev
I rebooted the system, just to make sure everything is going, and no change:
debian@bgw00000000:~/prototypeF$ npm start

> prototypef@1.0.0 start
> export $(cat .env | xargs) && nodemon main.js

[nodemon] 1.19.4
[nodemon] to restart at any time, enter `rs`
[nodemon] watching dir(s): *.*
[nodemon] watching extensions: js,mjs,json
[nodemon] starting `node main.js`
*** WARNING *** The program 'node' uses the Apple Bonjour compatibility layer of Avahi.
*** WARNING *** Please fix your application to use the native API of Avahi!
*** WARNING *** For more information see <http://0pointer.de/blog/projects/avahi-compat.html>
*** WARNING *** The program 'node' called 'DNSServiceRegister()' which is not supported (or only supported partially) in the Apple Bonjour compatibility layer of Avahi.
*** WARNING *** Please fix your application to use the native API of Avahi!
*** WARNING *** For more information see <http://0pointer.de/blog/projects/avahi-compat.html>
         -- mDNS: mDNS Advertising as MintonTech
/home/debian/prototypeF/node_modules/mdns/lib/advertisement.js:56
  dns_sd.DNSServiceRegister(self.serviceRef, flags, ifaceIdx, name,
         ^

Error: dns service error: unknown
    at new Advertisement (/home/debian/prototypeF/node_modules/mdns/lib/advertisement.js:56:10)
    at Object.create [as createAdvertisement] (/home/debian/prototypeF/node_modules/mdns/lib/advertisement.js:64:10)
    at MulticastDNSService.createmDNSAdvertisement (/home/debian/prototypeF/service-mdns.js:31:25)
    at new MulticastDNSService (/home/debian/prototypeF/service-mdns.js:24:10)
    at Object.<anonymous> (/home/debian/prototypeF/main.js:67:12)
    at Module._compile (internal/modules/cjs/loader.js:1085:14)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
    at Module.load (internal/modules/cjs/loader.js:950:32)
    at Function.Module._load (internal/modules/cjs/loader.js:790:14)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:76:12)
    at internal/main/run_main_module.js:17:47 {
  errorCode: -65537
}
[nodemon] app crashed - waiting for file changes before starting...

Found this: https://www.truenas.com/community/threads/try-to-run-airsonos-issue-with-registering-on-the-network.36428/
There user @tslw says there are incorrect setting in /usr/local/etc/avahi-daemon.conf enable-dbus was set to not where it should have been yes
Went to https://manpages.debian.org/testing/avahi-daemon/avahi-daemon.conf.5.en.html and discovered the Avahi configuration file is located at /etc/avahi/avahi-daemon.conf. So I pico /etc/avahi/avahi-daemon.conf and uncommented dbus-enabled=yes. Save. Reboot the system.
Still no change in result.

Hi,
I'm currently using this module on debian 10 so I should be able to help.
I have encountered this error when a device is registered in avahi (it was found on the local network) but could no longer be resolved (I think it's the job of getaddrinfo on linux). I know of two reasons for this :

The device is no longer reachable (it can take a long time for avahi daemon to unregister dead devices)
your nss configuration doesn't allow mdns resolution

In /etc/nsswitch.conf you should have a line like :
hosts:          files mdns4_minimal mdns6_minimal [NOTFOUND=return] dns

(copied from mine, may vary. The important bit is mdns4_minimal or mdns4
If you don't care about name resolution, you can customize the name resolution step in mdns to skip it.

authors: cjohnweb sdumetz


text:
Can't loading

Hi, the mod cannot load
I used Fabric - 1.0.0 from modrinth
Minecraft 1.19.4
Fabric Loader 0.14.19
https://mclo.gs/214nmwl

Mods:

architectury-8.1.80-fabric
fabric-api-0.80.0+1.19.4
spritearrows-fabric-1.0.0

Thanks for telling me, it was a typo in the fabric.mod.json file that somehow got in there between creation and publishing of the mod. idk how it happened, but I'll upload a fixed version asap.

Fixed, you can get version 1.0.1 on modrinth

Thanks!

source: gharchive/issue

license: MIT

license_type: permissive

license_source: github-api


text:
ci: bump upload-artifact to v4

Description

closes: https://github.com/Agoric/agoric-private/issues/229
Updates deprected upload-artifact and download-artifact action version from v3 to v4.

Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.

[ ] Targeted PR against correct branch (see CONTRIBUTING.md).
[ ] Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
[ ] Code follows the module structure standards.
[ ] Wrote unit and integration tests.
[ ] Updated relevant documentation (docs/) or specification (x/<module>/spec/).
[ ] Added relevant godoc comments.
[ ] Provide a commit message to be used for the changelog entry in the PR description for review.
[ ] Re-reviewed Files changed in the Github PR explorer.
[ ] Review Codecov Report in the comment section below once CI passes.

Closing as this repo doesn't even have CI set up to run.

source: gharchive/pull-request

repo: agoric-labs/ibc-go


text:
Added styles to game

Added styles to game

Improve the look and feel of the application, adding the styles .
General layout of the wireframe, this is the only mandatory requirement.
I have use plain CSS .

[OPTIONAL] I've tried to add my score to your app, but it didn't display it. Although this PR is to check your styling, please give a look at the functionality 😉.


text: Metadata

repo: ahampriyanshu/track-covid


text:
🛑 Aharooms Admin is down

In 645d2c2, Aharooms Admin (https://admin.aharooms.com) was down:

HTTP code: 503
Response time: 37 ms

Resolved: Aharooms Admin is back up in 0b2aa40.

repo: aharooms/upptime


text:
Added IndexOf function.

This just adds the IndexOf function.

Coverage decreased (-0.6%) to 99.358% when pulling 6cc988601d019632688a93e72938a9cb39ef1c6c on elliotcourant:feature/index-of into 9f6960b5d2e017ec4b7820f045fbd7db66dd53b6 on ahmetb:master.

Honestly, I'm puzzled we didn't have this function. I need some time to figure out why. If I forget to review this,  please gently ping me.

Sounds good! Thank you for the fast reply!

@cleitonmarx what do you think?

@elliotcourant Thanks you for your contribution!
@ahmetb Originally LINQ (Enumerable) doesn't have the method IndexOf, just Arrays and Lists types.
We can reproduce the same results using existent LINQ methods:
From(slice).TakeWhile(...).Count()-1

Here more arguments for the exact same request but in DotNet Core: https://github.com/dotnet/corefx/issues/1415
@elliotcourant Could you describe an use-case for this function?

@cleitonmarx I'm using it in a database sharding application as a simple way to loop through a list to see if a column with the given name exists. Its an easy way to see if it exists and if it doesn't handling that, and if it does just grabbing that index from the array.
It also serves as an easy way to update that item in the array since I have the index instead of the object.
Here is an example:
https://github.com/elliotcourant/noahdb/blob/aca8f978a56d7c175f809c06675c002817e68bfe/pkg/sql/create.go#L271

And at the very least this would just be the shorthand for
From(slice).TakeWhile(...).Count()-1

But might be more efficient since the TakeWhile adding those items to a collection as it goes and then counting that collection in the end. But the IndexOf is only iterating over the collection and counting.
The difference is probably insignificant for most use cases as far as performance goes.

But might be more efficient since the TakeWhile adding those items to a collection as it goes and then counting that collection in the end.

TakeWhile doesn't create a new collection, and It just passes the items to the next function while the predicate is false (using the Iterator pattern 😄)

It also serves as an easy way to update that item in the array since I have the index instead of the object.

This use-case seems a good reason to accept the PR @ahmetb. Thoughts?
@elliotcourant It would be nice to add at least one usage example for better documentation -> example_test.go

I suppose we don’t normally add methods that aren’t part of .NET LINQ. But then it has proper IndexOf method on arrays and Go falls short here. I am ok with it.

I'll update the documentation comments and add an example tonight!

Just updated the stuff and added an example, and re-squashed my commits. 👍

Looks like there are a couple golint + gofmt issues.

Yeah my casing was wrong and my indentation was off. Should be fixed now!

I don't see any issues. I'll have @cleitonmarx have another look and merge. Thanks!

Thank you very much you guys, love the library!

authors: ECourant ahmetb cleitonmarx coveralls elliotcourant

repo: ahmetb/go-linq


text:
🛑 Dashboard is down

In 1f739aa, Dashboard (https://guard-bot.ahq-alt.repl.co/) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Dashboard is back up in 35cf8d2.


text:
Code cleanup

I've had a request for code cleanup, so I wanted to lay out the steps necessary to incorporate such a change.
At this point I've generally prioritized accepting contributions over code consistency for practical reasons, plus some code (like the vrep skeleton) is from other projects thus not easy to change the indentation because new updates will put it back. I've also preferred to be able to see who made what change over indentation fixes via git blame type commands.
When I can, I try to use the coding style of boost and indentation with four spaces not tabs.  Some of the code is from various people/sources, particularly in some non-public repositories that use grl and code from v-rep's distribution.
I’d be happy to switched to a specific coding style, but there would be a couple requirements (which is why I haven’t done this yet):

no manual changes should be needed for third party code
add a ci based linter to verify pull requests, preferably with something like the boost/stl coding style. I’m not a fan of the google coding style because it breaks typedefs with boost, and google bans boost.
prevent pushes directly to master with something like https://gist.github.com/pixelhandler/5718585 or the related script https://gist.github.com/mattscilipoti/8424018
provide instructions so people can check this locally before they push
finally submit the pull request that updates all the relevant code

As you can see this will take some time… so I haven’t taken care of it but a contribution is definitely welcome. Once an approach has been discussed and agreed upon plus a pull request made, I can do steps where project owner permissions are required. :-)

prevent pushes directly to master with something like https://gist.github.com/pixelhandler/5718585 or the related script https://gist.github.com/mattscilipoti/8424018

This is from one of the comments in above link

It is worth mentioning that the pre-push hook is a local hook, that is a hook that is fired when invoking a command in the local repository, and is potentially editable by a user. If you want to protect your repositories against disgruntled programmers, a pre-receive hook in the remote repository is necessary. Anyway, thanks for sharing! The script is perfect when you can trust all programmers in the team.

More info on pre-receive hook
https://help.github.com/enterprise/2.8/admin/guides/developer-workflow/creating-a-pre-receive-hook-script/

When I can, I try to use the coding style of boost and indentation with four spaces not tabs.

Thoughts on 80 column rule? Maybe use two spaces to fit easily in 80 columns?

When I can, I try to use the coding style of boost and indentation with four spaces not tabs.

Thoughts on 80 column rule? Maybe use two spaces to fit easily in 80 columns?

That's actually one of the parts that bothers me most about google coding style, the contortions needed to fit in 80 characters. It's 2017 so we don't have 640x480 or 720x480 screens anymore... I have a 4k screen. Preferably 320 columns, maybe 160 columns would be okay with me, 80 is definitely too low. Nice visualization of this point below, I don't really need to fit 8 code files side by side. :-)

Even I think 80 is too low. But need an upperbound and wrap it, 160 seems reasonable.

On Mon, Feb 13, 2017 at 4:17 PM tdinesh notifications@github.com wrote:

Even I think 80 is too low. But need an upperbound and wrap it, 160 seems
reasonable.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/ahundt/grl/issues/134#issuecomment-279525091, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AADZwGVHGXpKRb1nJdxq4txK4iYh8VFwks5rcMhmgaJpZM4L_qe7
.

Sure good enough
Cheers!
Andrew Hundt

authors: ahundt tdinesh

repo: ahundt/grl


text:
Azure Container Instances: persist?

This may be a newbie question, I'm new to docker and all the containerization hype, so I'm trying to setup this in Azure Container Instances.
I manage to create one successfully, and be able to open the website as "mywebnuget.eastus.azurecontainer.io:9011".
However, when I restart the container, it removes all the packages I uploaded. This seems to be because there are no volumes assigned.
In your readme says to use:
mkdir -p /tmp/liget-test
docker run -p 9011:9011 -v /tmp/liget-test/:/data tomzo/liget

However, in ACI I cannot "customize" the run command, so how can I add this volume or command before running the container?
Probably you'll tell me dont use ACI ha ha, but I want to give it a try.

Yep, azure files seems as the right way in this case.
See https://docs.microsoft.com/en-us/azure/container-instances/container-instances-volume-azure-files

@ElanHasson dbreeze is used only before 1.0.0 and yes, locking is quite an issue there.

That is welcome news!

authors: ElanHasson katlimruiz tomzo

repo: ai-traders/liget

license: mit

license_source: bigquery


text:
Do not copy buffer in postMessage

Learn more about the second argument in postMessage(buffer, [buffer]).

Done 22ce21b801afe2a0ed7e6690312bee19c335308c

Released in 0.1.1

repo: ai/audio-recorder-polyfill


text:
C4FM problem

Rattlegram doesn't work on Yaesu's C4FM, when it's fine on FM.  We use a repeater that doesn't handle FM, can anything be done to make it work?

Digital voice transmissions use vocoder technology combined with compression to improve human voice transmission clarity over noisy channels. On the other hand, Rattlegram uses OFDM technology to transmit a bandwidth limited signal, which does not resemble human speech but is okay with SSB, AM and FM. Transmitting data over a digital voice channel is a different kind of challenge.

authors: Doug-F xdsopl

repo: aicodix/rattlegram


text:
Unable to interact with machine

As the title says, I am unable to interact with any Mek machine. I mean as in cannot interact with inventory and the machines slot(to place stuff) when its gui is open but it's okay when I exit the gui.(Inventory works fine) Ps, If there is any other info needed I'll be glad to provide 'em.

your description is really too vague to be actionable. Can you be more specific?  Maybe walk through the steps of what you're doing?

Okay, I interact with a machine(right click), its gui pops up and my invenyory alongside it. Then I am unable to move items from my inventory to the machine or even moving the items at all.

My Mek version is 7.1.0.88, Forge 10.13.2.1230, Minecraft 1.7.10.
Alsoo I can't seem to use the latest version of Mek(7.1.1.127). Forge can't detect it but it can detect its addons.(Generators and Tools)

Latest is 7.1.1.145 - Take a look lower down the download page :)

o.0 thats funny. Anyway I'll try report back what happens. Thanks!

authors: Greylocke Winters1299 unpairedbracket

repo: aidancbrady/Mekanism


text:
use logistical transporter on special inventory

I try to use logistical transporter to transfer item to tinker smeltery, but I put 1 stack in chest, it only has one item in smelter inventory

Just wondering does it delete the other items or just move them one at a time?

@Chupp4-Jo3 Deletes them outright. When using an advanced pipe for example, it'll take an 8 stack, which after insertion turns into a 1 stack, effectively deleting 7 of that item
Happens with the tinkers smeltery and thaumcraft pedestals, which means you can't really automate either with mekanism :(

This is fixed for v9, thanks!  I was forgetting to take into account the inventory's item stack limit when actually placing the blocks into the inventory.


text:
bug: Million stops  onChange from working correctly

Describe the bug
So I've been developing with @million/react for a bit now, and when I use this code for example in my App.jsx file.
<input onChange={() => console.log("hola")} />

It only fires the code when I go out of focus of the input, or when I click enter.
I even tried using the plain Million-react template, and it still doesn't work.
To Reproduce
Steps to reproduce the behavior:

Go to the Million-react template repo and clone it
Add a <input onChange={() => console.log("hola")} /> input code
Run it
See the error

Expected behavior
The onChange function on an input element should fire every time the input is changed. (or every time a new character is entered)
Device (please complete the following information):

OS: Microsoft Windows 10
Browser: Brave
v1.42.97

Additional context
I tried this same code on a plain React project and also a NextJS project and the onChange function works just fine. Maybe Million has something to do with this..?

Whoops - nevermind! I found on the Million docs that I should use the onInput feature instead.

repo: aidenybai/million


text:
Hactoberfest Issue: Add A Redux Toolkit Project To Kitchen Sink

Add a simple Redux Toolkit project to the Kitchen sink project that showcases Million.js in action in a React / Next project that has Redux Toolkit in a project for state management

Resolved by #598


text:
Revert "docs: refactor (WIP)"

Reverts aidenybai/million#840

Pull Request Test Coverage Report for Build 7309667011
Warning: This coverage report may be inaccurate.
We've detected an issue with your CI configuration that might affect the accuracy of this pull request's coverage report.
To ensure accuracy in future PRs, please see these guidelines.
A quick fix for this PR: rebase it; your next report should be accurate.

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 25.706%

Totals

Change from base Build 7308306490:
0.0%

Covered Lines:
1257

Relevant Lines:
5082

💛  - Coveralls

authors: coveralls tobySolutions


text:
Switch to new aiida-core pytest fixtures with SQLite backend

Instead of manage/tests/pytest_fixtures.py use tools/pytest_fixtures/ introduced in aiida 2.6.0. These new fixtures use the sqlite_dos storage backend by default. See https://aiida.readthedocs.io/projects/aiida-core/en/stable/topics/plugins.html#plugin-test-fixtures
This should hopefully be more-or-less a drop-in replacement.

By quick inspection, the only aiida-core fixture that's in use here is the aiida_localhost in mock_code
https://github.com/aiidateam/aiida-testing/blob/2bf9dfaef5d7658b47f5b31dd1ce81da5c43c53c/aiida_testing/mock_code/__init__.py#L20
https://github.com/aiidateam/aiida-testing/blob/2bf9dfaef5d7658b47f5b31dd1ce81da5c43c53c/aiida_testing/mock_code/_fixtures.py#L121

sounds good

I am working on this in #79, it works for mock_code but the archive_cache fixture is broken in 2.6 and will need to be fixed (#80). It is unclear if we will be able to support both 2.6 and older versions. I am leaning towards just supporting 2.6 and up to simplify maintenance. We'll see...

authors: danielhollas ltalirz

repo: aiidateam/aiida-testing


text:
Errors in search notebook due to refactoring

in #878 FIFOQueue, Stack and PriorityQueue are refactored and changes were made to search.py. The changes are not made in the search notebook. This causes errors in the graph visualizations like FIFOQueue not defined, Stack not defined etc. The code in the notebook needs to be updated with the code in search.py

Nice catch! I have added the 'help wanted' label so that others can contribute to this.

I have submitted PR #902. can you review that @MrDupin?  Thanks

I'm afraid I am not familiar with that part of the search module, so I can't be of much help.

This issue can be closed. #902 has been merged.

repo: aimacode/aima-python


text:
Pub/Sub is blocking?

I have implemented a 1 channel pub > sub as per the demo and it is working ok.
One comment is that if I add some IO intensive task in the reader function, in this case sending an email to the user that just signed up, then it seems to block the caller until the email is sent, which I thought wasn't supposed to happen?
async def reader(ch):     while (await ch.wait_message()):         try:             msg = await ch.get_json()             sendemailandtakeagesdoingit(msg[1][1]) #msg[1][1] is the email address         except Exception as e:             print(str(e))
And I publish the message to the queue like :+1:
pub.publish_json('user:1', ["new_user_email",                                                                   ["uid",uid]])
I thought it would publish to the queue and continue on but it blocks until the email is sent. Is this behaviour by design? Have I misunderstood the publisher subscriber pattern?

@thebpmgroup,
Looking at your example, it seems that sendemail... is blocking and it is not related to aioredis.

authors: popravich thebpmgroup

repo: aio-libs/aioredis


text:
0.2.0: pep517 build is not building DSO module

Please confirm the following

[X] I agree to follow the aio-libs Code of Conduct

[X] I have checked the current issues for duplicates.

[X] I understand this is open source software provided for free and that I might not receive a timely response.
[X] I am positive I am NOT reporting a (potential) security
vulnerability, to the best of my knowledge. (These must be shared by
submitting this report form instead, if
any hesitation exists.)

[ ] I am willing to submit a pull request with reporoducers as xfailing test cases or even entire fix. (Assign this issue to me.)

Describe the bug
Looks like pep517 based build is not producing propcache._helpers_c DSO module.
To Reproduce
use pip or build modules to perform pep517 build.
Expected behavior
build should produce DSO module.
Logs/tracebacks

Here is build output:
+ /usr/bin/python3 -sBm build -w --no-isolation
* Getting build dependencies for wheel...
running egg_info
creating src/propcache.egg-info
writing src/propcache.egg-info/PKG-INFO
writing dependency_links to src/propcache.egg-info/dependency_links.txt
writing top-level names to src/propcache.egg-info/top_level.txt
writing manifest file 'src/propcache.egg-info/SOURCES.txt'
reading manifest file 'src/propcache.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no directories found matching 'propcache'
warning: no previously-included files matching '*.cache' found anywhere in distribution
warning: no previously-included files found matching 'src/propcache/*.c'
warning: no previously-included files found matching 'src/propcache/*.html'
warning: no previously-included files found matching 'src/propcache/*.so'
warning: no previously-included files found matching 'src/propcache/*.pyd'
no previously-included directories found matching 'docs/_build'
adding license file 'LICENSE'
adding license file 'NOTICE'
writing manifest file 'src/propcache.egg-info/SOURCES.txt'
* Building wheel...
running bdist_wheel
running build
running build_py
creating build/lib/propcache
copying src/propcache/_helpers.py -> build/lib/propcache
copying src/propcache/api.py -> build/lib/propcache
copying src/propcache/__init__.py -> build/lib/propcache
copying src/propcache/_helpers_py.py -> build/lib/propcache
running egg_info
writing src/propcache.egg-info/PKG-INFO
writing dependency_links to src/propcache.egg-info/dependency_links.txt
writing top-level names to src/propcache.egg-info/top_level.txt
reading manifest file 'src/propcache.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no directories found matching 'propcache'
warning: no previously-included files matching '*.cache' found anywhere in distribution
warning: no previously-included files found matching 'src/propcache/*.c'
warning: no previously-included files found matching 'src/propcache/*.html'
warning: no previously-included files found matching 'src/propcache/*.so'
warning: no previously-included files found matching 'src/propcache/*.pyd'
no previously-included directories found matching 'docs/_build'
adding license file 'LICENSE'
adding license file 'NOTICE'
writing manifest file 'src/propcache.egg-info/SOURCES.txt'
copying src/propcache/_helpers_c.pyx -> build/lib/propcache
copying src/propcache/py.typed -> build/lib/propcache
installing to build/bdist.linux-x86_64/wheel
running install
running install_lib
creating build/bdist.linux-x86_64/wheel
creating build/bdist.linux-x86_64/wheel/propcache
copying build/lib/propcache/_helpers.py -> build/bdist.linux-x86_64/wheel/./propcache
copying build/lib/propcache/api.py -> build/bdist.linux-x86_64/wheel/./propcache
copying build/lib/propcache/__init__.py -> build/bdist.linux-x86_64/wheel/./propcache
copying build/lib/propcache/_helpers_py.py -> build/bdist.linux-x86_64/wheel/./propcache
copying build/lib/propcache/_helpers_c.pyx -> build/bdist.linux-x86_64/wheel/./propcache
copying build/lib/propcache/py.typed -> build/bdist.linux-x86_64/wheel/./propcache
running install_egg_info
Copying src/propcache.egg-info to build/bdist.linux-x86_64/wheel/./propcache-0.2.0-py3.10.egg-info
running install_scripts
creating build/bdist.linux-x86_64/wheel/propcache-0.2.0.dist-info/WHEEL
creating '/home/tkloczko/rpmbuild/BUILD/propcache-0.2.0/dist/.tmp-wugm27x5/propcache-0.2.0-py3-none-any.whl' and adding 'build/bdist.linux-x86_64/wheel' to it
adding 'propcache/__init__.py'
adding 'propcache/_helpers.py'
adding 'propcache/_helpers_c.pyx'
adding 'propcache/_helpers_py.py'
adding 'propcache/api.py'
adding 'propcache/py.typed'
adding 'propcache-0.2.0.dist-info/LICENSE'
adding 'propcache-0.2.0.dist-info/METADATA'
adding 'propcache-0.2.0.dist-info/NOTICE'
adding 'propcache-0.2.0.dist-info/WHEEL'
adding 'propcache-0.2.0.dist-info/top_level.txt'
adding 'propcache-0.2.0.dist-info/RECORD'
removing build/bdist.linux-x86_64/wheel
Successfully built propcache-0.2.0-py3-none-any.whl

Python Version
$ python --version
Python 3.10.14

propcache Version
0.2.0

OS
Linux x86/64
Additional context

List of installed modules in build env:
Package                       Version
----------------------------- ------------
alabaster                     0.7.16
babel                         2.16.0
build                         1.2.2.post1
charset-normalizer            3.3.2
click                         8.1.7
Cython                        3.0.11
defusedxml                    0.7.1
distro                        1.9.0
docutils                      0.21.2
exceptiongroup                1.1.3
expandvars                    0.12.0
imagesize                     1.4.1
importlib_metadata            8.0.0
incremental                   22.10.0
iniconfig                     2.0.0
installer                     0.7.0
Jinja2                        3.1.4
markdown-it-py                3.0.0
MarkupSafe                    3.0.1
mdit-py-plugins               0.4.2
mdurl                         0.1.2
myst-parser                   4.0.0
packaging                     24.0
pluggy                        1.5.0
Pygments                      2.18.0
pyproject_hooks               1.2.0
pytest                        8.2.2
python-dateutil               2.9.0.post0
PyYAML                        6.0.2
requests                      2.32.3
setuptools                    75.1.0
snowballstemmer               2.2.0
Sphinx                        8.0.2
sphinxcontrib-applehelp       2.0.0
sphinxcontrib-devhelp         1.0.6
sphinxcontrib-htmlhelp        2.1.0
sphinxcontrib-jsmath          1.0.1
sphinxcontrib-qthelp          2.0.0
sphinxcontrib-serializinghtml 2.0.0
sphinxcontrib-towncrier       0.4.0a0
tokenize_rt                   6.0.0
tomli                         2.0.1
towncrier                     23.11.1.dev0
urllib3                       2.2.2
wheel                         0.44.0
zipp                          3.19.2

No, it must exist in sdist but not installed in wheel.

OK.
If you have any idea how can I try to diagnose pep517 build issue please let me know.

I cannot find in that workflow any traces of using pep517 build

cibuildwheel calls it: https://github.com/aio-libs/propcache/blob/02cad01/.github/workflows/reusable-build-wheel.yml#L75-L81
It's configured to run python -m build (as opposed to pip wheel) here: https://github.com/aio-libs/propcache/blob/02cad01/pyproject.toml#L66.
The logs from the last release show the full command: https://github.com/aio-libs/propcache/actions/runs/11214274927/job/31173924897#step:6:323.
See https://cibuildwheel.pypa.io for more information. You can pip install it and run locally to reproduce what's happening in the CI. It'll use the corresponding manylinux / musllinux containers per spec.

It is tested with both C-ext and pure-python in CI. There's a pytest flag for selecting the corresponding mode. Use it, if you need.

Again .. by default DSO is not build and test suite by default is needed.
Also documentation looks like needs DSO:
+ /usr/bin/sphinx-build -n -T -b man docs build/sphinx/man
Running Sphinx v8.1.3
loading translations [en]... done
making output directory... done
loading intersphinx inventory 'python' from https://docs.python.org/3/objects.inv ...
myst v4.0.0: MdParserConfig(commonmark_only=False, gfm_only=False, enable_extensions=set(), disable_syntax=[], all_links_external=False, links_external_new_tab=False, url_schemes=('http', 'https', 'mailto', 'ftp'), ref_domains=None, fence_as_directive=set(), number_code_blocks=[], title_to_header=False, heading_anchors=0, heading_slug_func=None, html_meta={}, footnote_sort=True, footnote_transition=True, words_per_minute=200, substitutions={}, linkify_fuzzy_links=True, dmath_allow_labels=True, dmath_allow_space=True, dmath_allow_digits=True, dmath_double_inline=False, update_mathjax=True, mathjax_classes='tex2jax_process|mathjax_process|math|output_area', enable_checkboxes=False, suppress_warnings=[], highlight_code_blocks=True)
building [mo]: targets for 0 po files that are out of date
writing output...
building [man]: all manpages
updating environment: [new config] 5 added, 0 changed, 0 removed
reading sources... [ 20%] api
reading sources... [ 40%] changes
reading sources... [ 60%] contributing/guidelines
reading sources... [ 80%] contributing/release_guide
reading sources... [100%] index

/home/tkloczko/rpmbuild/BUILD/propcache-0.2.0/docs/changes.rst:12: ERROR: Command exited unexpectedly.

Command: /usr/bin/python3 -m towncrier build --draft --version '\ |release| [UNRELEASED DRAFT]'
Return code: 1

Standard output:
ERROR: tried to import propcache, but ran into this error: No module named 'propcache'

Standard error:
Loading template...
Finding news fragments...
Rendering news fragments...
Traceback (most recent call last):
  File "/usr/lib/python3.10/site-packages/towncrier/_project.py", line 21, in _get_package
    module = import_module(package)
  File "/usr/lib64/python3.10/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1004, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'propcache'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib64/python3.10/runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/lib64/python3.10/runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "/usr/lib/python3.10/site-packages/towncrier/__main__.py", line 6, in <module>
    cli()
  File "/usr/lib/python3.10/site-packages/click/core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
  File "/usr/lib/python3.10/site-packages/click/core.py", line 1078, in main
    rv = self.invoke(ctx)
  File "/usr/lib/python3.10/site-packages/click/core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/lib/python3.10/site-packages/click/core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/lib/python3.10/site-packages/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
  File "/usr/lib/python3.10/site-packages/towncrier/build.py", line 123, in _main
    return __main(
  File "/usr/lib/python3.10/site-packages/towncrier/build.py", line 206, in __main
    project_name = get_project_name(
  File "/usr/lib/python3.10/site-packages/towncrier/_project.py", line 69, in get_project_name
    module = _get_package(package_dir, package)
  File "/usr/lib/python3.10/site-packages/towncrier/_project.py", line 28, in _get_package
    module = import_module(package)
  File "/usr/lib64/python3.10/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1004, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'propcache' [docutils]
looking for now-outdated files... none found
pickling environment... done
checking consistency... done
preparing documents... done
copying assets...
copying assets: done
writing... python-propcache.3 {
 api
  changes
   contributing/guidelines
    contributing/release_guide
} done
build succeeded, 1 warning.

IMO it would be good to change build options to generate DSO.
I've tested build with missing params and build still is not producing DSO.

+ /usr/bin/python3 -sBm build -w --no-isolation --config-setting=pure-python=false --config-setting=with-cython-tracing=false
* Getting build dependencies for wheel...
running egg_info
creating src/propcache.egg-info
writing src/propcache.egg-info/PKG-INFO
writing dependency_links to src/propcache.egg-info/dependency_links.txt
writing top-level names to src/propcache.egg-info/top_level.txt
writing manifest file 'src/propcache.egg-info/SOURCES.txt'
reading manifest file 'src/propcache.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no directories found matching 'propcache'
warning: no previously-included files matching '*.cache' found anywhere in distribution
warning: no previously-included files found matching 'src/propcache/*.c'
warning: no previously-included files found matching 'src/propcache/*.html'
warning: no previously-included files found matching 'src/propcache/*.so'
warning: no previously-included files found matching 'src/propcache/*.pyd'
no previously-included directories found matching 'docs/_build'
adding license file 'LICENSE'
adding license file 'NOTICE'
writing manifest file 'src/propcache.egg-info/SOURCES.txt'
* Building wheel...
running bdist_wheel
running build
running build_py
creating build/lib/propcache
copying src/propcache/_helpers.py -> build/lib/propcache
copying src/propcache/api.py -> build/lib/propcache
copying src/propcache/__init__.py -> build/lib/propcache
copying src/propcache/_helpers_py.py -> build/lib/propcache
running egg_info
writing src/propcache.egg-info/PKG-INFO
writing dependency_links to src/propcache.egg-info/dependency_links.txt
writing top-level names to src/propcache.egg-info/top_level.txt
reading manifest file 'src/propcache.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no directories found matching 'propcache'
warning: no previously-included files matching '*.cache' found anywhere in distribution
warning: no previously-included files found matching 'src/propcache/*.c'
warning: no previously-included files found matching 'src/propcache/*.html'
warning: no previously-included files found matching 'src/propcache/*.so'
warning: no previously-included files found matching 'src/propcache/*.pyd'
no previously-included directories found matching 'docs/_build'
adding license file 'LICENSE'
adding license file 'NOTICE'
writing manifest file 'src/propcache.egg-info/SOURCES.txt'
copying src/propcache/_helpers_c.pyx -> build/lib/propcache
copying src/propcache/py.typed -> build/lib/propcache
installing to build/bdist.linux-x86_64/wheel
running install
running install_lib
creating build/bdist.linux-x86_64/wheel
creating build/bdist.linux-x86_64/wheel/propcache
copying build/lib/propcache/_helpers.py -> build/bdist.linux-x86_64/wheel/./propcache
copying build/lib/propcache/api.py -> build/bdist.linux-x86_64/wheel/./propcache
copying build/lib/propcache/__init__.py -> build/bdist.linux-x86_64/wheel/./propcache
copying build/lib/propcache/_helpers_py.py -> build/bdist.linux-x86_64/wheel/./propcache
copying build/lib/propcache/_helpers_c.pyx -> build/bdist.linux-x86_64/wheel/./propcache
copying build/lib/propcache/py.typed -> build/bdist.linux-x86_64/wheel/./propcache
running install_egg_info
Copying src/propcache.egg-info to build/bdist.linux-x86_64/wheel/./propcache-0.2.0-py3.10.egg-info
running install_scripts
creating build/bdist.linux-x86_64/wheel/propcache-0.2.0.dist-info/WHEEL
creating '/home/tkloczko/rpmbuild/BUILD/propcache-0.2.0/dist/.tmp-8hvvjfuz/propcache-0.2.0-py3-none-any.whl' and adding 'build/bdist.linux-x86_64/wheel' to it
adding 'propcache/__init__.py'
adding 'propcache/_helpers.py'
adding 'propcache/_helpers_c.pyx'
adding 'propcache/_helpers_py.py'
adding 'propcache/api.py'
adding 'propcache/py.typed'
adding 'propcache-0.2.0.dist-info/LICENSE'
adding 'propcache-0.2.0.dist-info/METADATA'
adding 'propcache-0.2.0.dist-info/NOTICE'
adding 'propcache-0.2.0.dist-info/WHEEL'
adding 'propcache-0.2.0.dist-info/top_level.txt'
adding 'propcache-0.2.0.dist-info/RECORD'
removing build/bdist.linux-x86_64/wheel
Successfully built propcache-0.2.0-py3-none-any.whl

BTW looks like packaging/pep517_backend/_backend.py is using distutils which is deprecated.

That's needed to patch what setuptools wraps. Also, historically, we had C-extensions as opt-in to facilitate installs in environments where it would be difficult for the users to get a build toolchain. We expect that they would use our wheels when available, though. Pure-python is a good fallback for them. Toggling a default would break that promise.
The same goes for tests — they are for us to ensure that all's checked correctly, so they must default to C-extensions. It's all controlled in all the right places. Downstreams must make their own choices — that's out of the scope of upstream maintenance.

Also documentation looks like needs DSO:
[..]
ERROR: tried to import propcache, but ran into this error: No module named 'propcache'

No, it doesn't: https://app.readthedocs.org/projects/propcache/builds/25944844/#247291069--1. But it has to be available, and in your case it's not.

Moment so you want to day that to build propcache I need to INSTALL first propcache? 🤔
How?
PEP517 build should relay only on content  of source tree. Isn't it 🤔

authors: kloczek webknjaz

repo: aio-libs/propcache


text:
About the performance

Hi,
Thank you for sharing the code. I ran your code using IMDB dataset, and the accuracy was 0.5. I wonder why this happened. Have you run the model on any dataset to test the performance? Thanks.

Can you provide more details? Did you train the model with a validation set to avoid overfitting? What was the performance on the validation set? Did the model converge? Etc.


text:
Polymorphic Bug in 4.0.0beta2?

With 4.0.0.beta2, I have the following error that works fine on version 3.0.7. I have seen a previous issue/fix that might have addressed this but I thought the pull request was merged into 4.0.0.beta2
class Query < ActiveRecord::Base
  has_paper_trail
  belongs_to :queryable, polymorphic: true
end

class Universe < ActiveRecord::Base
  has_many :queries, as: :queryable, dependent: :destroy
end

Updating queryable results in a NameError: uninitialized constant Query::Queryable error
q = Query.last
q.queryable = Universe.last
q.save

SQL (13.2ms)  UPDATE "versions" SET "transaction_id" = $1 WHERE "versions"."id" = $2  [["transaction_id", 3548], ["id", 3548]]
   (15.4ms)  ROLLBACK
  PaperTrail::Version Load (14.5ms)  SELECT "versions".* FROM "versions" WHERE "versions"."item_id" = $1 AND "versions"."item_type" = $2  ORDER BY "versions"."created_at" ASC, "versions"."id" ASC  [["item_id", 4], ["item_type", "Query"]]
NameError: uninitialized constant Query::Queryable
  from /Users/alanmccann/railsapps/papertailtest/vendor/bundle/ruby/2.1.0/gems/activerecord-4.2.0/lib/active_record/inheritance.rb:158:in `compute_type'
  from /Users/alanmccann/railsapps/papertailtest/vendor/bundle/ruby/2.1.0/gems/activerecord-4.2.0/lib/active_record/reflection.rb:271:in `compute_class'
  from /Users/alanmccann/railsapps/papertailtest/vendor/bundle/ruby/2.1.0/gems/activerecord-4.2.0/lib/active_record/reflection.rb:267:in `klass'
  from /Users/alanmccann/railsapps/papertailtest/vendor/bundle/ruby/2.1.0/gems/paper_trail-4.0.0.beta2/lib/paper_trail/has_paper_trail.rb:376:in `block in save_associations'
  from /Users/alanmccann/railsapps/papertailtest/vendor/bundle/ruby/2.1.0/gems/paper_trail-4.0.0.beta2/lib/paper_trail/has_paper_trail.rb:375:in `each'
  from /Users/alanmccann/railsapps/papertailtest/vendor/bundle/ruby/2.1.0/gems/paper_trail-4.0.0.beta2/lib/paper_trail/has_paper_trail.rb:375:in `save_associations'
  from /Users/alanmccann/railsapps/papertailtest/vendor/bundle/ruby/2.1.0/gems/paper_trail-4.0.0.beta2/lib/paper_trail/has_paper_trail.rb:322:in `record_update'
  from /Users/alanmccann/railsapps/papertailtest/vendor/bundle/ruby/2.1.0/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:427:in `block in make_lambda'
  from /Users/alanmccann/railsapps/papertailtest/vendor/bundle/ruby/2.1.0/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:225:in `call'
  from /Users/alanmccann/railsapps/papertailtest/vendor/bundle/ruby/2.1.0/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:225:in `block in halting_and_conditional'
  from /Users/alanmccann/railsapps/papertailtest/vendor/bundle/ruby/2.1.0/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:219:in `call'
  from /Users/alanmccann/railsapps/papertailtest/vendor/bundle/ruby/2.1.0/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:219:in `block in halting_and_conditional'
  from /Users/alanmccann/railsapps/papertailtest/vendor/bundle/ruby/2.1.0/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:92:in `call'
  from /Users/alanmccann/railsapps/papertailtest/vendor/bundle/ruby/2.1.0/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:92:in `_run_callbacks'
  from /Users/alanmccann/railsapps/papertailtest/vendor/bundle/ruby/2.1.0/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:734:in `_run_update_callbacks'
  from /Users/alanmccann/railsapps/papertailtest/vendor/bundle/ruby/2.1.0/gems/activerecord-4.2.0/lib/active_record/callbacks.rb:310:in `_update_record'
... 25 levels...
  from /Users/alanmccann/railsapps/papertailtest/vendor/bundle/ruby/2.1.0/gems/activerecord-4.2.0/lib/active_record/connection_adapters/abstract/database_statements.rb:213:in `block in transaction'
  from /Users/alanmccann/railsapps/papertailtest/vendor/bundle/ruby/2.1.0/gems/activerecord-4.2.0/lib/active_record/connection_adapters/abstract/transaction.rb:188:in `within_new_transaction'
  from /Users/alanmccann/railsapps/papertailtest/vendor/bundle/ruby/2.1.0/gems/activerecord-4.2.0/lib/active_record/connection_adapters/abstract/database_statements.rb:213:in `transaction'
  from /Users/alanmccann/railsapps/papertailtest/vendor/bundle/ruby/2.1.0/gems/activerecord-4.2.0/lib/active_record/transactions.rb:220:in `transaction'
  from /Users/alanmccann/railsapps/papertailtest/vendor/bundle/ruby/2.1.0/gems/activerecord-4.2.0/lib/active_record/transactions.rb:344:in `with_transaction_returning_status'
  from /Users/alanmccann/railsapps/papertailtest/vendor/bundle/ruby/2.1.0/gems/activerecord-4.2.0/lib/active_record/transactions.rb:286:in `block in save'
  from /Users/alanmccann/railsapps/papertailtest/vendor/bundle/ruby/2.1.0/gems/activerecord-4.2.0/lib/active_record/transactions.rb:301:in `rollback_active_record_state!'
  from /Users/alanmccann/railsapps/papertailtest/vendor/bundle/ruby/2.1.0/gems/activerecord-4.2.0/lib/active_record/transactions.rb:285:in `save'
  from (irb):11
  from /Users/alanmccann/railsapps/papertailtest/vendor/bundle/ruby/2.1.0/gems/railties-4.2.0/lib/rails/commands/console.rb:110:in `start'
  from /Users/alanmccann/railsapps/papertailtest/vendor/bundle/ruby/2.1.0/gems/railties-4.2.0/lib/rails/commands/console.rb:9:in `start'
  from /Users/alanmccann/railsapps/papertailtest/vendor/bundle/ruby/2.1.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:68:in `console'
  from /Users/alanmccann/railsapps/papertailtest/vendor/bundle/ruby/2.1.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
  from /Users/alanmccann/railsapps/papertailtest/vendor/bundle/ruby/2.1.0/gems/railties-4.2.0/lib/rails/commands.rb:17:in `<top (required)>'
  from bin/rails:4:in `require'
  from bin/rails:4:in `<main>'

You need to bundle from source for now. I'm hoping to push out 4.0.0.rc1 in a couple days.
Sent from my iPhone

On Apr 24, 2015, at 8:47 AM, Alan McCann notifications@github.com wrote:
With 4.0.0.beta2, I have the following error that works fine on version 3.0.7. I have seen a previous issue/fix that might have addressed this but I thought the pull request was merged into 4.0.0.beta2
class Query < ActiveRecord::Base
has_paper_trail
belongs_to :queryable, polymorphic: true
end
class Universe < ActiveRecord::Base
has_many :queries, as: :queryable, dependent: :destroy
end
Updating queryable results in a NameError: uninitialized constant Query::Queryable error
q = Query.last
q.queryable = Universe.last
q.save
SQL (13.2ms)  UPDATE "versions" SET "transaction_id" = $1 WHERE "versions"."id" = $2  [["transaction_id", 3548], ["id", 3548]]
(15.4ms)  ROLLBACK
PaperTrail::Version Load (14.5ms)  SELECT "versions".* FROM "versions" WHERE "versions"."item_id" = $1 AND "versions"."item_type" = $2  ORDER BY "versions"."created_at" ASC, "versions"."id" ASC  [["item_id", 4], ["item_type", "Query"]]
NameError: uninitialized constant Query::Queryable
from /Users/alanmccann/railsapps/papertailtest/vendor/bundle/ruby/2.1.0/gems/activerecord-4.2.0/lib/active_record/inheritance.rb:158:in compute_type'   from /Users/alanmccann/railsapps/papertailtest/vendor/bundle/ruby/2.1.0/gems/activerecord-4.2.0/lib/active_record/reflection.rb:271:in compute_class'
from /Users/alanmccann/railsapps/papertailtest/vendor/bundle/ruby/2.1.0/gems/activerecord-4.2.0/lib/active_record/reflection.rb:267:in klass'   from /Users/alanmccann/railsapps/papertailtest/vendor/bundle/ruby/2.1.0/gems/paper_trail-4.0.0.beta2/lib/paper_trail/has_paper_trail.rb:376:in block in save_associations'
from /Users/alanmccann/railsapps/papertailtest/vendor/bundle/ruby/2.1.0/gems/paper_trail-4.0.0.beta2/lib/paper_trail/has_paper_trail.rb:375:in each'   from /Users/alanmccann/railsapps/papertailtest/vendor/bundle/ruby/2.1.0/gems/paper_trail-4.0.0.beta2/lib/paper_trail/has_paper_trail.rb:375:in save_associations'
from /Users/alanmccann/railsapps/papertailtest/vendor/bundle/ruby/2.1.0/gems/paper_trail-4.0.0.beta2/lib/paper_trail/has_paper_trail.rb:322:in record_update'   from /Users/alanmccann/railsapps/papertailtest/vendor/bundle/ruby/2.1.0/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:427:in block in make_lambda'
from /Users/alanmccann/railsapps/papertailtest/vendor/bundle/ruby/2.1.0/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:225:in call'   from /Users/alanmccann/railsapps/papertailtest/vendor/bundle/ruby/2.1.0/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:225:in block in halting_and_conditional'
from /Users/alanmccann/railsapps/papertailtest/vendor/bundle/ruby/2.1.0/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:219:in call'   from /Users/alanmccann/railsapps/papertailtest/vendor/bundle/ruby/2.1.0/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:219:in block in halting_and_conditional'
from /Users/alanmccann/railsapps/papertailtest/vendor/bundle/ruby/2.1.0/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:92:in call'   from /Users/alanmccann/railsapps/papertailtest/vendor/bundle/ruby/2.1.0/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:92:in _run_callbacks'
from /Users/alanmccann/railsapps/papertailtest/vendor/bundle/ruby/2.1.0/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:734:in _run_update_callbacks'   from /Users/alanmccann/railsapps/papertailtest/vendor/bundle/ruby/2.1.0/gems/activerecord-4.2.0/lib/active_record/callbacks.rb:310:in _update_record'
... 25 levels...
from /Users/alanmccann/railsapps/papertailtest/vendor/bundle/ruby/2.1.0/gems/activerecord-4.2.0/lib/active_record/connection_adapters/abstract/database_statements.rb:213:in block in transaction'   from /Users/alanmccann/railsapps/papertailtest/vendor/bundle/ruby/2.1.0/gems/activerecord-4.2.0/lib/active_record/connection_adapters/abstract/transaction.rb:188:in within_new_transaction'
from /Users/alanmccann/railsapps/papertailtest/vendor/bundle/ruby/2.1.0/gems/activerecord-4.2.0/lib/active_record/connection_adapters/abstract/database_statements.rb:213:in transaction'   from /Users/alanmccann/railsapps/papertailtest/vendor/bundle/ruby/2.1.0/gems/activerecord-4.2.0/lib/active_record/transactions.rb:220:in transaction'
from /Users/alanmccann/railsapps/papertailtest/vendor/bundle/ruby/2.1.0/gems/activerecord-4.2.0/lib/active_record/transactions.rb:344:in with_transaction_returning_status'   from /Users/alanmccann/railsapps/papertailtest/vendor/bundle/ruby/2.1.0/gems/activerecord-4.2.0/lib/active_record/transactions.rb:286:in block in save'
from /Users/alanmccann/railsapps/papertailtest/vendor/bundle/ruby/2.1.0/gems/activerecord-4.2.0/lib/active_record/transactions.rb:301:in rollback_active_record_state!'   from /Users/alanmccann/railsapps/papertailtest/vendor/bundle/ruby/2.1.0/gems/activerecord-4.2.0/lib/active_record/transactions.rb:285:in save'
from (irb):11
from /Users/alanmccann/railsapps/papertailtest/vendor/bundle/ruby/2.1.0/gems/railties-4.2.0/lib/rails/commands/console.rb:110:in start'   from /Users/alanmccann/railsapps/papertailtest/vendor/bundle/ruby/2.1.0/gems/railties-4.2.0/lib/rails/commands/console.rb:9:in start'
from /Users/alanmccann/railsapps/papertailtest/vendor/bundle/ruby/2.1.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:68:in console'   from /Users/alanmccann/railsapps/papertailtest/vendor/bundle/ruby/2.1.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:39:in run_command!'
from /Users/alanmccann/railsapps/papertailtest/vendor/bundle/ruby/2.1.0/gems/railties-4.2.0/lib/rails/commands.rb:17:in <top (required)>'   from bin/rails:4:in require'
from bin/rails:4:in `'
—
Reply to this email directly or view it on GitHub.

Perfect. Thanks for the quick response.

authors: AlanMcCann batter


text:
whodunnit is not set on Rails 5

I've created test app for this ticket to test https://github.com/boblin/papertrail_rails5_test
It is basically rails 5.0.0.beta1 app + latest Devise + lates Papertrail.
Started GET "/posts/1/edit" for 127.0.0.1 at 2016-01-15 12:14:51 +0100
  ActiveRecord::SchemaMigration Load (0.3ms)  SELECT "schema_migrations".* FROM "schema_migrations"
Processing by PostsController#edit as HTML
  Parameters: {"id"=>"1"}
  User Load (0.5ms)  SELECT  "users".* FROM "users" WHERE "users"."id" = $1 ORDER BY "users"."id" ASC LIMIT $2  [["id", 1], ["LIMIT", 1]]
  Post Load (0.2ms)  SELECT  "posts".* FROM "posts" WHERE "posts"."id" = $1 LIMIT $2  [["id", 1], ["LIMIT", 1]]
  Rendered posts/_form.html.erb (11.1ms)
  Rendered posts/edit.html.erb within layouts/application (12.6ms)
user_for_paper_trail is present, but whodunnit has not been set.
PaperTrail no longer adds the set_paper_trail_whodunnit
before_filter for you. Please add this before_filter to your
ApplicationController to continue recording whodunnit. See the
PaperTrail readme for an example.
Completed 200 OK in 193ms (Views: 156.1ms | ActiveRecord: 3.9ms)

2.2.3 :001 > Post.last.versions.last.whodunnit
D, [2016-01-15T12:17:01.172292 #17458] DEBUG -- :   Post Load (0.5ms)  SELECT  "posts".* FROM "posts" ORDER BY "posts"."id" DESC LIMIT $1  [["LIMIT", 1]]
D, [2016-01-15T12:17:01.197660 #17458] DEBUG -- :   PaperTrail::Version Load (0.3ms)  SELECT  "versions".* FROM "versions" WHERE "versions"."item_id" = $1 AND "versions"."item_type" = $2 ORDER BY "versions"."created_at" DESC, "versions"."id" DESC LIMIT $3  [["item_id", 1], ["item_type", "Post"], ["LIMIT", 1]]
 => nil

I think you are supposed to see this warning. Devise defines a current_user which PaperTrail uses in user_for_paper_trail. That is why the warning says "user_for_paper_trail is present". Did you not expect to see this warning?
If you don't want to track "who done it", you can override user_for_paper_trail to return nil
# application_controler.rb
def user_for_paper_trail
  nil
end

or you can add the set_paper_trail_whodunnit callback per the instructions in the readme.
I'm open to suggestions about how to make this change less confusing to others.
This change was made so that users could control the order of callbacks. See https://github.com/airblade/paper_trail/issues/301 for discussion.

I see. My mistake :-) Thank you for help :-)

Do you have any suggestions about how to make this less confusing to others?

Because this feature is probably wanted for most of users, I would definitely add this mention at beginning of readme here: https://github.com/airblade/paper_trail#basic-usage like:

you need to add has_paper_trail to model
you need to add before_filter set_paper_trail_whodunnit

Docs updated (https://github.com/airblade/paper_trail/commit/b9f23d729f057c05139f2ccd29c31b1b750e9a60). Thanks for the suggestion!

Perfect :+1: :smile:

authors: boblin jaredbeck


text:
SLA can be set at task level, email notifications get sent

Note that the introduction of a new model forces people who update to this version to run airflow initdb

Great to see the SLA is now supported.  Two questions:

Where can I find documentation about how to use this feature?
Are there any tests for this feature?

The documentation is part of this PR, look for concepts.rst and the docstring for BaseOperator.
The tests I ran I did not publish because it would assume having smtp set up and pushing an email address in the code, or parameterizing it in airflow.cfg, which I didn't. The good news is there's a test for it and it was tested, the bad news is it can't be in the repo as it is now.

authors: hluu mistercrunch

repo: airbnb/airflow


text:
cherrypick a few fixes from open source

cherrypick #8014 #7955
revert #7992

Codecov Report

Merging #155 into release--0.34 will increase coverage by 0.02%.
The diff coverage is 76.47%.

@@                Coverage Diff                @@
##           release--0.34     #155      +/-   ##
=================================================
+ Coverage          65.65%   65.67%   +0.02%
=================================================
  Files                469      469
  Lines              22390    22392       +2
  Branches            2431     2433       +2
=================================================
+ Hits               14700    14706       +6
+ Misses              7570     7566       -4
  Partials             120      120

Impacted Files
Coverage Δ

...et/assets/src/dashboard/reducers/dashboardState.js
83.33% <ø> (ø)
:arrow_up:

...set/assets/src/dashboard/actions/dashboardState.js
36.55% <0%> (ø)
:arrow_up:

.../src/dashboard/components/RefreshIntervalModal.jsx
100% <100%> (+30.76%)
:arrow_up:

superset/__init__.py
73.91% <100%> (ø)
:arrow_up:

superset/assets/src/SqlLab/actions/sqlLab.js
63.24% <100%> (-1.29%)
:arrow_down:

...src/dashboard/components/HeaderActionsDropdown.jsx
69.56% <60%> (+0.67%)
:arrow_up:

superset/assets/src/messageToasts/actions/index.js
91.66% <0%> (+12.5%)
:arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0a1d971...555d4bf. Read the comment docs.

authors: codecov-io graceguo-supercat

repo: airbnb/incubator-superset


text:
sqllab bug: 'unicode' has no attribute 'get_table_names'

Make sure these boxes are checked before submitting your issue - thank you!

[X] I have checked the superset logs for python stacktraces and included it here as text if any
[X] I have reproduced the issue with at least the latest released version of superset
[X] I have checked the issue tracker for the same issue and I haven't found one similar

Superset version
0.17.5 running on python 2.7 in ubuntu 16
Expected results
Table should get listed in the dropdown
Actual results
spinner keeps on rotating waiting for data to come
Steps to reproduce
step 1:- Go to sqllab
step 2:- select the database and schema
step 3:- wait for the spinner to start rotating
Error log
File "/usr/local/lib/python2.7/dist-packages/superset/views/base.py", line 48, in wraps
return f(self, *args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/flask_appbuilder/security/decorators.py", line 52, in wraps
return f(self, *args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/superset/views/core.py", line 1212, in tables
database, database.all_table_names(schema), schema)
File "/usr/local/lib/python2.7/dist-packages/superset/models/core.py", line 631, in all_table_names
self.db_engine_spec.get_table_names(schema, self.inspector))
File "/usr/local/lib/python2.7/dist-packages/superset/db_engine_specs.py", line 307, in get_table_names
return sorted(inspector.get_table_names())
AttributeError: 'unicode' object has no attribute 'get_table_names'

Is this a sqlite database? Looks like a dup of #2664

authors: tejaser xrmx

repo: airbnb/superset


text:
Bump to pytorch 1.9 and torchvision 0.10.0

Update dependency pins in setup.cfg to be:

torch >=1.7.0,<1.10
torchvision >=0.8.0,<0.11

Also update Github Actions CI to use mmcv-full=1.3.12 pytorch1.9-cpu version.
Fixes #739. Xref previous bump to pytorch 1.8 at #822.

Need approval to run GitHub Actions CI tests :smile:. Meanwhile, I've ran the tests locally using pytest --verbose tests -m "not cuda" and haven't got any failing tests. Report summary showed 287 passed, 34 skipped, 6 deselected, 1377 warnings (let me know too if I should run any tests on a GPU). Local dependencies used (from pip list) are:

python=3.8.10
torch=1.9.0+cpu
torchvision=0.10.0+cpu
torchmetrics=0.5.1
pytorch-lightning=1.4.5
mmcv-full=1.3.12
mmdet=2.12.0
fastai=2.3.1
fastcore=1.3.26
fastprogress=1.0.0

If you want, I can open up a separate PR to improve the GitHub Actions workflow in ci-all-testing.yml to test different Pytorch vesions (1.7, 1.8, 1.9). Not sure how many versions people would like icevision to support.

Hi!! Sorry for the delay, I just approved the actions

If you want, I can open up a separate PR to improve the GitHub Actions workflow in ci-all-testing.yml to test different Pytorch vesions (1.7, 1.8, 1.9)

I think this would be nice! But I'm not sure it's so straight forward. The hard part is not being able to support multiple torch versions, but the matching version required for other dependencies like mmdet, fastai and lightning

Hi!! Sorry for the delay, I just approved the actions

Cool, I see there are some test failures at https://github.com/airctic/icevision/pull/914/checks?check_run_id=3545089831#step:6:37. Looks like mmcv 1.3.6 introduced some backward incompatible changes:
ImportError while loading conftest '/home/runner/work/icevision/icevision/tests/conftest.py'.
tests/conftest.py:2: in <module>
    from icevision import *
icevision/__init__.py:7: in <module>
    from icevision import models
icevision/models/__init__.py:22: in <module>
    from icevision.models import mmdet
icevision/models/mmdet/__init__.py:1: in <module>
    from icevision.models.mmdet import common
icevision/models/mmdet/common/__init__.py:3: in <module>
    from icevision.models.mmdet.common import bbox
icevision/models/mmdet/common/bbox/__init__.py:1: in <module>
    from icevision.models.mmdet.common.bbox.dataloaders import *
icevision/models/mmdet/common/bbox/dataloaders.py:10: in <module>
    from icevision.models.mmdet.common.utils import convert_background_from_zero_to_last
icevision/models/mmdet/common/utils.py:11: in <module>
    from mmdet.models import build_detector
/opt/hostedtoolcache/Python/3.8.11/x64/lib/python3.8/site-packages/mmdet/models/__init__.py:1: in <module>
    from .backbones import *  # noqa: F401,F403
/opt/hostedtoolcache/Python/3.8.11/x64/lib/python3.8/site-packages/mmdet/models/backbones/__init__.py:2: in <module>
    from .detectors_resnet import DetectoRS_ResNet
/opt/hostedtoolcache/Python/3.8.11/x64/lib/python3.8/site-packages/mmdet/models/backbones/detectors_resnet.py:10: in <module>
    from .resnet import BasicBlock
/opt/hostedtoolcache/Python/3.8.11/x64/lib/python3.8/site-packages/mmdet/models/backbones/resnet.py:10: in <module>
    from ..utils import ResLayer
/opt/hostedtoolcache/Python/3.8.11/x64/lib/python3.8/site-packages/mmdet/models/utils/__init__.py:6: in <module>
    from .transformer import (DetrTransformerDecoder, DetrTransformerDecoderLayer,
/opt/hostedtoolcache/Python/3.8.11/x64/lib/python3.8/site-packages/mmdet/models/utils/transformer.py:8: in <module>
    from mmcv.cnn.bricks.transformer import (BaseTransformerLayer,
E   ImportError: cannot import name 'MultiScaleDeformableAttention' from 'mmcv.cnn.bricks.transformer' (/opt/hostedtoolcache/Python/3.8.11/x64/lib/python3.8/site-packages/mmcv/cnn/bricks/transformer.py)

Do you want me to 1) fix this error directly in this PR so that mmcv>1.3.6 will work or 2) pin mmcv to 1.3.5 and fix the error in a separate PR?

If you want, I can open up a separate PR to improve the GitHub Actions workflow in ci-all-testing.yml to test different Pytorch vesions (1.7, 1.8, 1.9)

I think this would be nice! But I'm not sure it's so straight forward. The hard part is not being able to support multiple torch versions, but the matching version required for other dependencies like mmdet, fastai and lightning

There's a way to pair up dependencies on GitHub Actions, I've opened up a proof of concept PR at #915. Let's discuss this there :smile:

Hey @weiji14, my sincere apologies for the lack of follow-up. We aren't very active on GitHub. Are you part our IceVision forum. If not, here is an invitation (feel free to ping me there @Farid):
• IceVision Forum: discord.gg/JDBeZYK
We are trying to find an optimal way to easy the installation process.

Hi @ai-fast-track, that's ok. I was just trying to do a quickfix while trying out icevision, but discovered that the package might not be suitable for my use case. I might revisit this next time for another computer vision project next time. Good luck!

authors: ai-fast-track lgvaz weiji14

repo: airctic/icevision